I'd like my embedded tweets to not show a parent/ancestor, for example this is how Wordpress oEmbed displays a single tweet
I'd prefer all to look like:
I tried this approach to filter on oembed_fetch_url with the hide_thread parameter in the Twitter oEmbed api docs
/**
* Hide threas for all twitter oEmbeds, using the hide_thread=1 query argument
*/
add_filter( 'oembed_fetch_url', function( $provider, $url, $args )
{
// Target publish.twitter.com provider
if( 'publish.twitter.com' === parse_url( $provider, PHP_URL_HOST ) )
$provider = add_query_arg( 'hide_thread', 1, $provider );
return $provider;
}, 99, 3 );
But it had no effect. I tried also to attach it via CSS on the .EmbeddedTweet-ancestor
but you can't touch what's inside the shadowroot.
I'm on an edge of understanding how to work with filtering the ombed html results.