Merge pull request #453 from grappler/translation-strings

_s: Avoid html tags in "Posted on" string.
This commit is contained in:
Konstantin Obenland 2014-06-02 08:28:46 -07:00
commit e24e53e024
1 changed files with 11 additions and 9 deletions

View File

@ -78,16 +78,18 @@ function _s_posted_on() {
esc_html( get_the_modified_date() )
);
printf( __( '<span class="posted-on">Posted on %1$s</span><span class="byline"> by %2$s</span>', '_s' ),
sprintf( '<a href="%1$s" rel="bookmark">%2$s</a>',
esc_url( get_permalink() ),
$time_string
),
sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s">%2$s</a></span>',
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
esc_html( get_the_author() )
)
$posted_on = sprintf(
_x( 'Posted on %s', 'post date', '_s' ),
'<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
);
$byline = sprintf(
_x( 'by %s', 'post author', '_s' ),
'<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author() ) . '</a></span>'
);
echo '<span class="posted-on">' . $posted_on . '</span><span class="byline"> ' . $byline . '</span>';
}
endif;