forked from mirror/_s
Merge pull request #453 from grappler/translation-strings
_s: Avoid html tags in "Posted on" string.
This commit is contained in:
commit
e24e53e024
|
@ -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;
|
||||
|
||||
|
|
Reference in New Issue