WordPress kills an iframe’s apostrophes

The apostrophs get translated in ' For the apostrophs, I guess it is an xss security feature. Check settings > reading > encoding (UTF8) But im not sure (maybe the theme sets another encoding fixed in the header instead of reading the global variable). In any case your embed show correct in my WP test … Read more

oEmbed, thumbnails and wordpress

Use the oembed_dataparse filter to modify the resulting HTML output by any given oembed call. Example: add_filter(‘oembed_dataparse’,’test’,10,3); function test($return, $data, $url) { if ($data->provider_name == ‘YouTube’) { return “<img src=”https://wordpress.stackexchange.com/questions/79894/{$data->thumbnail_url}”>”; } else return $return; } Then putting this in a post: Will give you a picture of Rick Astley instead of a flash video of … Read more

How to apply an ID to Shortcode Embedded iframe

1.- Add this to your child theme’s functions file: add_filter(“embed_oembed_html”, function( $html, $url, $attr ) { if ( !empty( $attr[‘id’] ) ) { $html = str_replace( “<iframe”, sprintf( ‘<iframe id=”%s”‘, $attr[‘id’] ), $html ); } return $html; }, 10, 3); 2.- Now use ‘ ); Hope that helps.

Problem with oEmbed in some themes

For interested parties. Solution of my (and maybe similar problems) was to check headers of oembed feed. I didn’t notice that my headers where little different that in RFC 🙂 Fixing them helped me with my problem.

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