_s: Include "entry updated" as part of the hAtom. Props @michiecat. See

#131, fixes #170.
This commit is contained in:
obenland 2013-06-27 06:54:02 -07:00
parent 3a5afef198
commit 39d8f7ad61
2 changed files with 15 additions and 4 deletions

View File

@ -163,11 +163,21 @@ if ( ! function_exists( '_s_posted_on' ) ) :
* 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()

View File

@ -461,7 +461,8 @@ a:active {
.hentry {
margin: 0 0 1.5em;
}
.byline {
.byline,
.updated {
display: none;
}
.single .byline,