embed the_content

So I’ve never really found out why oembed urls added via apply_filters(‘the_content’, $output), are not processed while embed shortcodes are. Im still hopeful someone might shed some light on that. I really wanted to use Alex King’s post type formats UI which is why I didn’t follow David’s example. I ended up detecting the input … Read more

Why are wordpress posts not hierarchical?

As you’re probably already aware, WordPress is designed with two main content types: Pages and Posts (see also http://en.support.wordpress.com/post-vs-page/) The very design of Posts is to not be hierarchical. And the nature of Pages is to be hierarchical. Posts are to be part of a blog. Blogs are almost always ad-hoc in organization. Thus there … 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

Embed tag length issues

I was able to figure it out. embed tags do not work with pdf’s because it does not render through the browser. Using the object tag worked: <object data=”http://example.com/wp-content/uploads/…somefile.pdf” type=”application/pdf” width=”1000px” height=”1200px”> <p>It appears you don’t have a PDF plugin for this browser. You can download the pdf <a href=”http://example.com/wp-content/uploads/…/somefile.pdf”>here</a> </p> </object>

How to create a shortcode for embedding pdf in iframe?

It depends on how you want the pdfs added but this should probably be a cover all: function embed_pdf_files( $atts, $content = null ){ //add default attributes here. $defaults = array( //’width’ => ‘100%’, //’height’ => ‘1000’ ); //This overwrites defaults with the attributes in shortcode $a = shortcode_atts( $defaults, $atts ); $src = $a[‘src’]; … 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

Front end wp_editor not rendering audio/video links

I’ve been fighting this for a while on a series of themes I make that provide a front end content creation interface not requiring a WP account. For the last two years I have said “trust me, URLs will embed”. Those old tickets are dormant, but I just have found a solution here https://wordpress.stackexchange.com/a/287623 For … 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

How to add new embed handler not supported by oembed?

Pretty sure it’s the fact you’re trying to use the regex pattern in your sprintf call, when you should be using… well, a sprintf format: $embed = sprintf( ‘<iframe class=”openload-video” src=”https://openload.co/embed/%s” scrolling=”no” frameborder=”0″ width=”700″ height=”430″ allowfullscreen=”true” webkitallowfullscreen=”true” mozallowfullscreen=”true”>></iframe>’, esc_attr( $matches[1] ) ); Note that you’re not using www in your embed url: https://openload.co/f/onU1gT5mkJ8/A_date_with_Lazar_Angelov.mp4 as expected … Read more

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