Try making server aware of block variants#1015
Closed
gwwar wants to merge 14 commits intoWordPress:masterfrom
Closed
Try making server aware of block variants#1015gwwar wants to merge 14 commits intoWordPress:masterfrom
gwwar wants to merge 14 commits intoWordPress:masterfrom
Conversation
8 tasks
gziolo
reviewed
Feb 18, 2021
src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php
Outdated
Show resolved
Hide resolved
gziolo
reviewed
Feb 18, 2021
f0adc81 to
6b17d34
Compare
Member
|
This is looking good. I think we should plan to land it in WordPress core short after |
gziolo
reviewed
Feb 23, 2021
src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php
Show resolved
Hide resolved
gwwar
commented
Feb 23, 2021
gwwar
commented
Feb 23, 2021
3561c57 to
50506a8
Compare
gziolo
reviewed
Feb 25, 2021
src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php
Outdated
Show resolved
Hide resolved
gziolo
reviewed
Feb 25, 2021
src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php
Outdated
Show resolved
Hide resolved
gwwar
commented
Feb 26, 2021
Member
|
We need a ticket in Trac to proceed further. As far as I can tell, there are only two remaining changes required:
|
Author
|
Thanks @gziolo @TimothyBJacobs for all the reviews! I think I responded to all feedback, but let me know if I missed any items. I also created a trac ticket: https://core.trac.wordpress.org/ticket/52688#ticket |
Member
|
I'm adding the Trac ticket to my list of items to take care of later this week. I want to wait until WordPress 5.7 is out before committing. Nice work @gwwar ✨ |
5 tasks
Author
|
This landed in 380d044 💖 |
This was referenced Mar 12, 2021
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.
https://core.trac.wordpress.org/ticket/52688
Experiment, required for WordPress/gutenberg#29095
This PR exposes
variationsin the block type definition and adds two new labelsitem_linkanditem_link_descriptionfor post types and taxonomies.Changes here will allow us to populate link navigation variations via
register_block_type_from_metadatawithout needing to update the post type and taxonomy REST APIs to allow filtering byshow_in_nav_menus.Testing Instructions
npm run build)/wp/v2/block-types. Notice how there is a new variations field returned.npm run test:php -- --filter REST_Block_Type_Controller_TestIf you like, also follow test instructions in WordPress/gutenberg#29095.
navigationlink.mp4
Default label behavior