Created
October 26, 2020 15:33
-
-
Save neverything/e3238cfa7169151ae10fee59b9b19b58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Remove Do Not Track Attribute from URLs of embeds like Videos. | |
* | |
* @param string $provider oembed Provider | |
* @param string $url embed url | |
* @param array $args embed args | |
* | |
* @return string $url with custom add-ons. | |
*/ | |
function remove_embed_url_dnt( $provider, $url, $args ) { | |
return add_query_arg( array( 'dnt' => false ), $provider ); | |
} | |
add_filter( 'oembed_fetch_url', __NAMESPACE__ . '\remove_embed_url_dnt', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment