Created
June 4, 2018 06:16
-
-
Save aalimran07/91420f8a9ff623fc2c2fd52f4642757b to your computer and use it in GitHub Desktop.
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
if (! function_exists('loanplus_time')) { | |
function loanplus_time() | |
{ | |
$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>'; | |
if (get_the_time('U') !== get_the_modified_time('U')) { | |
$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>'; | |
} | |
$time_string = sprintf( | |
$time_string, | |
esc_attr(get_the_date(DATE_W3C)), | |
esc_html(get_the_date()), | |
esc_attr(get_the_modified_date(DATE_W3C)), | |
esc_html(get_the_modified_date()) | |
); | |
echo '<i class="blog-time">' . $time_string . '</i>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment