YouTube embed parameters?

There’s always a filter you can use to hook into the output, see embed_oembed_html. Try this in a custom plugin or child theme’s functions file, it will add any other query strings to the iframe src attribute: add_filter(“embed_oembed_html”, function( $html, $url, $attr ) { parse_str(parse_url($url, PHP_URL_QUERY), $url); if ( $url ) { foreach ( $url … Read more

Embed Post in external page

Prerequisite: Custom Plugin First you’ll need a small plugin. Just copypaste it into a .php file, add it to some folder, zip and upload it to your installation an you’re done. What it does This small plugin only checks if the wpembed query part is present and if it is set to true. If both … Read more

Video Embed with Captions in Turkish

Okay the thing is that the oembed endpoint seems not to support any other than the default parameters. So it seems that all you can do is parse the response and add in your parameters to the iframe src. This should do it (untested) function wpse_218836_add_youtube_parameter( $return, $data, $url ){ if ( $data->provider_name === ‘YouTube’){ … Read more

How can I override print_embed_sharing_dialog() in WordPress 4.5

You can’t modify the core function’s output, but you can replace it with your own function by unhooking it from embed_footer and adding your own function with custom output: remove_action( ’embed_footer’, ‘print_embed_sharing_dialog’ ); add_action( ’embed_footer’, ‘my_custom_sharing_dialog’, 9 ); function my_custom_sharing_dialog() { // write your own dialog html here } (I added it back with a … Read more

Check if page is embeded

The server doesn’t know what the client is doing with the output and as such, you’re limited in what you can assume. You may or may not have params sent in the request, referer, current uri and headers. $_REQUEST[’embed_act’] $_SERVER[‘HTTP_REFERER’] $_SERVER[‘REQUEST_URI’] get_headers() On the JS side, it might be possible. if(self==top) { //… } if( … Read more

extra text in Vimeo Embedded videos

I add a frame ID using an each function’s index, and then appending the src with the string you need: jQuery(‘#video-gallery-list li.video-player’).each(function(i) { // set up a variable for the src that includes the new unique ID you’re about to use var this_src = jQuery(this).find(‘iframe’).attr(‘src’) + ‘?api=1&player_id=player_’+i; jQuery(this).find(‘iframe’).attr(‘ID’, ‘player_’+i).attr(‘src’,this_src); });

disable video URL auto-embedding for a part of the post

Well… To embed a video or another object into a post or page, place its URL into the content area. Make sure the URL is on its own line and not hyperlinked (clickable when viewing the post). https://codex.wordpress.org/Embeds#What_About_oEmbed_Discovery.3F So, to “disable” embedding the simplest thing is to make sure the URL isn’t on a line … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)