WordPress/wp-includes/rest-api/endpoints
desrosj 88309aa27e Widgets: Prevent widgets unintentionally being moved to the inactive sidebar.
This fixes a bug where widgets are unintentionally moved to the `wp_inactive_widgets` sidebar when batch updates occur through the REST API.

When batch requests are processed, only `$_wp_sidebars_widgets is updated by previous calls to `WP_REST_Widgets_Controller::create_item()`. `$sidebars_widgets` is not aware of the new widget’s intended location, and `retrieve_widgets()` mistakenly flags the widget as inactive.

Calling `wp_get_sidebars_widgets()` before `retrieve_widgets()` ensures both global variables match and is intended as a temporary fix until the root cause of the problem can be fixed.

Props zieladam, htmgarcia, timothyblynjacobs.
Fixes #53657.
Built from https://develop.svn.wordpress.org/trunk@51432


git-svn-id: http://core.svn.wordpress.org/trunk@51043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-14 16:45:58 +00:00
..
class-wp-rest-application-passwords-controller.php REST API: Update “object” strings to use the appropriate nouns. 2021-05-25 13:12:58 +00:00
class-wp-rest-attachments-controller.php REST API: Update “object” strings to use the appropriate nouns. 2021-05-25 13:12:58 +00:00
class-wp-rest-autosaves-controller.php Docs: Corrections and improvements to types used in docblocks for symbols, properties, and filters. 2021-07-01 21:02:57 +00:00
class-wp-rest-block-directory-controller.php Docs: Remove an empty line between `@param` and `@return` tags in some newly added REST API methods, per the documentation standards. 2021-06-30 18:43:58 +00:00
class-wp-rest-block-renderer-controller.php Docs: Document the globals used in some REST API methods. 2021-06-30 12:34:56 +00:00
class-wp-rest-block-types-controller.php REST API: Update “object” strings to use the appropriate nouns. 2021-05-25 13:12:58 +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 Docs: Correct documentation for `rest_{$post_type}_query` and `rest_{$taxonomy}_query` filters. 2021-07-01 09:12:59 +00:00
class-wp-rest-controller.php Docs: Document the globals used in some REST API methods. 2021-06-30 12:34:56 +00:00
class-wp-rest-pattern-directory-controller.php Docs: Remove an empty line between `@param` and `@return` tags in some newly added REST API methods, per the documentation standards. 2021-06-30 18:43:58 +00:00
class-wp-rest-plugins-controller.php Docs: Remove an empty line between `@param` and `@return` tags in some newly added REST API methods, per the documentation standards. 2021-06-30 18:43:58 +00:00
class-wp-rest-post-statuses-controller.php REST API: Update “object” strings to use the appropriate nouns. 2021-05-25 13:12:58 +00:00
class-wp-rest-post-types-controller.php REST API: Update “object” strings to use the appropriate nouns. 2021-05-25 13:12:58 +00:00
class-wp-rest-posts-controller.php Docs: Add and correct examples of common names for various dynamic hooks. 2021-07-03 21:42:59 +00:00
class-wp-rest-revisions-controller.php REST API: Update “object” strings to use the appropriate nouns. 2021-05-25 13:12:58 +00:00
class-wp-rest-search-controller.php Docs: Further type corrections and improvements for various docblocks. 2021-07-01 22:02:57 +00:00
class-wp-rest-settings-controller.php REST API: Update “object” strings to use the appropriate nouns. 2021-05-25 13:12:58 +00:00
class-wp-rest-sidebars-controller.php Widgets: Use `wp_sidebar_description()` to retrieve a sidebar’s `description`. 2021-07-12 19:03:57 +00:00
class-wp-rest-site-health-controller.php Security, Site Health: Improve accuracy in messaging about HTTPS support. 2021-01-29 19:10:58 +00:00
class-wp-rest-taxonomies-controller.php REST API: Update “object” strings to use the appropriate nouns. 2021-05-25 13:12:58 +00:00
class-wp-rest-templates-controller.php REST API: Add the `$request` parameter to methods checking permissions. 2021-07-06 15:43:00 +00:00
class-wp-rest-terms-controller.php Docs: Correct documentation for `rest_{$post_type}_query` and `rest_{$taxonomy}_query` filters. 2021-07-01 09:12:59 +00:00
class-wp-rest-themes-controller.php Docs: Remove an empty line between `@param` and `@return` tags in some newly added REST API methods, per the documentation standards. 2021-06-30 18:43:58 +00:00
class-wp-rest-users-controller.php Docs: Document the globals used in some REST API methods. 2021-06-30 12:34:56 +00:00
class-wp-rest-widget-types-controller.php Docs: List the expected type first instead of `WP_Error` in some REST API methods added in 5.8. 2021-06-30 17:59:58 +00:00
class-wp-rest-widgets-controller.php Widgets: Prevent widgets unintentionally being moved to the inactive sidebar. 2021-07-14 16:45:58 +00:00