Plugin Directory

Changeset 2033016


Ignore:
Timestamp:
02/18/2019 08:09:25 AM (7 years ago)
Author:
tealium
Message:

Commit new version

Location:
tealium/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tealium/trunk/readme.txt

    r2007643 r2033016  
    44Donate link: http://tealium.com
    55Requires at least: 3.0.1
    6 Tested up to: 5.0
    7 Stable tag: 2.1.13
     6Tested up to: 5.1
     7Stable tag: 2.1.14
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    106106== Changelog ==
    107107
     108= 2.1.14 =
     109* Added the role of the current WP user to the data layer. This will allow role-based load rules in TiQ.
     110
    108111= 2.1.13 =
    109112* WooCommerce product data updates.
     
    194197== Upgrade Notice ==
    195198
     199= 2.1.14 =
     200Added the role of the current WP user to the data layer. This will allow role-based load rules in TiQ.
     201
    196202= 2.1.13 =
    197203WooCommerce product data updates.
  • tealium/trunk/tealium.php

    r2007643 r2033016  
    44Plugin URI: http://tealium.com
    55Description: Adds the Tealium tag and creates a data layer for your WordPress site.
    6 Version: 2.1.13
     6Version: 2.1.14
    77Author: Ian Hampton - Tealium EMEA
    88Author URI: http://tealium.com
     
    373373            $utagdata['searchQuery'] = $searchQuery;
    374374            $utagdata['searchResults'] = $searchCount;
    375         }
     375    }
     376   
     377    // Get current user role or set as guest
     378    if( is_user_logged_in() ) {
     379        $user = wp_get_current_user();
     380        $role = ( array ) $user->roles;
     381        $utagdata['userRole'] = $role[0];
     382    }
     383    else {
     384        $utagdata['userRole'] = "guest";
     385    }
    376386
    377387    // Add shop data if WooCommerce is installed
Note: See TracChangeset for help on using the changeset viewer.