WordPress/wp-includes
TimothyBlynJacobs 499e4e9053 REST API: Introduce support for batching API requests.
A new route is introduced, `batch/v1`, that accepts a list of API requests to run. Each request runs in sequence, and the responses are returned in the order they've been received.

Optionally, the `require-all-validate` validation mode can be used to first validate each request's parameters and only proceed with processing if each request validates successfully.

By default, the batch size is limited to 25 requests. This can be controlled using the `rest_get_max_batch_size` filter. Clients are strongly encouraged to discover the maximum batch size supported by the server by making an OPTIONS request to the `batch/v1` endpoint and inspecting the described arguments.

Additionally, the two new methods, `match_request_to_handler` and `respond_to_request` introduced in [48947] now have a `protected` visibility as we don't want to expose the inner workings of the `WP_REST_Server::dispatch` API.

Batching is not currently supported for GET requests.

Fixes #50244.
Props andraganescu, zieladam, TimothyBlynJacobs.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 19:10:08 +00:00
..
assets Block Editor: Update the WordPress Packages to the latest version. 2020-10-20 13:36:16 +00:00
block-patterns Editor: Remove some hardcoded text color values from patterns that have body text with no specific background color. 2020-08-26 13:34:03 +00:00
block-supports Block Editor: Update the WordPress Packages to the latest version. 2020-10-20 13:36:16 +00:00
blocks Block Editor: Update the WordPress Packages to the latest version. 2020-10-20 13:36:16 +00:00
certificates HTTP: Update the Root Certificate bundle. 2020-08-01 14:09:06 +00:00
css Block Editor: Update the WordPress Packages to the latest version. 2020-10-20 13:36:16 +00:00
customize General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
fonts Administration: Reverse the arrow direction for database import/export icons. 2020-07-17 17:11:03 +00:00
ID3
images
IXR
js Emoji: Update Twemoji to version 13.0.1. 2020-10-20 16:55:23 +00:00
PHPMailer External Libraries: Upgrade PHPMailer to version 6.1.8. 2020-10-13 14:00:10 +00:00
pomo Code Modernization: Remove unnecessary reference sign from PO::export_entry() definition. 2020-10-18 06:29:05 +00:00
random_compat
Requests
rest-api REST API: Introduce support for batching API requests. 2020-10-20 19:10:08 +00:00
SimplePie External Libraries: Update the SimplePie library to version 1.5.6. 2020-10-16 17:20:07 +00:00
sitemaps Sitemaps: Center the container for sitemap content. 2020-10-20 02:22:07 +00:00
sodium_compat External Libraries: Backport a commit from sodium_compat trunk to fix a PHP 8 error. 2020-09-27 05:17:05 +00:00
Text Code Modernization: Use instanceof instead of a comparison with get_class(). 2020-10-18 17:33:07 +00:00
theme-compat
widgets General: Remove noreferrer from wp_targeted_link_rel() and other uses. 2020-10-19 23:39:04 +00:00
admin-bar.php Docs: First pass at some inline docs fixes mostly made by PHPCBF. 2020-07-23 20:01:04 +00:00
atomlib.php Feeds: Fix "Only variables should be passed by reference" PHP notice in atomlib.php. 2020-10-17 15:45:06 +00:00
author-template.php Docs: Further corrections and improvements to various inline docblocks. 2020-07-23 07:39:02 +00:00
block-patterns.php Block Editor: Update the Core Block Patterns. 2020-07-27 15:14:04 +00:00
blocks.php Block Editor: Update the WordPress Packages to the latest version. 2020-10-20 13:36:16 +00:00
bookmark-template.php Coding Standards: Replace alias PHP functions with the canonical names. 2020-10-18 17:27:06 +00:00
bookmark.php Docs: Miscellaneous DocBlock corrections. 2020-07-23 21:55:04 +00:00
cache-compat.php
cache.php Docs: First pass at some inline docs fixes mostly made by PHPCBF. 2020-07-23 20:01:04 +00:00
canonical.php Canonical: Support multiple post types in redirect_guess_404_permalink(). 2020-10-18 23:23:05 +00:00
capabilities.php Taxonomy: Rename the default_taxonomy_$taxonomy option key to default_term_$taxonomy. 2020-07-28 15:42:07 +00:00
category-template.php Coding Standards: Replace alias PHP functions with the canonical names. 2020-10-18 17:27:06 +00:00
category.php Docs: Miscellaneous DocBlock corrections. 2020-07-23 21:55:04 +00:00
class-feed.php
class-http.php Docs: Standardise the type name for booleans and integers. 2020-10-10 20:02:05 +00:00
class-IXR.php
class-json.php Code Modernization: Use instanceof instead of a comparison with get_class(). 2020-10-18 17:33:07 +00:00
class-oembed.php
class-phpass.php
class-phpmailer.php Mail: Make sure the PHPMailer class is only required once if a plugin requires wp-includes/class-phpmailer.php directly. 2020-07-21 12:58:02 +00:00
class-pop3.php
class-requests.php
class-simplepie.php External Libraries: Update the SimplePie library to version 1.5.6. 2020-10-16 17:20:07 +00:00
class-smtp.php
class-snoopy.php
class-walker-category-dropdown.php Docs: Fix and upgrade various object docblock notations. 2020-10-17 16:05:09 +00:00
class-walker-category.php Docs: Fix and upgrade various object docblock notations. 2020-10-17 16:05:09 +00:00
class-walker-comment.php Comments: Further remove unnecessary context switch in Walker_Comment. 2020-10-15 15:26:05 +00:00
class-walker-nav-menu.php General: Remove noreferrer from wp_targeted_link_rel() and other uses. 2020-10-19 23:39:04 +00:00
class-walker-page-dropdown.php
class-walker-page.php
class-wp-admin-bar.php Docs: Improve description for WP_Admin_Bar::add_group(). 2020-08-19 02:46:04 +00:00
class-wp-ajax-response.php
class-wp-application-passwords.php REST API: Introduce Application Passwords for API authentication. 2020-10-08 22:14:06 +00:00
class-wp-block-list.php
class-wp-block-parser.php Editor: update packages; Port block supports to WordPress core. 2020-10-13 13:10:30 +00:00
class-wp-block-pattern-categories-registry.php
class-wp-block-patterns-registry.php
class-wp-block-styles-registry.php Docs: Standardise the type name for booleans and integers. 2020-10-10 20:02:05 +00:00
class-wp-block-supports.php Block Editor: Update the WordPress Packages to the latest version. 2020-10-20 13:36:16 +00:00
class-wp-block-type-registry.php Docs: Add a note that the $args parameter of register_block_type() accepts any public property of WP_Block_Type. 2020-07-26 22:17:01 +00:00
class-wp-block-type.php Block Editor: Expose api_version in the block type and the REST endpoint. 2020-10-20 07:54:10 +00:00
class-wp-block.php Block Editor: Update the WordPress Packages to the latest version. 2020-10-20 13:36:16 +00:00
class-wp-comment-query.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
class-wp-comment.php Docs: Various docblock corrections and improvements. 2020-09-04 20:41:07 +00:00
class-wp-customize-control.php Docs: Miscellaneous docblock fixes. 2020-10-17 14:54:05 +00:00
class-wp-customize-manager.php Coding Standards: Replace alias PHP functions with the canonical names. 2020-10-18 17:27:06 +00:00
class-wp-customize-nav-menus.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
class-wp-customize-panel.php
class-wp-customize-section.php
class-wp-customize-setting.php Docs: Another pass at some inline docs fixes mostly made by PHPCBF. 2020-07-23 21:11:05 +00:00
class-wp-customize-widgets.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
class-wp-date-query.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
class-wp-dependency.php Docs: Various corrections to inline docblocks. 2020-07-23 00:48:06 +00:00
class-wp-editor.php Docs: First pass at some inline docs fixes mostly made by PHPCBF. 2020-07-23 20:01:04 +00:00
class-wp-embed.php Docs: First pass at some inline docs fixes mostly made by PHPCBF. 2020-07-23 20:01:04 +00:00
class-wp-error.php General: Docblock improvements for the WP_Error class. 2020-10-09 22:30:04 +00:00
class-wp-fatal-error-handler.php
class-wp-feed-cache-transient.php
class-wp-feed-cache.php
class-wp-hook.php Docs: Standardise the type name for booleans and integers. 2020-10-10 20:02:05 +00:00
class-wp-http-cookie.php Docs: Further corrections and improvements to various inline docblocks. 2020-07-23 07:39:02 +00:00
class-wp-http-curl.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
class-wp-http-encoding.php
class-wp-http-ixr-client.php Docs: First pass at some inline docs fixes mostly made by PHPCBF. 2020-07-23 20:01:04 +00:00
class-wp-http-proxy.php
class-wp-http-requests-hooks.php Docs: Standardise the type name for booleans and integers. 2020-10-10 20:02:05 +00:00
class-wp-http-requests-response.php
class-wp-http-response.php
class-wp-http-streams.php Docs: First pass at some inline docs fixes mostly made by PHPCBF. 2020-07-23 20:01:04 +00:00
class-wp-image-editor-gd.php Media: Return a WP_Error from WP_Image_Editor_GD::load() if file contents could not be retrieved. 2020-09-20 14:28:05 +00:00
class-wp-image-editor-imagick.php Docs: Use 3-digit, x.x.x style semantic versioning for @since 5.6.0 entries in WP_Image_Editor_Imagick. 2020-10-20 14:54:04 +00:00
class-wp-image-editor.php Media: Support Stream Wrappers In WP_Image_Editor_Imagick 2020-10-20 14:37:05 +00:00
class-wp-list-util.php
class-wp-locale-switcher.php I18N: Introduce WP_Textdomain_Registry to store text domains and their language directory paths. 2020-10-20 16:05:07 +00:00
class-wp-locale.php Docs: Update the URL for PHP date formats table in translator comments. 2020-09-18 10:37:08 +00:00
class-wp-matchesmapregex.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
class-wp-meta-query.php Docs: Improve docs for arguments that accept a numerically indexed array of associative arrays. 2020-07-14 12:10:05 +00:00
class-wp-metadata-lazyloader.php
class-wp-network-query.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
class-wp-network.php
class-wp-object-cache.php
class-wp-oembed-controller.php REST API: Issue a _doing_it_wrong when registering a route without a permission callback. 2020-07-21 12:03:05 +00:00
class-wp-oembed.php Code Modernization: Only call libxml_disable_entity_loader() in PHP < 8. 2020-08-12 15:25:03 +00:00
class-wp-paused-extensions-storage.php
class-wp-post-type.php Docs: Miscellaneous docblock corrections and improvements. 2020-07-13 22:10:07 +00:00
class-wp-post.php Docs: Various docblock corrections and improvements. 2020-09-04 20:41:07 +00:00
class-wp-query.php Coding Standards: Replace alias PHP functions with the canonical names. 2020-10-18 17:27:06 +00:00
class-wp-recovery-mode-cookie-service.php Docs: Consistently use third-person singular verbs for various filter descriptions, per the documentation standards. 2020-08-11 00:34:08 +00:00
class-wp-recovery-mode-email-service.php Docs: Add a @since note for the recovery_mode_email filter about the $email argument now including the attachments key. 2020-09-18 11:03:02 +00:00
class-wp-recovery-mode-key-service.php
class-wp-recovery-mode-link-service.php Docs: Consistently use third-person singular verbs for various filter descriptions, per the documentation standards. 2020-08-11 00:34:08 +00:00
class-wp-recovery-mode.php Docs: Consistently use third-person singular verbs for various filter descriptions, per the documentation standards. 2020-08-11 00:34:08 +00:00
class-wp-rewrite.php Code Modernization: Use explicit visibility for class property declarations. 2020-10-17 16:26:09 +00:00
class-wp-role.php Docs: Various formatting improvements to inline docblocks. 2020-07-23 00:52:05 +00:00
class-wp-roles.php Docs: First pass at some inline docs fixes mostly made by PHPCBF. 2020-07-23 20:01:04 +00:00
class-wp-session-tokens.php Code Modernization: Remove final keyword from private methods. 2020-08-12 15:05:08 +00:00
class-wp-simplepie-file.php Docs: Standardise the type name for booleans and integers. 2020-10-10 20:02:05 +00:00
class-wp-simplepie-sanitize-kses.php Docs: Standardise the type name for booleans and integers. 2020-10-10 20:02:05 +00:00
class-wp-site-query.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
class-wp-site.php Multisite: Improve performance by caching not found lookups for sites and networks. 2019-08-29 12:42:56 +00:00
class-wp-tax-query.php Docs: Improve docs for arguments that accept a numerically indexed array of associative arrays. 2020-07-14 12:10:05 +00:00
class-wp-taxonomy.php Taxonomy: Fix warnings thrown by custom term count callbacks. 2020-10-16 02:43:06 +00:00
class-wp-term-query.php Docs: Clarify documentation for what the 'count' orderby argument represents in WP_Term_Query. 2020-10-18 08:23:06 +00:00
class-wp-term.php
class-wp-text-diff-renderer-inline.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-text-diff-renderer-table.php Coding Standards: Replace alias PHP functions with the canonical names. 2020-10-18 17:27:06 +00:00
class-wp-textdomain-registry.php I18N: Introduce WP_Textdomain_Registry to store text domains and their language directory paths. 2020-10-20 16:05:07 +00:00
class-wp-theme.php Bundled Themes: Make Twenty Twenty-One the default theme. 2020-10-20 02:04:07 +00:00
class-wp-user-meta-session-tokens.php
class-wp-user-query.php Coding Standards: Replace alias PHP functions with the canonical names. 2020-10-18 17:27:06 +00:00
class-wp-user-request.php
class-wp-user.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
class-wp-walker.php Docs: Another pass at some inline docs fixes mostly made by PHPCBF. 2020-07-23 21:11:05 +00:00
class-wp-widget-factory.php
class-wp-widget.php Docs: Standardise the type name for booleans and integers. 2020-10-10 20:02:05 +00:00
class-wp-xmlrpc-server.php Docs: Fix and upgrade various object docblock notations. 2020-10-17 16:05:09 +00:00
class-wp.php Docs: Synchronize descriptions of some query functions and their counterpart methods in WP and WP_Query classes: 2020-10-06 08:59:04 +00:00
class.wp-dependencies.php
class.wp-scripts.php Script Loader: Disable concatenation for scripts with translations to ensure they are printed in the right order. 2020-08-27 21:58:04 +00:00
class.wp-styles.php
comment-template.php Coding Standards: Replace alias PHP functions with the canonical names. 2020-10-18 17:27:06 +00:00
comment.php General: Remove noreferrer from wp_targeted_link_rel() and other uses. 2020-10-19 23:39:04 +00:00
compat.php Coding Standards: Replace alias PHP functions with the canonical names. 2020-10-18 17:27:06 +00:00
cron.php Docs: Consistently use third-person singular verbs for various filter descriptions, per the documentation standards. 2020-08-11 00:34:08 +00:00
date.php
default-constants.php Bundled Themes: Make Twenty Twenty-One the default theme. 2020-10-20 02:04:07 +00:00
default-filters.php Block Editor: Update the WordPress Packages to the latest version. 2020-10-20 13:36:16 +00:00
default-widgets.php
deprecated.php I18N: Introduce WP_Textdomain_Registry to store text domains and their language directory paths. 2020-10-20 16:05:07 +00:00
embed-template.php
embed.php Embeds: Only catch clicks from the primary mouse button in the click handler, without any modifier keys. 2020-10-19 13:36:08 +00:00
error-protection.php
feed-atom-comments.php
feed-atom.php
feed-rdf.php
feed-rss2-comments.php Docs: Use more appropriate variable names in the inline docs for action and filter parameters. 2020-07-23 19:06:03 +00:00
feed-rss2.php
feed-rss.php
feed.php
formatting.php Emoji: Update Twemoji to version 13.0.1. 2020-10-20 16:55:23 +00:00
functions.php General: Add $options parameter to JSON response functions: 2020-10-20 15:56:08 +00:00
functions.wp-scripts.php Docs: Another pass at some inline docs fixes mostly made by PHPCBF. 2020-07-23 21:11:05 +00:00
functions.wp-styles.php
general-template.php Coding Standards: Replace alias PHP functions with the canonical names. 2020-10-18 17:27:06 +00:00
http.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
kses.php Docs: Various corrections to inline docblocks. 2020-07-23 00:48:06 +00:00
l10n.php I18N: Introduce WP_Textdomain_Registry to store text domains and their language directory paths. 2020-10-20 16:05:07 +00:00
link-template.php Media: Allow hiding of ‘View attachment page’ link in media modal. 2020-10-20 02:29:06 +00:00
load.php Bootstrap/Load: Don't assume WP_CONTENT_DIR is defined. 2020-10-15 21:16:10 +00:00
locale.php
media-template.php Media: Indicate if item is or was used as a site option in the details modal. 2020-10-20 03:14:06 +00:00
media.php Media: Introduce a filter for wp_get_attachment_image() HTML output. 2020-10-20 15:31:06 +00:00
meta.php Coding Standards: Replace alias PHP functions with the canonical names. 2020-10-18 17:27:06 +00:00
ms-blogs.php Docs: Fix and upgrade various object docblock notations. 2020-10-17 16:05:09 +00:00
ms-default-constants.php
ms-default-filters.php
ms-deprecated.php
ms-files.php
ms-functions.php Coding Standards: Use more specific checks for $wpdb->get_row() results. 2020-10-19 20:20:04 +00:00
ms-load.php Docs: Further corrections and promotions for docblocks relating to object types. 2020-10-18 20:53:08 +00:00
ms-network.php Coding Standards: Replace alias PHP functions with the canonical names. 2020-10-18 17:27:06 +00:00
ms-settings.php
ms-site.php Coding Standards: Replace alias PHP functions with the canonical names. 2020-10-18 17:27:06 +00:00
nav-menu-template.php
nav-menu.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
option.php Docs: Another pass at some inline docs fixes mostly made by PHPCBF. 2020-07-23 21:11:05 +00:00
pluggable-deprecated.php
pluggable.php Coding Standards: Replace alias PHP functions with the canonical names. 2020-10-18 17:27:06 +00:00
plugin.php Docs: Improve the docs for the globals that are used in the actions and filters API. 2020-10-18 19:19:06 +00:00
post-formats.php Docs: Fix and upgrade various object docblock notations. 2020-10-17 16:05:09 +00:00
post-template.php Coding Standards: Replace alias PHP functions with the canonical names. 2020-10-18 17:27:06 +00:00
post-thumbnail-template.php Media: Standardise the description for image size parameters. 2020-09-20 16:23:07 +00:00
post.php Multisite: More specific caching for get_dirsize. 2020-10-19 21:51:06 +00:00
query.php Docs: Further corrections and promotions for docblocks relating to object types. 2020-10-18 20:53:08 +00:00
registration-functions.php Docs: Add missing @deprecated tags in the file docblock of some deprecated files. 2019-10-08 17:19:04 +00:00
registration.php
rest-api.php REST API: Add support for the oneOf and anyOf keywords. 2020-10-20 18:24:09 +00:00
revision.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
rewrite.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
rss-functions.php Code Modernization: Replace dirname( __FILE__ ) calls with __DIR__ magic constant. 2020-02-06 06:33:11 +00:00
rss.php
script-loader.php External Libraries: Update React, ReactDOM and Lodash. 2020-10-15 23:08:26 +00:00
session.php Code Modernization: Replace dirname( __FILE__ ) calls with __DIR__ magic constant. 2020-02-06 06:33:11 +00:00
shortcodes.php Coding Standards: Replace alias PHP functions with the canonical names. 2020-10-18 17:27:06 +00:00
sitemaps.php Sitemaps: Prevent incorrect redirection of paged sitemap requests. 2020-08-27 01:30:04 +00:00
spl-autoload-compat.php
taxonomy.php Coding Standards: Replace alias PHP functions with the canonical names. 2020-10-18 17:27:06 +00:00
template-loader.php
template.php
theme.php Themes: Add a return value to set_theme_mod() to allow for error handling. 2020-10-19 22:45:03 +00:00
update.php Upgrade/Install: Allow WordPress sites to opt-in to beta & RC releases. 2020-10-20 17:56:06 +00:00
user.php Docs: Further corrections and promotions for docblocks relating to object types. 2020-10-18 20:53:08 +00:00
vars.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
version.php REST API: Introduce support for batching API requests. 2020-10-20 19:10:08 +00:00
widgets.php Widgets: Introduce before_sidebar and after_sidebar arguments for register_sidebar(). 2020-10-19 15:40:09 +00:00
wlwmanifest.xml
wp-db.php Code Modernization: Use explicit visibility for class property declarations. 2020-10-17 16:26:09 +00:00
wp-diff.php