-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
REST API: Expose blocks registered on the server #317
Conversation
We need to add I'm also going to hold off on committing this until the Gutenberg merge happens for 5.5. |
Added comment for tickets and version numbers. |
src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php
Outdated
Show resolved
Hide resolved
src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php
Outdated
Show resolved
Hide resolved
src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php
Outdated
Show resolved
Hide resolved
src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php
Outdated
Show resolved
Hide resolved
src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php
Outdated
Show resolved
Hide resolved
src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php
Outdated
Show resolved
Hide resolved
src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php
Outdated
Show resolved
Hide resolved
src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php
Outdated
Show resolved
Hide resolved
src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php
Outdated
Show resolved
Hide resolved
src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php
Outdated
Show resolved
Hide resolved
src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php
Outdated
Show resolved
Hide resolved
src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php
Outdated
Show resolved
Hide resolved
src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php
Outdated
Show resolved
Hide resolved
I added some comments, I'd also like to see a test that covers all the different fields. There is a test that iterates over all the properties, but only a few are defined. I'd like to see something like |
I am not sure where tests for |
The majority of our controllers have tests that are covered by other areas, yet they are still important so we make sure everything is output as expected. I think the themes controller is a great example of this. |
src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php
Outdated
Show resolved
Hide resolved
src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php
Show resolved
Hide resolved
src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php
Outdated
Show resolved
Hide resolved
src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php
Outdated
Show resolved
Hide resolved
Co-authored-by: Dominik Schilling <dominikschilling+git@gmail.com>
Co-authored-by: Dominik Schilling <dominikschilling+git@gmail.com>
Co-authored-by: Dominik Schilling <dominikschilling+git@gmail.com>
Co-authored-by: Dominik Schilling <dominikschilling+git@gmail.com>
Co-authored-by: Dominik Schilling <dominikschilling+git@gmail.com>
Co-authored-by: Dominik Schilling <dominikschilling+git@gmail.com>
Co-authored-by: Dominik Schilling <dominikschilling+git@gmail.com>
Co-authored-by: Dominik Schilling <dominikschilling+git@gmail.com>
Co-authored-by: Timothy Jacobs <timothy@ironbounddesigns.com>
Co-authored-by: Dominik Schilling <dominikschilling+git@gmail.com>
Co-authored-by: Dominik Schilling <dominikschilling+git@gmail.com>
Co-authored-by: Dominik Schilling <dominikschilling+git@gmail.com>
Merged in 5b90ea4. |
Ported from WordPress/gutenberg#21065
Related post:
https://make.wordpress.org/core/2019/05/27/the-block-registration-api-status-update/
Related GitHub issue:
WordPress/gutenberg#2751
Related Block Registration API technical proposal with all the necessary details is available at:
https://github.com/WordPress/gutenberg/blob/master/docs/rfc/block-registration.md
Trac ticket: https://core.trac.wordpress.org/ticket/47620
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.