Archives block: use align supports flag + add wide/full align support #10706
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
Closes #11416.
This PR updates the Archives block to use
supports: { align }
to add most of its alignment support, and it adds support for thewide
andfull
alignments to the Archives block.Notably, the
align
attribute is still defined in PHP since theenum
property prevents invalid alignment classes from appearing on the front-end. (You can test this by using the Code Editor to modify an existingalign
attribute on the block to have an invalid value and then checking the markup of the resulting post.Types of changes
supports: { align }
to add block alignment support to the block.enum
to thealign
attribute defined inindex.php
to fix an issue inmaster
where you could set invalid values for the attribute, which would result in invalid classes (e.g. "alignbob") on the front-end.edit.js
were incorrectly listed as "Internal dependencies" (which they may have been prior to some stuff being moved into packages). This has been fixed, and the imports are now in alphabetical order.Related PRs