Split strings into variables

This commit is contained in:
Ulrich Pogson 2014-05-01 23:27:08 +02:00
parent 5e62b8dc9e
commit fc9910cf96
1 changed files with 11 additions and 10 deletions

View File

@ -82,17 +82,18 @@ function _s_posted_on() {
esc_html( get_the_modified_date() ) esc_html( get_the_modified_date() )
); );
printf( $posted_on = sprintf(
'<span class="posted-on">' . __( 'Posted on %1$s', '_s' ) . '</span><span class="byline"> ' . __( 'by %2$s', '_s' ) . '</span>', _x( 'Posted on %s', 'post date', '_s' ),
sprintf( '<a href="%1$s" rel="bookmark">%2$s</a>', '<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</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() )
)
); );
$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;