Skip to content
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

Fix “align center” button in Latest Posts block to add data-align="center" in the editor #12566

Merged
merged 1 commit into from
Dec 20, 2018

Conversation

nickcernis
Copy link
Contributor

@nickcernis nickcernis commented Dec 3, 2018

Resolves #12306, where clicking the center button on the Latest Posts block previously had no effect on the block markup in the admin area.

Description

Adjusts editor wrapper props of the Latest Posts block to include center support.

Mirrors method used by other blocks (such as Latest Comments).

Does not attempt to refactor for efficiency or consistency, as this is covered separately by #7908.

How has this been tested?

Manual test made by:

  1. Adding a Latest Posts block.
  2. Clicking the “align center button”.
  3. Confirming data-align="center" appears on the block in the editor.

Types of changes

  • Bug fix (one-line change)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

Resolves #12306, where clicking the center button on the Latest Posts
block previously had no effect on the block markup in the admin area.
@nickcernis nickcernis changed the title Fix “align center” button to add data-align="center" in the editor Fix “align center” button in Latest Posts block to add data-align="center" in the editor Dec 4, 2018
Copy link
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution @nickcernis! LGTM 👍

@jorgefilipecosta jorgefilipecosta added this to the 4.8 milestone Dec 4, 2018
@gziolo gziolo added [Type] Bug An existing feature does not function as intended [Block] Latest Posts Affects the Latest Posts Block labels Dec 14, 2018
@youknowriad youknowriad merged commit 481a56d into WordPress:master Dec 20, 2018
youknowriad pushed a commit that referenced this pull request Jan 3, 2019
…12566)

Resolves #12306, where clicking the center button on the Latest Posts
block previously had no effect on the block markup in the admin area.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Latest Posts Affects the Latest Posts Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Latest Posts block “align center” has no effect in admin
4 participants