From e061a432cc40d456c4e44492bf87560128068566 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Fri, 8 Sep 2017 12:31:43 +0000 Subject: [PATCH] Embeds: Add the `dnt` (Do Not Track) query parameter to all oEmbed provider URLs. This means that, for those providers that support this somewhat de-facto standard, visitor tracking is disabled by default for all embeds. Props norcross, joostdevalk Fixes #41784 Built from https://develop.svn.wordpress.org/trunk@41345 git-svn-id: http://core.svn.wordpress.org/trunk@41178 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-oembed.php | 2 ++ wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-oembed.php b/wp-includes/class-oembed.php index 616a844186..467b5e5968 100644 --- a/wp-includes/class-oembed.php +++ b/wp-includes/class-oembed.php @@ -490,11 +490,13 @@ class WP_oEmbed { $provider = add_query_arg( 'maxwidth', (int) $args['width'], $provider ); $provider = add_query_arg( 'maxheight', (int) $args['height'], $provider ); $provider = add_query_arg( 'url', urlencode($url), $provider ); + $provider = add_query_arg( 'dnt', 1, $provider ); /** * Filters the oEmbed URL to be fetched. * * @since 2.9.0 + * @since 4.9.0 The `dnt` (Do Not Track) query parameter was added to all oEmbed provider URLs. * * @param string $provider URL of the oEmbed provider. * @param string $url URL of the content to be embedded. diff --git a/wp-includes/version.php b/wp-includes/version.php index 7201561e3c..d509d35c6a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-alpha-41344'; +$wp_version = '4.9-alpha-41345'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.