Skip to content

Instantly share code, notes, and snippets.

@eksiscloud
Last active April 17, 2019 09:47
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 eksiscloud/b52fccf6b740f52262e2b7d0f2ffa9a5 to your computer and use it in GitHub Desktop.
Save eksiscloud/b52fccf6b740f52262e2b7d0f2ffa9a5 to your computer and use it in GitHub Desktop.
Kallyas, last modified date: components/blog/default-single-modern/single-details-date.php
<?php if(! defined('ABSPATH')){ return; }
/**
* Details date
*/
?>
<span class="kl-blog-post-date updated" <?php echo WpkPageHelper::zn_schema_markup('post_time'); ?>>
<?php
echo "Posted on ";
$date_format = zget_option( 'blog_date_format', 'blog_options', false, 'l, d F Y' );
the_time( $date_format );
?>
<span class="infSep kl-blog-post-details-sep"> | </span>
<?php $u_time = get_the_time('U');
$u_modified_time = get_the_modified_time('U');
if ($u_modified_time >= $u_time + 86400) {
echo "Last updated on ";
the_modified_time('j.n.Y');
echo ", "; }
else {echo "";} ?>
<?php
/** Original
$date_format = zget_option( 'blog_date_format', 'blog_options', false, 'l, d F Y' );
the_time( $date_format );
**/
?>
</span>
<span class="infSep kl-blog-post-details-sep"> | </span>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment