Make WordPress Core


Ignore:
Timestamp:
12/14/2018 03:19:48 AM (6 years ago)
Author:
pento
Message:

Embeds: Filter HTML response in oEmbed proxy controller.

Adapts the response from WP_oEmbed_Controller::get_proxy_item() so that the response is correctly filtered and embeds work properly in JavaSccript editors. Introduces new get_oembed_response_data_for_url() function for preparing internal oEmbed responses.

Merges [43810] from the 5.0 branch to trunk.

Props danielbachhuber, imath, swissspidy.
Fixes #45142.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-includes/class-oembed.php

    r43571 r44154  
    405405         * @since 2.9.0
    406406         *
    407          * @param string $data The returned oEmbed HTML.
    408          * @param string $url  URL of the content to be embedded.
    409          * @param array  $args Optional arguments, usually passed from a shortcode.
     407         * @param string|false $data The returned oEmbed HTML (false if unsafe).
     408         * @param string       $url  URL of the content to be embedded.
     409         * @param array        $args Optional arguments, usually passed from a shortcode.
    410410         */
    411411        return apply_filters( 'oembed_result', $this->data2html( $data, $url ), $url, $args );
Note: See TracChangeset for help on using the changeset viewer.