Skip to content

Instantly share code, notes, and snippets.

@aalimran07
Created June 4, 2018 06:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aalimran07/91420f8a9ff623fc2c2fd52f4642757b to your computer and use it in GitHub Desktop.
Save aalimran07/91420f8a9ff623fc2c2fd52f4642757b to your computer and use it in GitHub Desktop.
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