Tagged: All of the videos will embed and post., If a user pastes more than one video URL into the comments text box
You are welcome.
Sure, I look forward to it.Regards
BrajeshHi to anyone this could help.
How block a domain from embeding video in wordpress.
This my own hack ,– it works good
if domain is a native WP embed change the format string
setting to false. If the domain to be blocked is not in the
list of WP native embeds but its working and causing
problems, pick a domain in the code list you don’t care about.
Replace that domain with the one you want to block in that
code string This will break it because it will be the wrong
format. it will no longer embed- but activity plus using the
link option will post the video as a link with an image
and text.————————–
Source fileyourdomain.com\wp-includes\class-oembed.php
———- class-oembed.php
————————————————-
Example
( Original )‘#https?://(www\.)?soundcloud\.com/.*#i’ => array( ‘https://soundcloud.com/oembed’, true
),
————————————————–( Hack )
‘#https?://(www\.)?domain\.com/.*#i’ => array( ‘https://domain.com/oembed’, true ),
————————————————–
Hi,
Thank you for sharing.
I hope it helps people looking for similar feature.Regards
Brajesh
You must be logged in to reply to this topic.