From 71807e4f6d3a6e2cead0bd86620dc235ec1c6db9 Mon Sep 17 00:00:00 2001 From: ultimatemember Date: Sun, 4 Jan 2015 03:10:49 +0200 Subject: [PATCH] Tracking code changes --- admin/assets/css/um-admin-dashboard.css | 3 +-- admin/assets/js/um-admin-dashboard.js | 4 ---- admin/core/um-admin-actions.php | 2 +- admin/core/um-admin-notices.php | 1 + admin/core/um-admin-tracking.php | 29 ++++++++++++++++--------- um-config.php | 2 +- 6 files changed, 23 insertions(+), 18 deletions(-) diff --git a/admin/assets/css/um-admin-dashboard.css b/admin/assets/css/um-admin-dashboard.css index ce72132d..d2c4e807 100644 --- a/admin/assets/css/um-admin-dashboard.css +++ b/admin/assets/css/um-admin-dashboard.css @@ -5,8 +5,7 @@ .um-admin.toplevel_page_ultimatemember div.error, .um-admin.toplevel_page_ultimatemember div.updated { - display: none; - margin: 0 0 1px 0 !important; + margin: 18px 20px 0 2px !important; } .um-admin-dash-container { diff --git a/admin/assets/js/um-admin-dashboard.js b/admin/assets/js/um-admin-dashboard.js index 5a3645c2..4125de1d 100644 --- a/admin/assets/js/um-admin-dashboard.js +++ b/admin/assets/js/um-admin-dashboard.js @@ -20,8 +20,4 @@ jQuery(document).ready(function() { return false; }); - if ( jQuery('.um-admin-dash-body').length && ( jQuery('.updated').length || jQuery('.error').length ) ) { - jQuery('.updated,.error').prependTo('.um-admin-dash-body').show(); - } - }); \ No newline at end of file diff --git a/admin/core/um-admin-actions.php b/admin/core/um-admin-actions.php index f5e5f0c9..6cc08346 100644 --- a/admin/core/um-admin-actions.php +++ b/admin/core/um-admin-actions.php @@ -14,7 +14,7 @@ update_option('um_tracking_notice', 1 ); $tracking = new UM_Admin_Tracking(); - $tracking->send_checkin( true ); + $tracking->send_checkin(); exit( wp_redirect( remove_query_arg('um_adm_action') ) ); } diff --git a/admin/core/um-admin-notices.php b/admin/core/um-admin-notices.php index 11c023fe..8feea0df 100644 --- a/admin/core/um-admin-notices.php +++ b/admin/core/um-admin-notices.php @@ -5,6 +5,7 @@ class UM_Admin_Notices { function __construct() { add_action('admin_notices', array(&$this, 'admin_notices'), 10); + } /*** diff --git a/admin/core/um-admin-tracking.php b/admin/core/um-admin-tracking.php index 94de1efe..391d6b56 100644 --- a/admin/core/um-admin-tracking.php +++ b/admin/core/um-admin-tracking.php @@ -8,8 +8,8 @@ class UM_Admin_Tracking { $this->schedule_send(); - add_action( 'admin_notices', array( $this, 'admin_notices' ) ); - + add_action( 'admin_notices', array( $this, 'admin_notices' ), 10 ); + } /*** @@ -30,12 +30,15 @@ class UM_Admin_Tracking { $theme_ver = $theme_data->Version; } - $data['name'] = get_bloginfo('name'); $data['url'] = home_url(); + $data['theme'] = $theme; $data['theme_version'] = $theme_ver; + $data['wp_version'] = get_bloginfo( 'version' ); + $data['version'] = ULTIMATEMEMBER_VERSION; + $data['email'] = get_bloginfo( 'admin_email' ); $result = count_users(); @@ -59,6 +62,10 @@ class UM_Admin_Tracking { $data['active_plugins'] = $active_plugins; $data['inactive_plugins'] = $plugins; + $data['language'] = get_bloginfo('language'); + + $data['multisite'] = ( is_multisite() ) ? 1 : 0; + $this->data = $data; } @@ -113,7 +120,7 @@ class UM_Admin_Tracking { ) ); update_option( 'um_tracking_last_send', time() ); - + } /*** @@ -139,12 +146,14 @@ class UM_Admin_Tracking { $optin_url = add_query_arg( 'um_adm_action', 'opt_into_tracking' ); $optout_url = add_query_arg( 'um_adm_action', 'opt_out_of_tracking' ); - echo '

'; - echo __( 'Help us improve Ultimate Member by allowing us to anonymously track plugin and theme usage. This helps us to improve plugin and theme compatibility. No sensitive data will be tracked.', 'ultimatemember' ); - echo '
'; - echo '' . __( 'Allow tracking', 'ultimatemember' ) . ''; - echo ' ' . __( 'Do not allow tracking', 'ultimatemember' ) . ''; - echo '

'; + echo '

'; + + echo __( 'Help us improve Ultimate Member’s compatibility with other plugins and themes by allowing us to track non-sensitive data on your site. Click here to see what data we track.', 'ultimatemember' ); + + echo '

'; + + echo '

' . __( 'Allow tracking', 'ultimatemember' ) . ''; + echo ' ' . __( 'Do not allow tracking', 'ultimatemember' ) . '

'; } diff --git a/um-config.php b/um-config.php index 491afcdf..6072783d 100644 --- a/um-config.php +++ b/um-config.php @@ -1438,7 +1438,7 @@ $this->sections[] = array( 'type' => 'switch', 'title' => __( 'Allow anonymous tracking' ), 'default' => 0, - 'desc' => 'Help us improve Ultimate Member by allowing us to anonymously track plugin and theme usage. This helps us to improve plugin and theme compatibility. No sensitive data will be tracked.', + 'desc' => 'Help us improve Ultimate Member’s compatibility with other plugins and themes by allowing us to track non-sensitive data on your site. Click here to see what data we track.', 'on' => 'Allow tracking', 'off' => 'Do not allow', ),