', '' . get_the_title() . '', ''; } /* ---------------------------------------------------------------------------------- BLOG CONTENT ---------------------------------------------------------------------------------- */ // Input post thumbnail / featured media function bolder_thinkup_input_blogimage() { global $post; $size = NULL; $link = NULL; $media = NULL; $output = NULL; $blog_lightbox = NULL; $blog_link = NULL; $blog_overlay = NULL; // Set image size for blog thumbnail $size = 'bolder-thinkup-column3-2/3'; $featured_id = get_post_thumbnail_id( $post->ID ); $featured_img = wp_get_attachment_image_src($featured_id,'full', true); // Determine featured media to input $link = $featured_img[0]; $media = get_the_post_thumbnail( $post->ID, $size ); // Determine which links to show on hover $blog_lightbox = ''; $blog_link = ''; $blog_overlay .= '
'; $blog_overlay .= '
'; $blog_overlay .= $blog_lightbox; $blog_overlay .= $blog_link; $blog_overlay .= '
'; $blog_overlay .= '
'; // Output media on blog page if ( ! empty( $featured_id ) ) { $output .= '
'; $output .= '' . $media . ''; $output .= $blog_overlay; $output .= '
'; } return $output; } // Input post excerpt / content to blog page function bolder_thinkup_input_blogtext() { global $post; // Get theme options values. $thinkup_blog_postswitch = bolder_thinkup_var ( 'thinkup_blog_postswitch' ); // Output post content if ( is_search() ) { the_excerpt(); } else if ( ! is_search() ) { if ( ( empty( $thinkup_blog_postswitch ) or $thinkup_blog_postswitch == 'option1' ) ) { if( ! is_numeric( strpos( $post->post_content, '' ) ) ) { the_excerpt(); } else { the_content(); wp_link_pages( array( 'before' => '', ) ); } } else if ( $thinkup_blog_postswitch == 'option2' ) { the_content(); wp_link_pages( array( 'before' => '', ) ); } } } /* ---------------------------------------------------------------------------------- BLOG META CONTENT & POST META CONTENT ---------------------------------------------------------------------------------- */ // Input sticky post function bolder_thinkup_input_sticky() { printf( '' . __( 'Sticky', 'bolder' ) . '', esc_url( get_permalink() ), esc_attr( get_the_title() ) ); } // Input blog date function bolder_thinkup_input_blogdate() { printf( __( '', 'bolder' ), esc_url( get_permalink() ), esc_attr( get_the_title() ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ) ); } // Input blog comments function bolder_thinkup_input_blogcomment() { if ( '0' != get_comments_number() ) { echo ''; if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) {; comments_popup_link( __( '0 Comments', 'bolder' ), __( '1 Comment', 'bolder' ), __( '% Comments', 'bolder' ) ); }; echo ''; } } // Input blog categories function bolder_thinkup_input_blogcategory() { $categories_list = get_the_category_list( __( ', ', 'bolder' ) ); if ( $categories_list && bolder_thinkup_input_categorizedblog() ) { echo ''; printf( '%1$s', $categories_list ); echo ''; }; } // Input blog tags function bolder_thinkup_input_blogtag() { $tags_list = get_the_tag_list( '', __( ', ', 'bolder' ) ); if ( $tags_list ) { echo ''; printf( '%1$s', $tags_list ); echo ''; }; } // Input blog author function bolder_thinkup_input_blogauthor() { printf( __( '', 'bolder' ), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( __( 'View all posts by %s', 'bolder' ), get_the_author() ) ), get_the_author() ); } //---------------------------------------------------------------------------------- // CUSTOM READ MORE BUTTON. //---------------------------------------------------------------------------------- function bolder_thinkup_input_readmore( $link ) { global $post; // Make no changes if in admin area if ( is_admin() ) { return $link; } $link = '…'; return $link; } add_filter( 'excerpt_more', 'bolder_thinkup_input_readmore' ); add_filter( 'the_content_more_link', 'bolder_thinkup_input_readmore' ); /* ---------------------------------------------------------------------------------- INPUT BLOG META CONTENT ---------------------------------------------------------------------------------- */ // Add format-media class to post article for featured image, gallery and video function bolder_thinkup_input_blogmediaclass($classes) { global $post; // Get theme options values. $thinkup_blog_postswitch = bolder_thinkup_var ( 'thinkup_blog_postswitch' ); $featured_id = get_post_thumbnail_id( $post->ID ); // Determine featured media to input if ( bolder_thinkup_check_isblog() ) { if ( empty( $featured_id ) or $thinkup_blog_postswitch == 'option2' ) { $classes[] = 'format-nomedia'; } else if( has_post_thumbnail() ) { $classes[] = 'format-media'; } } return $classes; } add_action( 'post_class', 'bolder_thinkup_input_blogmediaclass'); // Blog meta content - Blog style 1 function bolder_thinkup_input_blogmeta() { echo '
'; if ( is_sticky() && is_home() && ! is_paged() ) { bolder_thinkup_input_sticky(); } bolder_thinkup_input_blogdate(); bolder_thinkup_input_blogauthor(); bolder_thinkup_input_blogcomment(); bolder_thinkup_input_blogcategory(); bolder_thinkup_input_blogtag(); echo '
'; } /* ---------------------------------------------------------------------------------- INPUT POST META CONTENT ---------------------------------------------------------------------------------- */ function bolder_thinkup_input_postmedia() { global $post; // Set output variable to avoid php errors $output = NULL; if ( get_post_format() == 'image' ) { $output .= '
' . get_the_post_thumbnail( $post->ID, 'bolder-thinkup-column1-1/4' ) . '
'; } // Output featured items if set if ( ! empty( $output ) ) { echo $output; } } // Add format-media class to post article for featured image, gallery and video function bolder_thinkup_input_postmediaclass($classes) { if ( is_singular( 'post' ) ) { if ( get_post_format() == 'image' or get_post_format() == 'gallery' or get_post_format() == 'video' ) { if( has_post_thumbnail() ) { $classes[] = 'format-media'; } } else { $classes[] = 'format-nomedia'; } } return $classes; } add_action( 'post_class', 'bolder_thinkup_input_postmediaclass'); // Input meta data for single post function bolder_thinkup_input_postmeta() { echo '
'; echo '

