Add custom parameters in SoundClound embed
Have you added the filter in your code to utilize “my_oembed_fetch_url” ? add_filter( ‘oembed_fetch_url’, ‘my_oembed_fetch_url’, 10, 3 );
Have you added the filter in your code to utilize “my_oembed_fetch_url” ? add_filter( ‘oembed_fetch_url’, ‘my_oembed_fetch_url’, 10, 3 );
Unfortunately WP Embed isn’t responsible for converting links into iframes. The conversion of links and shortcodes into iframes is implemented by OEmbed and that happens via OEmbed APIs on the_content filter in PHP, not javascript. It’s much more likely that your transitioning to pages that use raw post content rather than processed/rendered content, e.g. templates … Read more
Because print_r prints a readable version of your variable $media, which will be an array as per the documentation for get_media_embedded_in_content(). You see Array ( [0] => [youtube embed] ) in your browser because it’s rendering the HTML of the array element – if you check the source code of your page you would see … Read more
Youtube now supports oEmbed by default as the first option and even automatically highlights the url. Go to the youtube video you want, click share, the url is auto highlighted for you, copy + paste into wordpress, it does not get any easier.
First of all, thanks for explaining when this bug occurs. I’ve had several other (vague) complaints about losing the data for this plugin, but wasn’t able to replicate it. I’ve managed to solve the problem, and published a new version of the plugin in the WP repository. The repository still says the plugin hasn’t been … Read more
In your header.php you are probably using wp_title(). This one requires at least two global variables: $wpdb (the get_query_var() call) and $wp_locale, on singular views a global $post object too. So you have to create these variables, or set wp_title() in a conditional, like this: if ( ! empty ( $GLOBALS[‘wpdb’] ) ) wp_title();
Just add the comments to oEmbed. Here’s a small plugin that you can use as MU-Plugin or normal plugin and that should explain what’s going on pretty well. <?php defined( ‘ABSPATH’ ) or exit; /* Plugin Name: (#105942) oEmbed Comments */ add_filter( ‘comment_text’, ‘wpse_105942_oembed_comments’, 0 ); function wpse_105942_oembed_comments( $comment ) { add_filter( ’embed_oembed_discover’, ‘__return_false’, 999 … Read more
I’m not sure why that’s not working except maybe you need to put the returned stuff in a variable? This is what works for me when I put it in my functions.php file: add_filter( ’embed_oembed_html’, ‘tdd_oembed_filter’, 10, 4 ) ; function tdd_oembed_filter($html, $url, $attr, $post_ID) { $return = ‘<figure class=”video-container”>’.$html.'</figure>’; return $return; }
Not really a wordpress question, and except for the last option you might get a different and maybe better answers on stack exchange. Three options one ugly, one requires extra work and one is super hard but might be the right thing to do. Ugly: Put the external object in an iframe and write some … Read more
It’s a rudimentary plugin, not tested. It will function once, when the plugin is activated. Copy the code Make it a file named __once.php Save the file in wp-content\plugins\__once\ Browse the wp-admin/plugins.php, and activate the plugin named __once. WARNING: It’s not tested. It’s recommended to test first, fix bugs, fix the way it should be … Read more