Fix Archives block alignment and custom class bugs#9696
Merged
youknowriad merged 1 commit intoWordPress:masterfrom Sep 12, 2018
ZebulanStanphill:fix/archives-block-alignment-and-custom-classes
Merged
Fix Archives block alignment and custom class bugs#9696youknowriad merged 1 commit intoWordPress:masterfrom ZebulanStanphill:fix/archives-block-alignment-and-custom-classes
youknowriad merged 1 commit intoWordPress:masterfrom
ZebulanStanphill:fix/archives-block-alignment-and-custom-classes
Conversation
This was referenced Sep 7, 2018
Member
Author
|
I can't figure out what is going wrong with the tests. Any ideas? |
Member
Author
|
Fixed the tests. Thanks for the help, @aduth! 🙂 |
Member
Author
|
Squashed and rebased. Ready for review. |
youknowriad
reviewed
Sep 12, 2018
| 'align' => array( | ||
| 'type' => 'string', | ||
| ), | ||
| 'className' => array( |
Contributor
There was a problem hiding this comment.
Not certain declaring this one is necessary here because there's a hook adding this attribute. Though one could think the hook is only declared on JavaScript which means nothing guarantees that it's available in PHP (which hopefully the server-side awareness work should resolve)
youknowriad
approved these changes
Sep 12, 2018
Contributor
youknowriad
left a comment
There was a problem hiding this comment.
LGTM 👍 Thanks for the tweaks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
This PR fixes two issues:
alignnoneclass when no alignment is set, which is inconsistent with other blocks.It also contains some minor code cleanup, reorganizing attributes alphabetically and using
Array.prototype.includesto check for valid alignments (which is something the Latest Comments block already does), rather than the more verbose and harder-to-read series of||s.