_s: Continue using a default `time` tag.

We only need to change the default markup if published and updated
timestamps are different.
This commit is contained in:
Konstantin Obenland 2014-07-30 14:47:16 -05:00
parent 048057ad68
commit 0d87d0bb70
1 changed files with 2 additions and 4 deletions

View File

@ -66,11 +66,9 @@ if ( ! function_exists( '_s_posted_on' ) ) :
* Prints HTML with meta information for the current post-date/time and author. * Prints HTML with meta information for the current post-date/time and author.
*/ */
function _s_posted_on() { function _s_posted_on() {
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time>';
$time_string .= '<time class="updated" datetime="%3$s">%4$s</time>';
} else {
$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</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, $time_string = sprintf( $time_string,