Make WordPress Core

Changeset 51279


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.

Location:
trunk/src/wp-includes/rest-api/endpoints
Files:
2 edited

Legend:

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

    r51229 r51279  
    198198     * @since 5.8.0
    199199     *
    200      * @global array $wp_registered_widgets The list of registered widgets.
     200     * @global WP_Widget_Factory $wp_widget_factory
     201     * @global array             $wp_registered_widgets The list of registered widgets.
    201202     *
    202203     * @return array Array of widgets.
     
    412413     * - form:     The widget's admin form after updating the widget with the
    413414     *             given form data.
     415     *
     416     * @global WP_Widget_Factory $wp_widget_factory
    414417     *
    415418     * @param WP_REST_Request $request Full details about the request.
  • 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.