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

WordPress keeps altering my embed code

The issue is WordPress’ core configuration of TinyMCE, which strips IFRAME tags. You can modify this configuration, to allow IFRAME tags, by hooking into tiny_mce_before_init. For example, the following code will prevent TinyMCE from stripping IFRAME, PRE, and DIV tags: function mytheme_tinymce_config( $init ) { // Change code cleanup/content filtering config // Don’t remove line … Read more

Search XML file from within WordPress?

Here’s a PHP library which uses SOAP calls to access JIRA: https://github.com/jrbeeman/php-jira However, if you can get the XML file into a place PHP can access it then you can use general PHP calls to parse and read the XML file, e.g. SimpleXML http://php.net/manual/en/book.simplexml.php From there you can put your code in a theme template … Read more