Drift - Version 1.4.2

Version Description

Download this release

Release Info

Developer driftcom
Plugin Icon Drift
Version 1.4.2
Comparing to
See all releases

Code changes from version 1.5 to 1.4.2

Files changed (2) hide show
  1. includes/embed.php +5 -2
  2. readme.txt +1 -1
includes/embed.php CHANGED
@@ -7,11 +7,14 @@ add_action('wp_head', 'add_drift');
7
  function get_drift_identify()
8
  {
9
  $current_user = wp_get_current_user();
 
 
 
10
  if ($current_user->user_email) {
11
  $sanitized_email = sanitize_email($current_user->user_email);
12
  echo "<!-- Start Identify call for Drift -->\n";
13
  echo "<script>\n";
14
- echo "drift.identify(\"".md5($sanitized_email)."\", { email: \"".$sanitized_email."\", name: \"".sanitize_text_field($current_user->user_login)."\" });\n";
15
  echo "</script>\n";
16
  echo "<!-- End Identify call for Drift -->\n";
17
  } else {
@@ -61,4 +64,4 @@ function add_drift()
61
  }
62
  }
63
  }
64
- ?>
7
  function get_drift_identify()
8
  {
9
  $current_user = wp_get_current_user();
10
+ //print_r($current_user->roles[0]);
11
+ //print_r(sanitize_text_field($current_user->roles[0]));
12
+
13
  if ($current_user->user_email) {
14
  $sanitized_email = sanitize_email($current_user->user_email);
15
  echo "<!-- Start Identify call for Drift -->\n";
16
  echo "<script>\n";
17
+ echo "drift.identify(\"".md5($sanitized_email)."\", { email: \"".$sanitized_email."\", name: \"".sanitize_text_field($current_user->user_login)."\", userRole: \"".sanitize_text_field($current_user->roles[0])."\" });\n";
18
  echo "</script>\n";
19
  echo "<!-- End Identify call for Drift -->\n";
20
  } else {
64
  }
65
  }
66
  }
67
+ ?>
readme.txt CHANGED
@@ -7,7 +7,7 @@ Drift enables you to chat with your website visitors, increase sales and collect
7
 
8
  Requires at least: 3.4
9
  Tested up to: 4.6.1
10
- Stable tag: 1.4.1
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
7
 
8
  Requires at least: 3.4
9
  Tested up to: 4.6.1
10
+ Stable tag: 1.4.2
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13