', '' . esc_html( get_the_title() ) . '', ''; } /* ---------------------------------------------------------------------------------- BLOG CONTENT ---------------------------------------------------------------------------------- */ // Input post thumbnail / featured media function 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 = '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 thinkup_input_blogtext() { global $post; global $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' ) and ! is_numeric( strpos( $post->post_content, '' ) ) ) { the_excerpt(); } else if ( $thinkup_blog_postswitch == 'option2' ) { the_content(); } } } /* ---------------------------------------------------------------------------------- BLOG META CONTENT & POST META CONTENT ---------------------------------------------------------------------------------- */ // Input sticky post function thinkup_input_sticky() { printf( '' . __( 'Sticky', 'bolder' ) . '', esc_url( get_permalink() ), esc_attr( get_the_title() ) ); } // Input blog date function 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 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 thinkup_input_blogcategory() { $categories_list = get_the_category_list( __( ', ', 'bolder' ) ); if ( $categories_list && thinkup_input_categorizedblog() ) { echo ''; printf( __( '%1$s', 'bolder' ), $categories_list ); echo ''; }; } // Input blog tags function thinkup_input_blogtag() { $tags_list = get_the_tag_list( '', __( ', ', 'bolder' ) ); if ( $tags_list ) { echo ''; printf( __( '%1$s', 'bolder' ), $tags_list ); echo ''; }; } // Input blog author function 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 FOR the_content() AND the_excerpt(). //---------------------------------------------------------------------------------- function thinkup_input_readmore() { global $post; return '...'; } add_filter( 'excerpt_more', 'thinkup_input_readmore' ); add_filter( 'the_content_more_link', 'thinkup_input_readmore' ); /* ---------------------------------------------------------------------------------- INPUT BLOG META CONTENT ---------------------------------------------------------------------------------- */ // Add format-media class to post article for featured image, gallery and video function thinkup_input_blogmediaclass($classes) { if ( thinkup_check_isblog() ) { if( has_post_thumbnail() ) { $classes[] = 'format-media'; } else { $classes[] = 'format-nomedia'; } } return $classes; } add_action( 'post_class', 'thinkup_input_blogmediaclass'); // Blog meta content - Blog style 1 function thinkup_input_blogmeta() { echo '
'; if ( is_sticky() && is_home() && ! is_paged() ) { thinkup_input_sticky(); } thinkup_input_blogdate(); thinkup_input_blogauthor(); thinkup_input_blogcomment(); thinkup_input_blogcategory(); thinkup_input_blogtag(); echo '
'; } /* ---------------------------------------------------------------------------------- INPUT POST META CONTENT ---------------------------------------------------------------------------------- */ function 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, '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 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', 'thinkup_input_postmediaclass'); // Input meta data for single post function thinkup_input_postmeta() { echo '
'; echo '

' . esc_html( get_the_title() ) . '

'; echo '
'; thinkup_input_blogdate(); thinkup_input_blogauthor(); thinkup_input_blogcomment(); thinkup_input_blogcategory(); thinkup_input_blogtag(); echo '
'; echo '
'; } /* ---------------------------------------------------------------------------------- SHOW AUTHOR BIO ---------------------------------------------------------------------------------- */ // HTML for Author Bio function 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 thinkup_input_postauthorbio() { global $thinkup_post_authorbio; if ( $thinkup_post_authorbio == '1' ) { thinkup_input_postauthorbiocode(); } } /* ---------------------------------------------------------------------------------- TEMPLATE FOR COMMENTS AND PINGBACKS (PREVIOUSLY IN TEMPLATE-TAGS). ---------------------------------------------------------------------------------- */ /* Display comments - Style 1 */ function 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 thinkup_input_commenttemplate( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case 'pingback' : case 'trackback' : ?>
  • id="li-comment-">

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