/** * Returns post date formatted for display in theme * @return string */ function independent_publisher_get_post_date() { if (comments_open() && !independent_publisher_hide_comments() || independent_publisher_show_post_word_count() && !get_post_format()) { $separator = ' <span class="sep"> ' . apply_filters('independent_publisher_entry_meta_separator', '|') . ' </span>'; } else { $separator = ''; } return independent_publisher_posted_on_date() . $separator; }
/* Show author name and post categories only when post type == post AND we're not showing the first post full content */ if ('post' == get_post_type() && independent_publisher_is_not_first_post_full_content()) { independent_publisher_posted_author_cats(); } ?> <?php /* Show post date when show post date option enabled */ if (independent_publisher_show_date_entry_meta()) { echo independent_publisher_get_post_date(); } ?> <?php /* Show post word count */ if (independent_publisher_show_post_word_count()) { echo independent_publisher_get_post_word_count(); } ?> <?php /* Show reading time*/ if (independent_baddeo_show_reading_time()) { echo independent_baddeo_get_reading_time(); } ?> <?php /* Show comments link only when post is not password-protected AND comments are enabled on this post */ if (!post_password_required() && comments_open() && independent_baddeo_show_comments()) { ?>
<?php echo independent_publisher_get_post_date(); ?> <?php } ?> <?php /* Show post word count when post is not password-protected AND * this is a Standard post format AND * post word count option enabled AND * we're not showing the first post full content */ ?> <?php if (!post_password_required() && false === get_post_format() && independent_publisher_show_post_word_count() && independent_publisher_is_not_first_post_full_content()) { ?> <?php echo independent_publisher_get_post_word_count(); ?> <?php } ?> <?php /* Show comments link only when post is not password-protected AND comments are enabled on this post */ ?> <?php if (!post_password_required() && comments_open() && !independent_publisher_hide_comments()) { ?> <span class="comments-link"><?php
/** * Prints HTML with meta information for the current author and post categories. * * Only prints author name when Multi-Author Mode is enabled. * * @since Independent Publisher 1.0 */ function independent_publisher_posted_author_cats() { /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list(__(', ', 'independent-publisher')); if (!post_password_required() && comments_open() && !independent_publisher_hide_comments() || !post_password_required() && independent_publisher_show_post_word_count() && !get_post_format() || independent_publisher_show_date_entry_meta()) { $separator = apply_filters('independent_publisher_entry_meta_separator', '|'); } else { $separator = ''; } if (independent_publisher_is_multi_author_mode()) { if ($categories_list && independent_publisher_categorized_blog()) { echo '<span class="cat-links">'; printf('<a href="%1$s" title="%2$s">%3$s</a> %4$s %5$s', esc_url(get_author_posts_url(get_the_author_meta('ID'))), esc_attr(sprintf(__('View all posts by %s', 'independent-publisher'), get_the_author())), esc_html(get_the_author()), independent_publisher_entry_meta_category_prefix(), $categories_list); echo '</span> <span class="sep"> ' . $separator . '</span>'; } else { echo '<span class="cat-links">'; printf('%1$s <a href="%2$s" title="%3$s">%4$s</a>', independent_publisher_entry_meta_author_prefix(), esc_url(get_author_posts_url(get_the_author_meta('ID'))), esc_attr(sprintf(__('View all posts by %s', 'independent-publisher'), get_the_author())), esc_html(get_the_author())); echo '</span>'; } // End if categories } else { // not Multi-Author Mode if ($categories_list && independent_publisher_categorized_blog()) { echo '<span class="cat-links">'; printf('%1$s %2$s', independent_publisher_entry_meta_category_prefix(), $categories_list); echo '</span> <span class="sep"> ' . $separator . '</span>'; } else { echo '<span class="cat-links">'; echo '</span>'; } // End if categories } // End if independent_publisher_is_multi_author_mode() }