[wp-trac] [WordPress Trac] #37359: wp_filter_pre_oembed_result() breaks SoundCloud embeds
WordPress Trac
noreply at wordpress.org
Thu Jul 14 19:07:25 UTC 2016
#37359: wp_filter_pre_oembed_result() breaks SoundCloud embeds
-------------------------------+------------------------------
Reporter: MaffooClock | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Embeds | Version: 4.5.3
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Changes (by swissspidy):
* keywords: => reporter-feedback
Comment:
I tested SoundCloud embeds on a number of blogs and they worked fine
everywhere. If it really wouldn't work, it would mean that
`url_to_postid()` thinks that the Soundcloud URL belongs to a post of
yours. However, `url_to_postid()` throws away any URL that doesn't match
your home URL.
> I've discovered that removing Line 1116 seems to restore SoundCloud
embedding, although this is merely a workaround that I haven't fully
tested.
Please do not do that. First, you should never alter WordPress core code.
Second, simply removing the return statement can cause more harm than good
and lead to unexpected behaviour. If `wp_filter_pre_oembed_result()`
really causes issues for you, you should unhook it like this:
`remove_filter( 'pre_oembed_result', 'wp_filter_pre_oembed_result' );`
----
Can you confirm this issue still exists when deactivating all plugins and
using one of the default themes, like Twenty Sixteen? Does it only happen
to SoundCloud URLs and if so, do you have an example URL to reproduce
this?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37359#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list