Make WordPress Core


Ignore:
Timestamp:
06/30/2021 12:54:10 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Docs: Document the globals used in WP_REST_Widget_Types_Controller and WP_REST_Widgets_Controller.

Follow-up to [50995].

See #52628, #53461.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.php

    r51277 r51279  
    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.