Docs: Document the globals used in WP_REST_Widget_Types_Controller and WP_REST_Widgets_Controller.

Follow-up to [50995].

Props SergeyBiryukov.
Merges [51279] to the 5.8 branch.
See #52628, #53461.
Built from https://develop.svn.wordpress.org/branches/5.8@51310


git-svn-id: http://core.svn.wordpress.org/branches/5.8@50919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj 2021-07-02 18:53:00 +00:00
parent 07533bff1e
commit 8d871746a4
3 changed files with 14 additions and 7 deletions

View File

@ -197,7 +197,8 @@ class WP_REST_Widget_Types_Controller extends WP_REST_Controller {
*
* @since 5.8.0
*
* @global array $wp_registered_widgets The list of registered widgets.
* @global WP_Widget_Factory $wp_widget_factory
* @global array $wp_registered_widgets The list of registered widgets.
*
* @return array Array of widgets.
*/
@ -412,6 +413,8 @@ class WP_REST_Widget_Types_Controller extends WP_REST_Controller {
* - form: The widget's admin form after updating the widget with the
* given form data.
*
* @global WP_Widget_Factory $wp_widget_factory
*
* @param WP_REST_Request $request Full details about the request.
* @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
*/

View File

@ -228,6 +228,8 @@ class WP_REST_Widgets_Controller extends WP_REST_Controller {
*
* @since 5.8.0
*
* @global WP_Widget_Factory $wp_widget_factory
*
* @param WP_REST_Request $request Full details about the request.
* @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
*/
@ -289,14 +291,14 @@ class WP_REST_Widgets_Controller extends WP_REST_Controller {
*
* @since 5.8.0
*
* @global array $wp_registered_widget_updates The registered widget update functions.
* @global WP_Widget_Factory $wp_widget_factory
* @global array $wp_registered_widget_updates The registered widget update functions.
*
* @param WP_REST_Request $request Full details about the request.
* @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
*/
public function delete_item( $request ) {
global $wp_registered_widget_updates, $wp_widget_factory;
global $wp_widget_factory, $wp_registered_widget_updates;
retrieve_widgets();
@ -417,6 +419,9 @@ class WP_REST_Widgets_Controller extends WP_REST_Controller {
*
* @since 5.8.0
*
* @global WP_Widget_Factory $wp_widget_factory
* @global array $wp_registered_widget_updates The registered widget update functions.
*
* @param WP_REST_Request $request Full details about the request.
* @param string $sidebar_id ID of the sidebar the widget belongs to.
*
@ -560,9 +565,8 @@ class WP_REST_Widgets_Controller extends WP_REST_Controller {
*
* @since 5.8.0
*
* @global array $wp_registered_sidebars The registered sidebars.
* @global array $wp_registered_widgets The registered widgets.
* @global array $wp_registered_widget_controls The registered widget controls.
* @global WP_Widget_Factory $wp_widget_factory
* @global array $wp_registered_widgets The registered widgets.
*
* @param array $item An array containing a widget_id and sidebar_id.
* @param WP_REST_Request $request Request object.

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.8-RC1-51308';
$wp_version = '5.8-RC1-51310';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.