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 HTML returned by the oEmbed provider.

So oembed_result is when the html is first retrieved, before caching. embed_oembed_html is when the cache has been fetched but before rendering.

You can probably get away with only one or the other, making sure to flush all caches/transients first