OEMBED seems to have stopped working

It appears I’ve been hoodwinked by my local setup & accidentally stopping connections to vimeo / youtube. This resulted in the video url appearing as only text. Once my setup was restarted everything appears to be working properly. Sorry for the confabulation.

How to modify the HTML formatting of an oEmbed link?

WP_oEmbed::data2html() has a filter, oembed_dataparse. You can use this to change the output, based on the extra data which is passed as the second parameter. Something like this for example: add_filter( ‘oembed_dataparse’, ‘wpse17461_oembed_dataparse’, 10, 3 ); function wpse17461_oembed_dataparse( $html, $data, $url ) { if ( FALSE !== strpos( $url, ‘deviantart.com’ ) ) { return $html … Read more

Use Auto Embed with get_post()

You need to set the global $post object to your post. This is done by the loop functions in your theme which is why it works there. WP’s oEmbed replaces the URLs during the the_content filter. But it replaces the URLs through two means. The first is a simple regex find and replace for certain … Read more

Display oEmbed in the_excerpt

Without knowing more about your theme I can only hazard a few guesses. What are you inputting as an excerpt, what is the current output you are seeing for your excerpt, and what is the expected output? Are you seeing the URL show up in the excerpt, or is it being stripped? Oembed Are you … Read more

How to check If Oembed is empty or not

The wp_oembed_get() only works for supported oEmbed providers. The return value is also is a URL of false, as mentioned per codex: If $url is a valid url to a supported provider, the function returns the embed code provided to it from the oEmbed protocol. Otherwise, it will return false. Therefore, is the input is … Read more

wp_insert_post iframe missing

remove_filter(‘content_save_pre’, ‘wp_filter_post_kses’); remove_filter(‘content_filtered_save_pre’, ‘wp_filter_post_kses’); $id = wp_insert_post( $my_post ); add_filter(‘content_save_pre’, ‘wp_filter_post_kses’); add_filter(‘content_filtered_save_pre’, ‘wp_filter_post_kses’);

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