Update word count node conditions on cards
This commit is contained in:
parent
70fb1a4706
commit
4466e2aa18
@ -218,8 +218,10 @@ $thumbnail_args = array(
|
||||
esc_attr__( 'Chapters', 'fictioneer' ) . '"></i> ' . $story['chapter_count'];
|
||||
}
|
||||
|
||||
$footer_items['words'] = '<i class="card-footer-icon fa-solid fa-font" title="' .
|
||||
esc_attr__( 'Total Words', 'fictioneer' ) . '"></i> ' . $story['word_count_short'];
|
||||
if ( $story['word_count'] > 2000 || $story['status'] === 'Oneshot' ) {
|
||||
$footer_items['words'] = '<i class="card-footer-icon fa-solid fa-font" title="' .
|
||||
esc_attr__( 'Total Words', 'fictioneer' ) . '"></i> ' . $story['word_count_short'];
|
||||
}
|
||||
|
||||
if ( ( $args['orderby'] ?? 0 ) === 'date' ) {
|
||||
$footer_items['publish_date'] = '<i class="card-footer-icon fa-solid fa-clock" title="' .
|
||||
|
@ -280,7 +280,7 @@ remove_filter( 'posts_where', 'fictioneer_exclude_protected_posts' );
|
||||
esc_attr__( 'Chapters', 'fictioneer' ) . '"></i> ' . $story['chapter_count'];
|
||||
}
|
||||
|
||||
if ( $story['word_count'] > 0 ) {
|
||||
if ( $story['word_count'] > 2000 || $story['status'] === 'Oneshot' ) {
|
||||
$footer_items['words'] = '<i class="card-footer-icon fa-solid fa-font" title="' .
|
||||
esc_attr__( 'Total Words', 'fictioneer' ) . '"></i> ' . $story['word_count_short'];
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ remove_filter( 'posts_where', 'fictioneer_exclude_protected_posts' );
|
||||
esc_attr__( 'Chapters', 'fictioneer' ) . '"></i> ' . $story['chapter_count'];
|
||||
}
|
||||
|
||||
if ( $story['word_count'] > 0 ) {
|
||||
if ( $story['word_count'] > 2000 || $story['status'] === 'Oneshot' ) {
|
||||
$footer_items['words'] = '<i class="card-footer-icon fa-solid fa-font" title="' .
|
||||
esc_attr__( 'Total Words', 'fictioneer' ) . '"></i> ' . $story['word_count_short'];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user