WordPress/wp-includes/rest-api/endpoints
TimothyBlynJacobs 41f70ae5f8 REST API: Only register one block renderer route.
Every block has a different set of attributes. These attributes are specified as a JSON Schema object. Previously, every block registered its own block renderer route using its attributes for the schema. This allowed for the attributes to be validated using the built in endpoint validation rules. It had the unfortunate side effect, however, of creating a large number of nearly identical REST API routes, one for each dynamic block. Each registered route has a performance impact. As the number of server side blocks goes up, this becomes more and more of an issue.

Now, we register a single block renderer route and dynamically validate the attributes based on the selected block.

Fixes #48079.
Props gziolo, TimothyBlynJacobs.

Built from https://develop.svn.wordpress.org/trunk@48069


git-svn-id: http://core.svn.wordpress.org/trunk@47836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-17 03:22:12 +00:00
..
class-wp-rest-attachments-controller.php Role/Capability: Use meta caps edit_post, read_post, and delete_post directly. 2020-05-23 15:24:07 +00:00
class-wp-rest-autosaves-controller.php Role/Capability: Use meta caps edit_post, read_post, and delete_post directly. 2020-05-23 15:24:07 +00:00
class-wp-rest-block-renderer-controller.php REST API: Only register one block renderer route. 2020-06-17 03:22:12 +00:00
class-wp-rest-blocks-controller.php Role/Capability: Use meta caps edit_post, read_post, and delete_post directly. 2020-05-23 15:24:07 +00:00
class-wp-rest-comments-controller.php Role/Capability: Use meta caps edit_post, read_post, and delete_post directly. 2020-05-23 15:24:07 +00:00
class-wp-rest-controller.php REST API: Support the (min|max)Items JSON Schema keywords. 2020-06-07 22:42:13 +00:00
class-wp-rest-post-statuses-controller.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:45:18 +00:00
class-wp-rest-post-types-controller.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:45:18 +00:00
class-wp-rest-posts-controller.php Role/Capability: Use meta caps edit_post, read_post, and delete_post directly. 2020-05-23 15:24:07 +00:00
class-wp-rest-revisions-controller.php Role/Capability: Use meta caps edit_post, read_post, and delete_post directly. 2020-05-23 15:24:07 +00:00
class-wp-rest-search-controller.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:45:18 +00:00
class-wp-rest-settings-controller.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:45:18 +00:00
class-wp-rest-taxonomies-controller.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:45:18 +00:00
class-wp-rest-terms-controller.php REST API: Merge "not allowed to create new terms" permission error message with an existing string. 2020-02-02 05:41:03 +00:00
class-wp-rest-themes-controller.php Coding Standards: PHP short ternary operator syntax is not allowed. 2020-06-08 21:27:10 +00:00
class-wp-rest-users-controller.php Docs: Use more specific types in parameter descriptions in place of mixed. 2020-03-01 10:38:07 +00:00