WordPress.org

Make WordPress Core

Changeset 41345


Ignore:
Timestamp:
09/08/2017 12:30:03 PM (3 years ago)
Author:
johnbillion
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-oembed.php

    r41162 r41345  
    491491        $provider = add_query_arg( 'maxheight', (int) $args['height'], $provider );
    492492        $provider = add_query_arg( 'url', urlencode($url), $provider );
     493        $provider = add_query_arg( 'dnt', 1, $provider );
    493494
    494495        /**
     
    496497         *
    497498         * @since 2.9.0
     499         * @since 4.9.0 The `dnt` (Do Not Track) query parameter was added to all oEmbed provider URLs.
    498500         *
    499501         * @param string $provider URL of the oEmbed provider.
Note: See TracChangeset for help on using the changeset viewer.