Make WordPress Core


Ignore:
Timestamp:
07/02/2021 06:51:12 PM (3 years ago)
Author:
desrosj
Message:

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.

Location:
branches/5.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.8

  • branches/5.8/src/wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.php

    r51290 r51310  
    229229     * @since 5.8.0
    230230     *
     231     * @global WP_Widget_Factory $wp_widget_factory
     232     *
    231233     * @param WP_REST_Request $request Full details about the request.
    232234     * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
     
    290292     * @since 5.8.0
    291293     *
     294     * @global WP_Widget_Factory $wp_widget_factory
    292295     * @global array             $wp_registered_widget_updates The registered widget update functions.
    293      * @global WP_Widget_Factory $wp_widget_factory
    294296     *
    295297     * @param WP_REST_Request $request Full details about the request.
     
    297299     */
    298300    public function delete_item( $request ) {
    299         global $wp_registered_widget_updates, $wp_widget_factory;
     301        global $wp_widget_factory, $wp_registered_widget_updates;
    300302
    301303        retrieve_widgets();
     
    417419     *
    418420     * @since 5.8.0
     421     *
     422     * @global WP_Widget_Factory $wp_widget_factory
     423     * @global array             $wp_registered_widget_updates The registered widget update functions.
    419424     *
    420425     * @param WP_REST_Request $request    Full details about the request.
     
    561566     * @since 5.8.0
    562567     *
    563      * @global array $wp_registered_sidebars        The registered sidebars.
    564      * @global array $wp_registered_widgets         The registered widgets.
    565      * @global array $wp_registered_widget_controls The registered widget controls.
     568     * @global WP_Widget_Factory $wp_widget_factory
     569     * @global array             $wp_registered_widgets The registered widgets.
    566570     *
    567571     * @param array           $item    An array containing a widget_id and sidebar_id.
Note: See TracChangeset for help on using the changeset viewer.