Changeset 2626685
- Timestamp:
- 11/09/2021 12:57:19 PM (4 years ago)
- Location:
- tealium/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (3 diffs)
-
tealium.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tealium/trunk/readme.txt
r2588512 r2626685 4 4 Donate link: http://tealium.com 5 5 Requires at least: 3.0.1 6 Tested up to: 5.8 7 Stable tag: 2.1.1 46 Tested up to: 5.8.1 7 Stable tag: 2.1.15 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 108 108 == Changelog == 109 109 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 110 113 = 2.1.14 = 111 114 * Added the role of the current WP user to the data layer. This will allow role-based load rules in TiQ. … … 199 202 == Upgrade Notice == 200 203 204 = 2.1.15 = 205 Fixed a bug where the iQ tag was inserted into some sitemap plugins. Thanks to peytz.dk for providing the fix. 206 201 207 = 2.1.14 = 202 208 Added 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 4 4 Plugin URI: http://tealium.com 5 5 Description: Adds the Tealium tag and creates a data layer for your WordPress site. 6 Version: 2.1.1 46 Version: 2.1.15 7 7 Author: Ian Hampton - Tealium EMEA 8 8 Author URI: http://tealium.com … … 694 694 } 695 695 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 */ 701 function 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 696 713 if ( is_admin() ) { 697 714 register_activation_hook( __FILE__, 'activate_tealium' ); … … 702 719 } 703 720 else { 704 if ( !tealiumAMP() ) {721 if ( !tealiumAMP() && !isSitemap() ) { 705 722 // Insert the Tealium tag 706 723 add_action( 'init', 'insertTealiumTag' );
Note: See TracChangeset
for help on using the changeset viewer.