Last active
September 20, 2023 04:05
-
-
Save bibicadotnet/2bbc127fc1fc85a4dcfa3249df75de77 to your computer and use it in GitHub Desktop.
post and uptime date, view, comment GENERATEPRESS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Plugin Name: post and uptime date, view, comment | |
Description: post and uptime date, view, comment GENERATEPRESS | |
*/ | |
add_filter( 'generate_post_date_output', 'tu_show_modified_date' ); | |
function tu_show_modified_date() { | |
printf( '<span class="posted-on"><i class="fa"> </i>%1$s %3$s </span>', | |
esc_html( get_the_date() ), | |
esc_attr( get_the_time() ), | |
get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ? ' <i class="fa"> </i>' . esc_html( get_the_modified_date() ) : '' | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment