MinimalistFlex/templates/publisher.php
2024-08-29 15:18:30 +08:00

32 lines
992 B
PHP

<?php
if ( !defined( 'WPINC' ) ) {
die;
}
?>
<div class="publisher">
<a class="publisher-link" href="<?php echo esc_url( get_author_posts_url($id) ) ?>">
<?php echo get_avatar( $id, 32 ) ?>
<span><?php the_author() ?></span>
</a>
<div class="publisher-datetime">
<?php $datemode = get_theme_mod( 'minimalistflex_interface_date', 'modify' ); ?>
<?php if ( $datemode <> 'no' ): ?>
<?php if ( $datemode == 'publish' || get_the_modified_date() <> get_the_date() ): ?>
<?php printf(
/* translators: %s: Post publish time. */
esc_html__( 'Published on %s', 'minimalistflex' ),
get_the_date()
) ?>
<?php else: ?>
<?php printf(
/* translators: %s: Post last modified time. */
esc_html__( 'Last modified on %s', 'minimalistflex' ),
get_the_modified_date()
) ?>
<?php endif; ?>
<?php endif; ?>
</div>
</div>