Make WordPress Core

Changeset 51151


Ignore:
Timestamp:
06/15/2021 10:23:57 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Docs: Document the usage of $wp_embed global in WP_oEmbed_Controller::get_proxy_item().

Follow-up to [48135].

Fixes #52628.

File:
1 edited

Legend:

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

    r49610 r51151  
    160160     *
    161161     * @see WP_oEmbed::get_html()
     162     * @global WP_Embed $wp_embed
     163     *
    162164     * @param WP_REST_Request $request Full data about the request.
    163165     * @return object|WP_Error oEmbed response data or WP_Error on failure.
    164166     */
    165167    public function get_proxy_item( $request ) {
     168        global $wp_embed;
     169
    166170        $args = $request->get_params();
    167171
     
    196200        if ( false === $data ) {
    197201            // Try using a classic embed, instead.
    198             global $wp_embed;
    199 
    200202            /* @var WP_Embed $wp_embed */
    201203            $html = $wp_embed->get_embed_handler_html( $args, $url );
Note: See TracChangeset for help on using the changeset viewer.