Plugin Directory

Changeset 2626685


Ignore:
Timestamp:
11/09/2021 12:57:19 PM (4 years ago)
Author:
tealium
Message:

add version 2.1.15

Location:
tealium/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tealium/trunk/readme.txt

    r2588512 r2626685  
    44Donate link: http://tealium.com
    55Requires at least: 3.0.1
    6 Tested up to: 5.8
    7 Stable tag: 2.1.14
     6Tested up to: 5.8.1
     7Stable tag: 2.1.15
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    108108== Changelog ==
    109109
     110= 2.1.15 =
     111* Fixed a bug where the iQ tag was inserted into some sitemap plugins. Thanks to peytz.dk for providing the fix.
     112
    110113= 2.1.14 =
    111114* Added the role of the current WP user to the data layer. This will allow role-based load rules in TiQ.
     
    199202== Upgrade Notice ==
    200203
     204= 2.1.15 =
     205Fixed a bug where the iQ tag was inserted into some sitemap plugins. Thanks to peytz.dk for providing the fix.
     206
    201207= 2.1.14 =
    202208Added the role of the current WP user to the data layer. This will allow role-based load rules in TiQ.
  • tealium/trunk/tealium.php

    r2033016 r2626685  
    44Plugin URI: http://tealium.com
    55Description: Adds the Tealium tag and creates a data layer for your WordPress site.
    6 Version: 2.1.14
     6Version: 2.1.15
    77Author: Ian Hampton - Tealium EMEA
    88Author URI: http://tealium.com
     
    694694}
    695695
     696/*
     697 * Check if request look like a sitemap, or similar extensions where we wouldn't expect Tealium to load.
     698 * @link https://github.com/Yoast/wordpress-seo/blob/b0762abb12cd7e519163de9a4ef9ba6cd016c84b/inc/sitemaps/class-sitemaps.php#L140-L149
     699 * @return bool
     700 */
     701function isSitemap() {
     702    if ( ! isset( $_SERVER['REQUEST_URI'] ) ) {
     703        return false;
     704    }
     705    $request_uri = sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) );
     706    $extension   = substr( $request_uri, -4 );
     707    if ( stripos( $request_uri, 'sitemap' ) !== false && in_array( $extension, [ '.xml', '.xsl' ], true ) ) {
     708        return true;
     709    }
     710    return false;
     711}
     712
    696713if ( is_admin() ) {
    697714    register_activation_hook( __FILE__, 'activate_tealium' );
     
    702719}
    703720else {
    704     if ( !tealiumAMP() ) {
     721    if ( !tealiumAMP() && !isSitemap() ) {
    705722        // Insert the Tealium tag
    706723        add_action( 'init', 'insertTealiumTag' );
Note: See TracChangeset for help on using the changeset viewer.