Update 1.0.76

This commit is contained in:
ultimatemember
2015-03-07 13:07:49 +02:00
parent 6ff2da7672
commit 22d5c2d24a
41 changed files with 453 additions and 242 deletions
+46 -23
View File
@@ -33,6 +33,7 @@
.redux-sidebar .redux-group-menu li.active a, .admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild a {
color: #3ba1da !important;
background: #e5e5e5;
}
.redux-sidebar .redux-group-menu li.activeChild.hasSubSections a {
@@ -47,6 +48,9 @@
.redux-main {
background: none !important;
box-shadow: none !important;
border-left: 0 !important;
padding: 0 25px;
}
.redux-container-sortable .checkbox-container input {
@@ -54,29 +58,34 @@
}
#redux-header {
background: #3ba1da !important;
border-color: #3ba1da !important;
border-radius: 0 !important;
padding: 0 0 0 20px !important;
border-bottom: 0 !important;
background: transparent !important;
border: none !important;
padding: 0 !important;
}
.redux-container #redux-header .display_header {
margin: 0 0 10px 0 !important;
}
#redux-header .display_header span {
color: #fff !important;
font-size: 14px;
font-size: 15px;
position: relative;
top: -10px;
font-weight: 600;
top: -8px;
left: -3px;
padding-left: 4px;
font-weight: 400;
line-height: 29px;
color: #222 !important;
}
#redux-header h2 {
color: #fff;
font-size: 24px !important;
color: #222;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background: url(../img/logo-header.png) no-repeat left 8px;
padding: 10px 10px 10px 80px;
font-size: 23px;
font-weight: 400;
padding: 2px 15px 4px 0px;
line-height: 29px;
}
#redux-share {margin-top: 11px !important}
@@ -118,15 +127,16 @@
.redux-sidebar .redux-group-tab-link-a i {
vertical-align: middle;
font-size: 1.5em;
font-size: 1.2em;
position: absolute;
width: 20px;
text-align: center;
top: 8px;
top: 6px;
color: #888;
}
.redux-sidebar .redux-menu-warning i, .redux-sidebar .redux-menu-error i, .redux-sidebar .hasSubSections .extraIconSubsections i {
top: 14px;
top: 11px;
}
.redux-container ul.data-full{padding:0!important;margin:0!important}
@@ -140,38 +150,51 @@
.redux-container-switch {font-size: 13px}
.redux-sidebar .redux-group-menu li {
margin-top: 4px;
}
.redux-sidebar .redux-group-menu li a {
color: #555;
opacity: 1 !important;
padding: 10px 4px 10px 14px;
padding: 6px 4px 6px 14px;
border-radius: 3px;
border: none;
transition: all .2s linear !important;
}
.redux-sidebar .redux-group-menu li a:hover {
background: #ddd;
color: #555;
background: #e5e5e5;
color: #333;
}
.redux-sidebar .redux-group-menu li.activeChild.hasSubSections a {
background: #3ba1da !important;
color: #fff;
}
.redux-sidebar .redux-group-menu li.activeChild.hasSubSections a i {color: #fff !important}
.redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active {
border-right: 0;
}
.redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li {
border-right: 1px solid #DEDEDE;
border-right: 0;
margin-top: 4px;
padding-left: 12px;
}
.redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a {
background: transparent !important;
color: #555 !important;
border-bottom: 1px solid #E7E7E7;
padding: 10px 4px 10px 14px !important;
border-bottom: 0;
padding: 6px 4px 6px 14px !important;
}
.redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a:hover {
background: #ddd !important;
background: #e5e5e5 !important;
color: #333 !important;
}
.redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a {
+1 -1
View File
@@ -179,7 +179,7 @@
update_option('um_tracking_notice', 1 );
$tracking = new UM_Admin_Tracking();
$tracking = new UM_Tracking();
$tracking->send_checkin(true);
exit( wp_redirect( remove_query_arg('um_adm_action') ) );
+1 -1
View File
@@ -154,7 +154,7 @@ class UM_Admin_Dashboard {
function admin_page() {
$page = $_REQUEST['page'];
if ( $page == 'ultimatemember' ) {
if ( $page == 'ultimatemember' && !isset($_REQUEST['um-addon']) ) {
?>
+3 -3
View File
@@ -428,15 +428,15 @@ class UM_Admin_Metabox {
}
// needed on forms only
if ( isset( $screen->id ) && strstr( $screen->id, 'um_form' ) ) {
if ( !isset( $this->is_loaded ) && isset( $screen->id ) && strstr( $screen->id, 'um_form' ) ) {
$settings['textarea_rows'] = 8;
echo '<div class="um-hidden-editor-edit" style="display: none">';
echo '<div class="um-hidden-editor-edit" style="display:none;">';
wp_editor( '', 'um_editor_edit', $settings );
echo '</div>';
echo '<div class="um-hidden-editor-new" style="display: none">';
echo '<div class="um-hidden-editor-new" style="display:none;">';
wp_editor( '', 'um_editor_new', $settings );
echo '</div>';
+1 -1
View File
@@ -52,7 +52,7 @@
$this->args = array(
'opt_name' => 'um_options', // This is where your data is stored in the database and also becomes your global variable name.
'display_name' => __('Settings', 'ultimatemember'), // Name that appears at the top of your panel
'display_name' => __('Ultimate Member', 'ultimatemember'), // Name that appears at the top of your panel
'display_version' => ultimatemember_version, // Version that appears at the top of your panel
'menu_type' => 'submenu', //Specify if the admin menu should appear or not. Options: menu or submenu (Under appearance only)
'allow_sub_menu' => false, // Show the sections below the admin menu item or not
-158
View File
@@ -1,158 +0,0 @@
<?php
class UM_Admin_Tracking {
private $data;
public function __construct() {
$this->schedule_send();
add_action( 'admin_notices', array( $this, 'admin_notices' ), 10 );
}
/***
*** @setup info array
***/
private function setup_data() {
$data = array();
// Retrieve current theme info
if ( get_bloginfo( 'version' ) < '3.4' ) {
$theme_data = get_theme_data( get_stylesheet_directory() . '/style.css' );
$theme = $theme_data['Name'];
$theme_ver = $theme_data['Version'];
} else {
$theme_data = wp_get_theme();
$theme = $theme_data->Name;
$theme_ver = $theme_data->Version;
}
$data['url'] = home_url();
$data['theme'] = $theme;
$data['theme_version'] = $theme_ver;
$data['wp_version'] = get_bloginfo( 'version' );
$data['version'] = ultimatemember_version;
$result = count_users();
$data['users_count'] = $result['total_users'];
// Retrieve current plugin information
if( ! function_exists( 'get_plugins' ) ) {
include ABSPATH . '/wp-admin/includes/plugin.php';
}
$plugins = array_keys( get_plugins() );
$active_plugins = get_option( 'active_plugins', array() );
foreach ( $plugins as $key => $plugin ) {
if ( in_array( $plugin, $active_plugins ) ) {
// Remove active plugins from list so we can show active and inactive separately
unset( $plugins[ $key ] );
}
}
$data['active_plugins'] = $active_plugins;
$data['inactive_plugins'] = $plugins;
$data['language'] = get_bloginfo('language');
$data['multisite'] = ( is_multisite() ) ? 1 : 0;
$this->data = $data;
}
/***
*** @check if tracking is allowed
***/
private function tracking_allowed() {
if ( !um_get_option('allow_tracking') )
return 0;
if( stristr( network_site_url( '/' ), 'dev' ) !== false ||
stristr( network_site_url( '/' ), 'localhost' ) !== false ||
stristr( network_site_url( '/' ), ':8888' ) !== false // This is common with MAMP on OS X
) {
return 0;
}
return 1;
}
/***
*** @get last send time
***/
private function get_last_send() {
return get_option( 'um_tracking_last_send' );
}
/***
*** @send a report
***/
public function send_checkin( $override = false ) {
if( ! $this->tracking_allowed() && ! $override )
return;
// Send a maximum of once per week
$last_send = $this->get_last_send();
if( $last_send && $last_send > strtotime( '-1 week' ) )
return;
$this->setup_data();
$request = wp_remote_post( 'https://ultimatemember.com/?um_action=checkin', array(
'method' => 'POST',
'timeout' => 20,
'redirection' => 5,
'httpversion' => '1.0',
'blocking' => true,
'body' => $this->data,
'user-agent' => 'UM/' . ultimatemember_version . '; ' . get_bloginfo( 'url' ),
) );
update_option( 'um_tracking_last_send', time() );
}
/***
*** @run a scheduled report
***/
private function schedule_send() {
add_action( 'um_weekly_scheduled_events', array( $this, 'send_checkin' ) );
}
/***
*** @show admin notices
***/
public function admin_notices() {
if( ! current_user_can( 'manage_options' ) )
return;
$hide_notice = get_option('um_tracking_notice');
if ( $hide_notice )
return;
$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" style="border-color: #3ba1da;"><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="https://ultimatemember.com/tracking/" target="_blank">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>';
}
}
+2 -4
View File
@@ -39,8 +39,7 @@ class UM_Admin_API {
require_once um_path . 'admin/core/um-admin-roles.php';
require_once um_path . 'admin/core/um-admin-builder.php';
require_once um_path . 'admin/core/um-admin-dragdrop.php';
require_once um_path . 'admin/core/um-admin-tracking.php';
require_once um_path . 'admin/core/um-admin-actions-user.php';
require_once um_path . 'admin/core/um-admin-actions-modal.php';
require_once um_path . 'admin/core/um-admin-actions-fields.php';
@@ -60,8 +59,7 @@ class UM_Admin_API {
$this->access = new UM_Admin_Access();
$this->builder = new UM_Admin_Builder();
$this->dragdrop = new UM_Admin_DragDrop();
$this->tracking = new UM_Admin_Tracking();
if ( is_admin() &&
current_user_can('manage_options') &&
isset($_REQUEST['um_adm_action']) &&