Combine embed_oembed_html and oembed_result

This works, just don’t know if it’s the proper way to do it: Yes, the functions are the same so they’re equivalent. There is nothing wrong here. But if we dig a bit deeper, we see they’re not 2 filters for the same thing at all: embed_oembed_html filters the cached oEmbed HTML. oembed_result filters the … Read more

WordPress get_media_embedded

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

Div around YouTube video

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; }

oembed_cache SPAM problem [closed]

Thank you so much for your reply. It helped me figure out what’s going on. I get a far bit of spam submissions via my contact form, these spam submissions include URLs. Although they are being flagged as spam and filtered out, WordPress still creates an oembed_cache entry in the database for them. I have … Read more

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