/** * Return true when Show Full Content First Post option is disabled, * or when Show Full Content First Post is enabled but excerpts are disabled, * or when Show Full Content First Post is enabled and we're not on * the very first post */ function independent_publisher_is_not_first_post_full_content() { // This only works in the loop, so return false if we're not there if (!in_the_loop()) { return false; } // If Show Full Content First Post option is not enabled, // or if it's enabled by excerpts are disabled, return true if (!independent_publisher_show_full_content_first_post() || !independent_publisher_generate_one_sentence_excerpts() && !independent_publisher_use_post_excerpts()) { return true; } // If Show Full Content First Post option is enabled but this is not // the very first post, return true if (independent_publisher_show_full_content_first_post() && !independent_publisher_is_very_first_standard_post()) { return true; } // If Show Full Content First Post option is enabled and this is the // very first post, return false if (independent_publisher_show_full_content_first_post() && independent_publisher_is_very_first_standard_post()) { return false; } // Default return false return false; }
?> </a> <?php } ?> <?php /* Only show excerpts for Standard post format OR Chat format, * when this is not both the very first standard post and also a Sticky post AND * when excerpts enabled or One-Sentence Excerpts enabled AND * this is not the very first standard post when Show Full Content First Post enabled */ ?> <?php if ((!get_post_format() || 'chat' === get_post_format()) && !(independent_publisher_is_very_first_standard_post() && is_sticky()) && (independent_publisher_use_post_excerpts() || independent_publisher_generate_one_sentence_excerpts()) && !(independent_publisher_show_full_content_first_post() && independent_publisher_is_very_first_standard_post() && is_home())) { ?> <?php the_excerpt(); ?> <?php } else { ?> <?php /* Only show featured image for Standard post and gallery post formats */ ?> <?php if (has_post_thumbnail() && in_array(get_post_format(), array('gallery', false))) {
<?php } ?> </div> <!-- .entry-content --> <?php /* Show Continue Reading link when this is a Standard post format AND * One-Sentence Excerpts options is enabled AND * we're not showing the first post full content AND * this is not a sticky post */ ?> <?php if (false === get_post_format() && independent_publisher_generate_one_sentence_excerpts() && independent_publisher_is_not_first_post_full_content() && !is_sticky()) { ?> <?php independent_publisher_continue_reading_link(); ?> <?php } ?> <footer class="entry-meta"> <?php /* Show author name and post categories only when post type == post AND * we're not showing the first post full content */ ?>