[NSFW] Why is it WordPress Automatically Embeds the NSFW Site RedGifs URLs?
-
I’ve been trying to remove all possible sites from being embedded in WordPress when the url is posted.
For some reason, I can’t do a global removal of all embeds by using plugins like Disable Embeds or calling on wp_dequeue_script function or any of the other options out there for removing embeds globally.
Although singling out websites like this appears to work:
function remove_oembed_provider() { wp_oembed_remove_provider( '#https?://((m|www)\.)?youtube\.com/watch.*#i', true ); } add_action( 'init', 'remove_oembed_provider' );
When doing testing, I noticed the NSFW site Redgifs automatically embeds itself in an iframe when the video/gifs url is posted.
The aforementioned code doesn’t work for them, probably because Redgifs doesn’t appear to be an OEmbed provider.
I was under the impression WordPress will only automatically embed urls when they are from the approved whitelist: https://www.ads-software.com/support/article/embeds/#okay-so-what-sites-can-i-embed-from
Redgifs is not approved, yet still embeds. Does anyone know why? And how I can remove their links from being embedded/iframed?
- The topic ‘[NSFW] Why is it WordPress Automatically Embeds the NSFW Site RedGifs URLs?’ is closed to new replies.