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() )
|
esc_html( get_the_modified_date() )
|
||||||
);
|
);
|
||||||
|
|
||||||
printf( __( '<span class="posted-on">Posted on %1$s</span><span class="byline"> by %2$s</span>', '_s' ),
|
$posted_on = sprintf(
|
||||||
sprintf( '<a href="%1$s" rel="bookmark">%2$s</a>',
|
_x( 'Posted on %s', 'post date', '_s' ),
|
||||||
esc_url( get_permalink() ),
|
'<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
|
||||||
$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() )
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$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;
|
endif;
|
||||||
|
|
||||||
|
|
Reference in New Issue