-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Latest post block iteration #13698
Conversation
fb26a53
to
8556628
Compare
|
||
{ displayPostAuthor && | ||
<span className="wp-block-latest-posts__post-author"> | ||
{ __( 'by' ) } { post._embedded.author[ 0 ].name } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use sprintf
here and add a translator comment.
ff2b3d0
to
8338b08
Compare
if( isset( $attributes['displayPostAuthor'] ) && $attributes['displayPostAuthor']) { | ||
$list_items_markup .= sprintf( | ||
'<span class="wp-block-latest-posts__post-author">%1$s %2$s</span>', | ||
__( 'by' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as in the JS, sprintf
is needed here.
@ajitbohra I've left feedback here which you might find useful #14627 (comment) Also are you still actively working on this PR? |
Closing this PR as most of the work here overlaps with #14627 which is already merged. |
Fixes #1594
Work In Progress