Tracking code changes

This commit is contained in:
ultimatemember
2015-01-04 03:10:49 +02:00
parent b1c9c670eb
commit 71807e4f6d
6 changed files with 23 additions and 18 deletions
+1 -2
View File
@@ -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 {
-4
View File
@@ -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();
}
});
+1 -1
View File
@@ -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') ) );
}
+1
View File
@@ -5,6 +5,7 @@ class UM_Admin_Notices {
function __construct() {
add_action('admin_notices', array(&$this, 'admin_notices'), 10);
}
/***
+19 -10
View File
@@ -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 '<div class="updated"><p style="line-height: 2em">';
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 '<br />';
echo '<a href="' . esc_url( $optin_url ) . '" class="button button-primary">' . __( 'Allow tracking', 'ultimatemember' ) . '</a>';
echo '&nbsp;<a href="' . esc_url( $optout_url ) . '" class="button-secondary">' . __( 'Do not allow tracking', 'ultimatemember' ) . '</a>';
echo '</p></div>';
echo '<div class="updated"><p>';
echo __( 'Help us improve Ultimate Members compatibility with other plugins and themes by allowing us to track non-sensitive data on your site. Click <a href="http://ultimatemember.com/tracking/">here</a> to see what data we track.', 'ultimatemember' );
echo '</p>';
echo '<p><a href="' . esc_url( $optin_url ) . '" class="button button-primary">' . __( 'Allow tracking', 'ultimatemember' ) . '</a>';
echo '&nbsp;<a href="' . esc_url( $optout_url ) . '" class="button-secondary">' . __( 'Do not allow tracking', 'ultimatemember' ) . '</a></p></div>';
}
+1 -1
View File
@@ -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 Members compatibility with other plugins and themes by allowing us to track non-sensitive data on your site. Click <a href="http://ultimatemember.com/tracking/">here</a> to see what data we track.',
'on' => 'Allow tracking',
'off' => 'Do not allow',
),