mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@54831 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -160,13 +160,14 @@ final class WP_oEmbed_Controller {
|
||||
* @since 4.8.0
|
||||
*
|
||||
* @see WP_oEmbed::get_html()
|
||||
* @global WP_Embed $wp_embed
|
||||
* @global WP_Embed $wp_embed
|
||||
* @global WP_Scripts $wp_scripts
|
||||
*
|
||||
* @param WP_REST_Request $request Full data about the request.
|
||||
* @return object|WP_Error oEmbed response data or WP_Error on failure.
|
||||
*/
|
||||
public function get_proxy_item( $request ) {
|
||||
global $wp_embed;
|
||||
global $wp_embed, $wp_scripts;
|
||||
|
||||
$args = $request->get_params();
|
||||
|
||||
@@ -204,7 +205,6 @@ final class WP_oEmbed_Controller {
|
||||
$html = $wp_embed->get_embed_handler_html( $args, $url );
|
||||
|
||||
if ( $html ) {
|
||||
global $wp_scripts;
|
||||
// Check if any scripts were enqueued by the shortcode, and include them in the response.
|
||||
$enqueued_scripts = array();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user