' . get_the_title() . '

'; echo '
'; bolder_thinkup_input_blogdate(); bolder_thinkup_input_blogauthor(); bolder_thinkup_input_blogcomment(); bolder_thinkup_input_blogcategory(); bolder_thinkup_input_blogtag(); echo '
'; echo '
'; } /* ---------------------------------------------------------------------------------- SHOW AUTHOR BIO ---------------------------------------------------------------------------------- */ // HTML for Author Bio function bolder_thinkup_input_postauthorbiocode() { echo '
', '
', get_avatar( get_the_author_meta( 'email' ), '160' ), '
', '
', ''; if ( get_the_author_meta( 'description' ) !== '' ) { echo '
', wpautop( get_the_author_meta( 'description' ) ), '
'; } echo '
'; } // Output Author Bio function bolder_thinkup_input_postauthorbio() { // Get theme options values. $thinkup_post_authorbio = bolder_thinkup_var ( 'thinkup_post_authorbio' ); if ( $thinkup_post_authorbio == '1' ) { bolder_thinkup_input_postauthorbiocode(); } } /* ---------------------------------------------------------------------------------- TEMPLATE FOR COMMENTS AND PINGBACKS (PREVIOUSLY IN TEMPLATE-TAGS). ---------------------------------------------------------------------------------- */ /* Display comments - Style 1 */ function bolder_thinkup_input_allowcomments() { if ( comments_open() || '0' != get_comments_number() ) { comments_template( '/comments.php', true ); } } /* ---------------------------------------------------------------------------------- TEMPLATE FOR COMMENTS AND PINGBACKS (PREVIOUSLY IN TEMPLATE-TAGS). ---------------------------------------------------------------------------------- */ function bolder_thinkup_input_commenttemplate( $comment, $args, $depth ) { switch ( $comment->comment_type ) : case 'pingback' : case 'trackback' : ?>
  • id="li-comment-">

    comment_approved == '0' ) : ?>
    $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    'bolder_thinkup_input_commenttemplate', ); wp_list_comments( $args ); } ?>