Make WordPress Core

Opened 6 years ago

Last modified 6 years ago

#51471 assigned defect (bug)

pre_oembed_result filter missing from oembed proxy controller

Reported by: Bernhard Reiter Owned by:
Priority: normal Milestone: Future Release
Component: Embeds Version:
Severity: normal Keywords: has-patch needs-refresh needs-unit-tests
Cc: Focuses: rest-api

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 (5)

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


6 years ago
#1

  • 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
6 years ago

  • Milestone Awaiting Review → 5.7

This ticket was mentioned in ​Slack in #core by hellofromtonya. ​View the logs.


6 years ago

#4 @hellofromTonya
6 years ago

  • Owner pento removed

Per today's core scrub, Gary asked to be removed as owner.

#5 @peterwilsoncc
6 years ago

  • Keywords needs-refresh needs-unit-tests added
  • Milestone 5.7 → Future Release

As noted in my comment on the pull request, I'm moving this off the milestone as there's a little work to get it ready and the RC is next week.

I've put it on the generic future release: @bernhard-reiter I'll let you shuffle it to 5.8 if you think you'll have time for the release cycle.

Note: See TracTickets for help on using tickets.