Make WordPress Core


Ignore:
Timestamp:
11/13/2022 01:49:16 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Docs: Document the usage of globals in some functions.

This affects:

  • the_block_editor_meta_boxes()
  • wp_generate_block_templates_export_file()
  • WP_oEmbed_Controller::get_proxy_item()

Follow-up to [44131], [48135], [51151], [53129].

Props krunal265.
Fixes #57082.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-oembed-controller.php

    r54133 r54831  
    161161         *
    162162         * @see WP_oEmbed::get_html()
    163          * @global WP_Embed $wp_embed
     163         * @global WP_Embed   $wp_embed
     164         * @global WP_Scripts $wp_scripts
    164165         *
    165166         * @param WP_REST_Request $request Full data about the request.
    … …  
    167168         */
    168169        public function get_proxy_item( $request ) {
    169                 global $wp_embed;
     170                global $wp_embed, $wp_scripts;
    170171
    171172                $args = $request->get_params();
    … …  
    205206
    206207                        if ( $html ) {
    207                                 global $wp_scripts;
    208208                                // Check if any scripts were enqueued by the shortcode, and include them in the response.
    209209                                $enqueued_scripts = array();
Note: See TracChangeset for help on using the changeset viewer.