WordPress.org

Make WordPress Core

Opened 2 months ago

Last modified 10 days ago

#51471 assigned defect (bug)

pre_oembed_result filter missing from oembed proxy controller

Reported by: Bernhard Reiter Owned by: pento
Milestone: 5.7 Priority: normal
Severity: normal Version:
Component: Embeds Keywords: has-patch
Focuses: rest-api Cc:

Description

WP_oEmbed::get_html() applies the pre_oembed_result filter, allowing it to short-circuit the actual request to the oEmbed provider's REST API.

That same filter is however missing from WP_oEmbed_Controller::get_proxy_item(). (Note that both WP_oEmbed::get_html() and WP_oEmbed_Controller::get_proxy_item() are otherwise quite similar, sharing the get_data() and data2html() calls, and oembed_result filter.)

It's arguable that the oembed REST API endpoint should allow for the same kind of filtering as the oEmbed class.

This issue seems somewhat similar to #45142, which was about the oembed_result filter.

cc @swisspidy @danielbachhuber

Change History (2)

This ticket was mentioned in PR #575 on WordPress/wordpress-develop by ockham.


2 months ago

  • Keywords has-patch added

`WP_oEmbed::get_html()` applies the pre_oembed_result filter, allowing it to short-circuit the actual request to the oEmbed provider's REST API.

That same filter is however missing from `WP_oEmbed_Controller::get_proxy_item()`. (Note that both WP_oEmbed::get_html() and WP_oEmbed_Controller::get_proxy_item() are otherwise quite similar, sharing the get_data() and data2html() calls, and oembed_result filter.)

It's arguable that the oembed REST API endpoint should allow for the same kind of filtering as the oEmbed class.

This issue seems somewhat similar to Core ticket 45142, which was about the oembed_result filter.

cc @swissspidy @danielbachhuber

Trac ticket: https://core.trac.wordpress.org/ticket/51471

#2 @SergeyBiryukov
10 days ago

  • Milestone changed from Awaiting Review to 5.7
Note: See TracTickets for help on using tickets.