Make WordPress Core

Opened 4 years ago

Last modified 4 years ago

#51471 assigned defect (bug)

pre_oembed_result filter missing from oembed proxy controller

Reported by: bernhard-reiter's profile Bernhard Reiter Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Embeds Keywords: has-patch needs-refresh needs-unit-tests
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 (5)

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


4 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
4 years ago

  • Milestone changed from Awaiting Review to 5.7

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


4 years ago

#4 @hellofromTonya
4 years ago

  • Owner pento deleted

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

#5 @peterwilsoncc
4 years ago

  • Keywords needs-refresh needs-unit-tests added
  • Milestone changed from 5.7 to 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.