Add constant for Latest Update shortcode date

This commit is contained in:
Tetrakern 2023-06-06 15:34:08 +02:00
parent 699d6efbb8
commit 6728e34faf
3 changed files with 7 additions and 2 deletions

View File

@ -70,6 +70,11 @@ if ( ! defined( 'FICTIONEER_SITE_DESCRIPTION' ) ) {
define( 'FICTIONEER_SITE_DESCRIPTION', get_bloginfo( 'description' ) );
}
// String: Latest Updates shortcode date format
if ( ! defined( 'FICTIONEER_SHORTCODE_DATE_LATEST_UPDATES' ) ) {
define( 'FICTIONEER_SHORTCODE_DATE_LATEST_UPDATES', get_option( 'fictioneer_subitem_short_date_format', 'M j' ) );
}
/*
* Integers
*/

View File

@ -160,7 +160,7 @@ $entries = new WP_Query( $query_args );
<?php
echo fictioneer_shorten_number( get_post_meta( $chapter_id, '_word_count', true ) );
echo '<span class="separator-dot">&#8196;&bull;&#8196;</span>';
echo get_the_date( get_option( 'fictioneer_subitem_short_date_format', 'M j' ), $chapter_id )
echo get_the_date( FICTIONEER_SHORTCODE_DATE_LATEST_UPDATES, $chapter_id )
?>
</div>
</li>

View File

@ -156,7 +156,7 @@ $entries = new WP_Query( $query_args );
<?php
echo fictioneer_shorten_number( get_post_meta( $chapter_id, '_word_count', true ) );
echo '<span class="separator-dot">&#8196;&bull;&#8196;</span>';
echo get_the_date( get_option( 'fictioneer_subitem_short_date_format', 'M j' ), $chapter_id )
echo get_the_date( FICTIONEER_SHORTCODE_DATE_LATEST_UPDATES, $chapter_id )
?>
</div>
</li>