WordPress/wp-includes/rest-api/endpoints
hellofromTonya 1cca8be49f REST API: Fixes /wp/v2/pattern-directory/patterns endpoint response for slug parameter.
[53218] introduced a bug of a wrong response from the `wp/v2/pattern-directory/patterns` endpoint with a `slug` parameter. As the response is cached, it can result in an incorrect list of available patterns supported by the current theme.

This commit resolves by:

* Limiting the `slug` to an `array` in the query parameters.
* When set, parsing and sorting the slug(s) and then serializing the sorted query args as part of the hashed transient keys.

Props antonvlasenko, timothyblynjacobs, spacedmonkey, costdev, hellofromTonya.

Follow-up to [53218], [53152], [51208].
Fixes #55617.
Built from https://develop.svn.wordpress.org/trunk@53333


git-svn-id: http://core.svn.wordpress.org/trunk@52922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-02 14:00:09 +00:00
..
class-wp-rest-application-passwords-controller.php
class-wp-rest-attachments-controller.php
class-wp-rest-autosaves-controller.php
class-wp-rest-block-directory-controller.php REST API: Correct the schema for the wp/v2/block-directory/search endpoint. 2022-04-29 16:55:13 +00:00
class-wp-rest-block-pattern-categories-controller.php Docs: Various docblock corrections and improvements for changes introduced in 6.0. 2022-04-28 09:59:13 +00:00
class-wp-rest-block-patterns-controller.php Docs: Various docblock corrections and improvements for changes introduced in 6.0. 2022-04-28 09:59:13 +00:00
class-wp-rest-block-renderer-controller.php
class-wp-rest-block-types-controller.php Coding Standards: Correct alignment in various files. 2022-04-17 15:07:08 +00:00
class-wp-rest-blocks-controller.php
class-wp-rest-comments-controller.php
class-wp-rest-controller.php
class-wp-rest-edit-site-export-controller.php
class-wp-rest-global-styles-controller.php Coding Standards: Correct alignment in various files. 2022-04-17 15:07:08 +00:00
class-wp-rest-menu-items-controller.php
class-wp-rest-menu-locations-controller.php
class-wp-rest-menus-controller.php
class-wp-rest-pattern-directory-controller.php REST API: Fixes /wp/v2/pattern-directory/patterns endpoint response for slug parameter. 2022-05-02 14:00:09 +00:00
class-wp-rest-plugins-controller.php
class-wp-rest-post-statuses-controller.php
class-wp-rest-post-types-controller.php
class-wp-rest-posts-controller.php
class-wp-rest-revisions-controller.php
class-wp-rest-search-controller.php
class-wp-rest-settings-controller.php
class-wp-rest-sidebars-controller.php
class-wp-rest-site-health-controller.php
class-wp-rest-taxonomies-controller.php
class-wp-rest-templates-controller.php
class-wp-rest-terms-controller.php
class-wp-rest-themes-controller.php
class-wp-rest-url-details-controller.php Docs: Formatting corrections for various docblocks. 2022-04-29 19:24:09 +00:00
class-wp-rest-users-controller.php
class-wp-rest-widget-types-controller.php
class-wp-rest-widgets-controller.php