';
}
add_action( 'cleanretina_loop_content', 'cleanretina_theloop', 10 );
/**
* Shows the loop content
*/
function cleanretina_theloop() {
global $post;
global $cleanretina_theme_options_settings;
$options = $cleanretina_theme_options_settings;
if( have_posts() ) {
while( have_posts() ) {
the_post();
do_action( 'cleanretina_before_post' );
if( !is_page() ) {
?>
>
ID ) );
if( 'excerpt_display_two' == $options[ 'blog_display_type' ] && is_home() ) {
$image .= '';
}
elseif( ( 'excerpt_display_one' == $options[ 'blog_display_type' ] && is_home() ) || is_archive() ) {
$image .= '';
}
echo $image;
}
?>
'.__( 'Readmore', 'cleanretina' ).'';
}
}
else {
the_content();
if( is_single() ) {
$tag_list = get_the_tag_list( '', __( ', ', 'cleanretina' ) );
if( !empty( $tag_list ) ) {
?>
'
',
'link_before' => '
',
'link_after' => '',
'pagelink' => '%',
'echo' => 1
) );
}
?>
max_num_pages > 1 ) :
?>
- ' . _x( '←', 'Previous post link', 'cleanretina' ) . ' %title' ); ?>
- ' . _x( '→', 'Next post link', 'cleanretina' ) . '' ); ?>
';
}
/****************************************************************************************/
add_action('wp_head', 'cleanretina_internal_css');
/**
* Hooks the Custom Internal CSS to head section
*/
function cleanretina_internal_css() {
if ( ( !$cleanretina_internal_css = get_transient( 'cleanretina_internal_css' ) ) ) {
global $cleanretina_theme_options_settings;
$options = $cleanretina_theme_options_settings;
if( !empty( $options[ 'custom_css' ] ) ) {
$cleanretina_internal_css = '' . "\n";
$cleanretina_internal_css .= '' . "\n";
}
set_transient( 'cleanretina_internal_css', $cleanretina_internal_css, 86940 );
}
echo $cleanretina_internal_css;
}
/****************************************************************************************/
add_action('wp_head', 'cleanretina_verification');
/**
* Site Verification and Header Analytic Tools
*
* If user sets the code we're going to display meta verification
*/
function cleanretina_verification() {;
if ( ( !$cleanretina_verification = get_transient( 'cleanretina_verification' ) ) ) {
global $cleanretina_theme_options_settings;
$options = $cleanretina_theme_options_settings;
$cleanretina_verification = '';
// google verification
if ( !empty( $options['google_verification'] ) ) {
$cleanretina_verification .= '
' . "\n";
}
// bing verification
if ( !empty( $options['bing_verification'] ) ) {
$cleanretina_verification .= '
' . "\n";
}
// yahoo verification
if ( !empty( $options['yahoo_verification'] ) ) {
$cleanretina_verification .= '
' . "\n";
}
// site stats, analytics header code
if ( !empty( $options['analytic_header'] ) ) {
$cleanretina_verification .= $options[ 'analytic_header' ] ;
}
set_transient( 'cleanretina_verification', $cleanretina_verification, 86940 );
}
echo $cleanretina_verification;
}
/****************************************************************************************/
add_action('wp_footer', 'cleanretina_footercode');
/**
* Footer Analytics Code
*/
function cleanretina_footercode() {
if ( ( !$cleanretina_footercode = get_transient( 'cleanretina_footercode' ) ) ) {
global $cleanretina_theme_options_settings;
$options = $cleanretina_theme_options_settings;
// site stats, analytics footer code
if ( !empty( $options['analytic_footer'] ) ) {
$cleanretina_footercode = $options[ 'analytic_footer' ] ;
}
set_transient( 'cleanretina_footercode', $cleanretina_footercode, 86940 );
}
echo $cleanretina_footercode;
}
/****************************************************************************************/
add_action( 'cleanretina_home_corporate_content', 'cleanretina_display_home_corporate_content', 10 );
/**
* Function to display the content for home page corporate type layout
*/
function cleanretina_display_home_corporate_content() {
global $cleanretina_theme_options_settings;
$options = $cleanretina_theme_options_settings;
?>
' . $options[ 'corporate_content_title' ] . '';
}
if( !empty( $options[ 'featured_home_box_image' ] ) || !empty( $options[ 'featured_home_box_title' ] ) || !empty( $options[ 'featured_home_box_description' ] ) ) {
$cleanretina_display_home_corporate_content .=
'
';
for( $i = 1; $i <= 3; $i++ ) {
if( !empty( $options[ 'featured_home_box_image' ][ $i ] ) || !empty( $options[ 'featured_home_box_title' ][ $i ] ) || !empty( $options[ 'featured_home_box_description' ][ $i ] ) ) {
$cleanretina_display_home_corporate_content .=
'
';
}
}
$cleanretina_display_home_corporate_content .=
'
';
}
set_transient( 'cleanretina_display_home_corporate_content', $cleanretina_display_home_corporate_content, 86940 );
}
echo $cleanretina_display_home_corporate_content;
?>
comment_type ) :
case 'pingback' :
case 'trackback' :
// Display trackbacks differently than normal comments.
?>
id="comment-">
', '' ); ?>
id="li-comment-">
is_main_query() && $query->is_home() ) {
$query->query_vars['post__not_in'] = $options[ 'featured_post_slider' ];
}
}
if ( !in_array( '0', $cats ) ) {
if( $query->is_main_query() && $query->is_home() ) {
$query->query_vars['category__in'] = $options[ 'front_page_category' ];
}
}
}
?>