block.
*
* @package WordPress
* @subpackage Fictioneer
* @since 4.7.0
* @since 5.17.0 - Turned meta data into filterable array.
* @see single-fcn_story.php
*
* @internal $args['story_data'] Story data from fictioneer_get_story_data().
* @internal $args['story_id'] Current story and post ID.
*/
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Render nothing if password is required
if ( post_password_required() ) {
return;
}
// Setup
$story_id = $args['story_id'];
$story = $args['story_data'];
$post = get_post( $story_id );
$show_log = $story['chapter_count'] > 0 && FICTIONEER_ENABLE_STORY_CHANGELOG && get_option( 'fictioneer_show_story_changelog' );
$meta_output = [];
// Status
$meta_output['status'] = ' ' . fcntr( $story['status'] ) . '';
if ( get_option( 'fictioneer_show_story_modified_date' ) ) {
// Modified
$meta_output['modified'] = ' ' . get_the_modified_date( get_option( 'date_format' ), $post ) . '' . get_the_modified_date( FICTIONEER_STORY_FOOTER_B480_DATE, $post ) . '';
} else {
// Publish
$meta_output['date'] = ' ' . get_the_time( get_option( 'date_format' ), $post ) . '' . get_the_time( FICTIONEER_STORY_FOOTER_B480_DATE, $post ) . '';
}
// Words
$meta_output['words'] = ' ' . $story['word_count_short'] . '';
// Rating
$meta_output['rating'] = ' ' . fcntr( $story['rating'] ) . '';
// Checkmark
if ( $story['chapter_count'] > 0 ) {
$meta_output['checkmark'] = '';
}
// Filter
$meta_output = apply_filters( 'fictioneer_filter_story_footer_meta', $meta_output, $args, $post );
?>