Skip to content

Commit

Permalink
_s: Include "entry updated" as part of the hAtom. Props @michiecat. See
Browse files Browse the repository at this point in the history
#131, fixes #170.
  • Loading branch information
obenland committed Jun 27, 2013
1 parent 3a5afef commit 39d8f7a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
16 changes: 13 additions & 3 deletions inc/template-tags.php
Expand Up @@ -163,11 +163,21 @@ function _s_the_attached_image() {
* Prints HTML with meta information for the current post-date/time and author.
*/
function _s_posted_on() {
printf( __( 'Posted on <a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a><span class="byline"> by <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span></span>', '_s' ),
esc_url( get_permalink() ),
esc_attr( get_the_time() ),
$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time>';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) )
$time_string .= '<time class="updated" datetime="%3$s">%4$s</time>';

$time_string = sprintf( $time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
);

printf( __( 'Posted on <a href="%1$s" title="%2$s" rel="bookmark">%3$s</a><span class="byline"> by <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s" rel="author">%6$s</a></span></span>', '_s' ),
esc_url( get_permalink() ),
esc_attr( get_the_time() ),
$time_string,
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
esc_attr( sprintf( __( 'View all posts by %s', '_s' ), get_the_author() ) ),
get_the_author()
Expand Down
3 changes: 2 additions & 1 deletion style.css
Expand Up @@ -461,7 +461,8 @@ a:active {
.hentry {
margin: 0 0 1.5em;
}
.byline {
.byline,
.updated {
display: none;
}
.single .byline,
Expand Down

0 comments on commit 39d8f7a

Please sign in to comment.