-
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
Add alignment for latest posts block #1803
Conversation
Could we add the alignment on the block itself for consistency? cc @jasmussen |
Yes I think we should, especially since it doesn't have much of a toolbar to begin with. |
@jasmussen ok, so then should the widget block mocks be updated to always have the alignment toolbar with the block instead of the inspector? /cc @melchoyce |
Changes Unknown when pulling 089d62d on add/latest-posts-alignment-2 into ** on master**. |
lib/blocks/latest-posts.php
Outdated
@@ -43,8 +48,10 @@ function gutenberg_render_block_core_latest_posts( $attributes ) { | |||
$posts_content .= "<li><a href='{$post_permalink}'>{$post_title}</a></li>\n"; | |||
} | |||
|
|||
$class = 'blocks-latest-posts ' . esc_attr( 'align' . $align ); |
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.
We should follow the same convention as the frontend blocks to generate the classname. This should be wp-block-latest-posts
Changes Unknown when pulling 293a84f on add/latest-posts-alignment-2 into ** on master**. |
Looks, works great! 👍 👍 |
So ✅ to merge? |
Yup! |
Adds alignment controls:
Also fixes margin/padding of Latest Posts block in editor and frontend.
Replaces #1183.
See #1011.