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 | 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
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
4 years ago
#5
@
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.
`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()
andWP_oEmbed_Controller::get_proxy_item()
are otherwise quite similar, sharing theget_data()
anddata2html()
calls, andoembed_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