From 00570514d4f31d39a33088100b449e73952bf46e Mon Sep 17 00:00:00 2001 From: Slobodan Manic Date: Sun, 15 Jun 2014 13:20:06 +0200 Subject: [PATCH 1/2] Adds .updated class to .entry-date when needed --- inc/template-tags.php | 4 +++- style.css | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/inc/template-tags.php b/inc/template-tags.php index 0ff39e25..74d43599 100644 --- a/inc/template-tags.php +++ b/inc/template-tags.php @@ -66,9 +66,11 @@ if ( ! function_exists( '_s_posted_on' ) ) : * Prints HTML with meta information for the current post-date/time and author. */ function _s_posted_on() { - $time_string = ''; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { + $time_string = ''; $time_string .= ''; + } else { + $time_string = ''; } $time_string = sprintf( $time_string, diff --git a/style.css b/style.css index a61fe8d6..2b7ed521 100644 --- a/style.css +++ b/style.css @@ -555,7 +555,7 @@ a:active { margin: 0 0 1.5em; } .byline, -.updated { +.updated:not(.published) { display: none; } .single .byline, From 0d87d0bb7005b880221febfabc4025f725f40bc2 Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Wed, 30 Jul 2014 14:47:16 -0500 Subject: [PATCH 2/2] _s: Continue using a default `time` tag. We only need to change the default markup if published and updated timestamps are different. --- inc/template-tags.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/inc/template-tags.php b/inc/template-tags.php index 04b0637f..d28fdfc1 100644 --- a/inc/template-tags.php +++ b/inc/template-tags.php @@ -66,11 +66,9 @@ if ( ! function_exists( '_s_posted_on' ) ) : * Prints HTML with meta information for the current post-date/time and author. */ function _s_posted_on() { + $time_string = ''; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { - $time_string = ''; - $time_string .= ''; - } else { - $time_string = ''; + $time_string = ''; } $time_string = sprintf( $time_string,