From b0d42ad4c816d50f53611d405962a5878871f558 Mon Sep 17 00:00:00 2001 From: ultimatemember Date: Tue, 6 Jan 2015 00:38:33 +0200 Subject: [PATCH] Recent Changes --- admin/assets/css/um-admin-dashboard.css | 22 ++--- admin/assets/css/um-admin-global.css | 35 -------- admin/assets/css/um-admin-misc.css | 18 ++-- admin/assets/css/um-admin-modal.css | 1 - admin/core/um-admin-actions.php | 11 +++ admin/core/um-admin-notices.php | 33 ++++++-- admin/core/um-admin-tracking.php | 2 +- admin/templates/about.php | 19 +---- admin/templates/about_footer.php | 15 ++++ admin/templates/dashboard/overview.php | 103 +++++++++++++++++++++-- admin/templates/start.php | 66 ++++++++++++++- assets/css/um-members.css | 6 +- assets/css/um-responsive.css | 6 +- assets/css/um-styles.css | 18 ---- core/um-actions-form.php | 89 ++++++++++++++++---- core/um-actions-members.php | 20 +++-- core/um-actions-misc.php | 21 ++++- core/um-actions-profile.php | 46 ++++++++--- core/um-actions-wpadmin.php | 105 +----------------------- core/um-filters-login.php | 39 +++++++++ core/um-query.php | 2 +- core/um-short-functions.php | 9 -- core/um-user.php | 2 + um-config.php | 24 +----- 24 files changed, 424 insertions(+), 288 deletions(-) create mode 100644 admin/templates/about_footer.php diff --git a/admin/assets/css/um-admin-dashboard.css b/admin/assets/css/um-admin-dashboard.css index d2c4e807..87ca19b7 100644 --- a/admin/assets/css/um-admin-dashboard.css +++ b/admin/assets/css/um-admin-dashboard.css @@ -32,6 +32,7 @@ font-weight: 700; font-size: 12px; margin-left: 10px; + display: none; } .um-admin-dash-count.count-0 {background: #ddd !important} .um-admin-dash-count.red {background:#C74A4A} @@ -139,7 +140,7 @@ .um-admin-dash-main { margin-left: 201px; border-left: 1px solid #D8D8D8; - padding: 0 30px; + padding: 0 30px 30px 30px; box-shadow: 0px 1px 0px #FFF inset; min-height: 300px; } @@ -174,9 +175,10 @@ */ .um-admin-dash-two-col .um-admin-dash-col { - float: left; + display: inline-block; width: 42%; margin-right: 4%; + vertical-align: top; } .um-admin-dash-col a:hover {text-decoration: underline} @@ -210,25 +212,17 @@ .um-admin-dash-info { display: inline-block; - width: 130px; + width: 110px; margin-right: 10px; } .um-admin-dash-meta { display: inline-block; - width: 120px; + width: 100px; margin-right: 10px; } .um-admin-dash-more { display: inline-block; -} - -/* - - Colorful user status -*/ - -.um-status-awaiting_admin_review {color: #C74A4A} -.um-status-approved {color: #7ACF58} -.um-status-inactive {color: #888} -.um-status-rejected {color: #aaa} \ No newline at end of file + color: #aaa; +} \ No newline at end of file diff --git a/admin/assets/css/um-admin-global.css b/admin/assets/css/um-admin-global.css index 37d2458a..e7b98e69 100644 --- a/admin/assets/css/um-admin-global.css +++ b/admin/assets/css/um-admin-global.css @@ -47,41 +47,6 @@ .um-nav-mode {margin-top:10px} .um-nav-roles {display: none;margin-top:5px} -/* - - Admin notice -*/ - -.um-admin-notice { - font-size: 14px !important; - color: #fff; - border-radius: 0; - margin: 40px 30px 0 0; - padding: 20px; - background: #3ba1da url(../img/logo-header.png) no-repeat 20px center; - border-radius: 5px; -} - -.um-admin-notice div { - padding: 0 0 0 80px; -} - -.um-admin-notice a { - text-decoration: none; - color: #3ba1da; - background: #fff; - margin: 0 0 0 10px; - border-radius: 5px; - display: inline-block; - padding: 8px 15px; -} -.um-admin-notice a:hover {color:#356e8e} - -.um-admin-notice a.um-admin-notice-alt { - background: #356e8e; - color: #8bbbd5; -} -.um-admin-notice a.um-admin-notice-alt:hover {color: #fff} - /* - jQuery Tooltips */ diff --git a/admin/assets/css/um-admin-misc.css b/admin/assets/css/um-admin-misc.css index 4fb92b1d..52b5258c 100644 --- a/admin/assets/css/um-admin-misc.css +++ b/admin/assets/css/um-admin-misc.css @@ -23,6 +23,16 @@ background: #3ba1da url(../img/logo_small.png) no-repeat center 0px !important; } +.um-about-wrap a.button-primary { + height: 46px; + line-height: 46px; + padding: 0 20px !important; + font-size: 14px; + border: none; +} + +.um-about-wrap a {text-decoration: none} + /* - General */ @@ -78,14 +88,6 @@ body.um-admin-modal-open { color: #fff; } -.um-admin a.button, -.um-admin input.button { - background: #f9f9f9 !important; - box-shadow: none !important; - color: #777; - border-radius: 2px; -} - .um-admin a.button i, .um-admin a.button-primary i { font-size: 15px !important; diff --git a/admin/assets/css/um-admin-modal.css b/admin/assets/css/um-admin-modal.css index 9ed26661..c3f6152b 100644 --- a/admin/assets/css/um-admin-modal.css +++ b/admin/assets/css/um-admin-modal.css @@ -35,7 +35,6 @@ .um-admin-modal { border-radius: 3px; background: #fff; - box-shadow: 0 4px 10px #111; position: fixed; top: 50% !important; left: 50% !important; diff --git a/admin/core/um-admin-actions.php b/admin/core/um-admin-actions.php index 6cc08346..c99d07c1 100644 --- a/admin/core/um-admin-actions.php +++ b/admin/core/um-admin-actions.php @@ -1,5 +1,16 @@

'; + + echo sprintf(__( 'Registration is disabled. Please go to the general settings page in the WordPress admin and select anyone can register. Hide this notice', 'ultimatemember' ), admin_url('options-general.php'), add_query_arg('um_adm_action', 'um_can_register_notice') ); + + echo '

'; + + } + } + + /*** + *** @updating users + ***/ + function show_update_messages(){ + if ( !isset($_REQUEST['update']) ) return; - + $update = $_REQUEST['update']; - switch($update) { case 'user_updated': @@ -36,9 +55,9 @@ class UM_Admin_Notices { if ( !empty( $messages ) ) { foreach( $messages as $message ) { if ( isset($message['err_content'])) { - echo '

' . $message['err_content'] . '

'; + echo '

' . $message['err_content'] . '

'; } else { - echo '

' . $message['content'] . '

'; + echo '

' . $message['content'] . '

'; } } } diff --git a/admin/core/um-admin-tracking.php b/admin/core/um-admin-tracking.php index 391d6b56..30c845ee 100644 --- a/admin/core/um-admin-tracking.php +++ b/admin/core/um-admin-tracking.php @@ -146,7 +146,7 @@ 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 '

'; 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' ); diff --git a/admin/templates/about.php b/admin/templates/about.php index 0c818542..69304e7d 100644 --- a/admin/templates/about.php +++ b/admin/templates/about.php @@ -1,5 +1,5 @@ - +

Introducing Ultimate Member

@@ -68,20 +68,7 @@
- -
- -
- Go to Plugin Dashboard → - -
- - args['share_icons'] as $k => $arr ) { ?> - -
- -
- - \ No newline at end of file + + \ No newline at end of file diff --git a/admin/templates/about_footer.php b/admin/templates/about_footer.php new file mode 100644 index 00000000..6f3273ae --- /dev/null +++ b/admin/templates/about_footer.php @@ -0,0 +1,15 @@ +
+ +
+ + Go to Plugin Dashboard → + +
+ + args['share_icons'] as $k => $arr ) { ?> + +
+ +
+ + \ No newline at end of file diff --git a/admin/templates/dashboard/overview.php b/admin/templates/dashboard/overview.php index 50d74c6b..617be5be 100644 --- a/admin/templates/dashboard/overview.php +++ b/admin/templates/dashboard/overview.php @@ -2,9 +2,9 @@
-

Latest 5 Users

+

Recent Members

- query->get_recent_users() as $user_id ) { um_fetch_user( $user_id ); ?> + query->get_users_by_status('approved') as $user_id ) { um_fetch_user( $user_id ); ?>
@@ -17,11 +17,11 @@
- +
-
- +
+
@@ -32,8 +32,8 @@
- query->get_users_by_meta('awaiting_admin_review'); ?> -

Users Awaiting Review

+ query->get_users_by_status('awaiting_admin_review'); ?> +

Users Awaiting Review0

@@ -65,7 +65,7 @@
- Approve  |  Reject +
@@ -78,4 +78,91 @@ + + +
+ +
+ + query->get_users_by_status('awaiting_email_confirmation'); ?> +

Pending e-mail confirmation0

+ + + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ + + + +
+ + +
+ +
+ + query->get_users_by_status('inactive'); ?> +

Recently Deactivated0

+ + + +
+ +
+ +
+ +
+ +
+ +
+ + Review details'; + + } else { + + echo 'No information available'; + + } + ?> + +
+ +
+ +
+ +
+ + + + +
+ + +
+
\ No newline at end of file diff --git a/admin/templates/start.php b/admin/templates/start.php index 1bdef5b3..25948725 100644 --- a/admin/templates/start.php +++ b/admin/templates/start.php @@ -1,4 +1,66 @@ - + - \ No newline at end of file +
+

Getting Started

+
+ +

Ultimate Member has been designed to be as easy to use as possible and you shouldn’t run into any difficulties. However, the plugin contains lots of different elements so we have created the following page to help you get started with Ultimate Member.

+ +
+
+ +
+ +
+ +
+ +
+

Automatically installed pages

+

Upon activation the plugin will install 7 core pages. These pages are required for the plugin to function correctly and cannot be deleted.

+

+

+

+
+ +
+

Getting started

+

The plugin has several different elements in the WordPress admin that allow you to customize your community/membership site:

+

+

+

+
+ +
+ +
+ +
+ +
+

Need more help?

+
+ +

If you want to learn more about Ultimate Member you’ll need to register on our website where you will be able to interact and get help from other Ultimate Member users via our community forum and also be able to access other useful resources including the plugin’s documentation.

+ +

Join the Ultimate Member Community

+ +
+
+ + \ No newline at end of file diff --git a/assets/css/um-members.css b/assets/css/um-members.css index ef008b28..19556dc2 100644 --- a/assets/css/um-members.css +++ b/assets/css/um-members.css @@ -179,8 +179,8 @@ .um-member.with-cover .um-member-photo {padding-top: 0} .um-member.with-cover .um-member-photo img { - width: 100px; - height: 100px; + width: 90px; + height: 90px; position: relative; top: -35px; margin-bottom: -45px !important; @@ -205,7 +205,7 @@ .um-member-name a { font-size: 16px; line-height: 26px; - color: #666; + color: #444; font-weight: 700; } diff --git a/assets/css/um-responsive.css b/assets/css/um-responsive.css index 8ad93318..3be79117 100644 --- a/assets/css/um-responsive.css +++ b/assets/css/um-responsive.css @@ -170,7 +170,7 @@ div.uimob340 .um-search .um-search-submit .um-button { } div.uimob340 .um-member {width: 100%} -div.uimob340 .um-gutter-sizer {width: 0px} +div.uimob340 .um-gutter-sizer {width: 0px} div.uimob340 .um-account-main { float: none; @@ -465,7 +465,7 @@ div.uimob800 .um-profile-photo-overlay } div.uimob800 .um-member {width: 48%} -div.uimob800 .um-gutter-sizer {width: 4%} +div.uimob800 .um-gutter-sizer {width: 4%} /********************************************/ @@ -510,7 +510,7 @@ div.uimob960 .um-search .um-search-submit .um-button { div.uimob960 .um-search .um-search-submit .um-button.um-alt {float: right} div.uimob960 .um-member {width: 48%} -div.uimob960 .um-gutter-sizer {width: 4%} +div.uimob960 .um-gutter-sizer {width: 4%} /************************************************/ diff --git a/assets/css/um-styles.css b/assets/css/um-styles.css index 52552834..a8c00953 100644 --- a/assets/css/um-styles.css +++ b/assets/css/um-styles.css @@ -88,24 +88,6 @@ .um-col-133 {float: right;width: 30%;min-height: 1px;height: auto;} -#wp-admin-bar-um_parent .ab-icon:before{ - font-family: "dashicons" !important; - content: "\f110" !important; - top: 3px !important; -} - -@media screen and (max-width: 782px) { - #wpadminbar li#wp-admin-bar-um_parent { - display: block; - } -} - -@media screen and (max-width: 600px) { - #wpadminbar li#wp-admin-bar-um_parent { - display: none; - } -} - /* - Font Icons */ diff --git a/core/um-actions-form.php b/core/um-actions-form.php index 71cf1179..d8f54800 100644 --- a/core/um-actions-form.php +++ b/core/um-actions-form.php @@ -1,10 +1,71 @@ $array ) { - if ( isset($array['validate']) && in_array( $array['validate'], array('unique_username','unique_email','unique_username_or_email') ) ) { - - if ( in_array( $args[$key], $words ) ) { - + if ( preg_grep( "/".$args[$key]."/i" , $words ) ) { $ultimatemember->form->add_error( $key, __('You are not allowed to use this word as your username.') ); - } - } - } } @@ -47,17 +101,22 @@ $fields = unserialize( $args['custom_fields'] ); - if ( $mode == 'login' ) { + if ( $mode == 'register' ){ + do_action("um_submit_form_errors_hook__registration", $args ); + } - do_action('um_submit_form_errors_hook_login', $args ); + do_action("um_submit_form_errors_hook__blockedips", $args ); + do_action("um_submit_form_errors_hook__blockedemails", $args ); + + if ( $mode == 'login' ) { + do_action('um_submit_form_errors_hook_login', $args ); do_action('um_submit_form_errors_hook_logincheck', $args ); } else { do_action('um_submit_form_errors_hook_', $args ); - - do_action("um_submit_form_errors_hook__blacklist", $args ); + do_action("um_submit_form_errors_hook__blockedwords", $args ); } diff --git a/core/um-actions-members.php b/core/um-actions-members.php index d81b01ac..42de8631 100644 --- a/core/um-actions-members.php +++ b/core/um-actions-members.php @@ -190,9 +190,7 @@ } if ( um_members('users_per_page') ) { - - $default_size = str_replace( 'px', '', um_get_option('profile_photosize') ); - + ?>
@@ -205,13 +203,23 @@ - + mobile->isTablet() ) { + $cover_size = 600; + } else { + $cover_size = 300; + } + + ?> +
-
+
+ - +
diff --git a/core/um-actions-misc.php b/core/um-actions-misc.php index 518a5c39..b736ba22 100644 --- a/core/um-actions-misc.php +++ b/core/um-actions-misc.php @@ -50,8 +50,12 @@ global $ultimatemember; extract($args); $output = ''; + + if ( !get_option('users_can_register') && $mode == 'register' ) { + $err = __('Registration is currently disabled','ultimatemember'); + } - if ( isset( $_REQUEST['updated'] ) && !empty( $_REQUEST['updated'] ) ) { + if ( isset( $_REQUEST['updated'] ) && !empty( $_REQUEST['updated'] ) && !$ultimatemember->form->errors ) { switch( $_REQUEST['updated'] ) { case 'password_changed': $success = __('You have successfully changed your password.','ultimatemember'); @@ -59,8 +63,17 @@ } } - if ( isset( $_REQUEST['err'] ) && !empty( $_REQUEST['err'] ) ) { + if ( isset( $_REQUEST['err'] ) && !empty( $_REQUEST['err'] ) && !$ultimatemember->form->errors ) { switch( $_REQUEST['err'] ) { + case 'registration_disabled': + $err = __('Registration is currently disabled','ultimatemember'); + break; + case 'blocked_email': + $err = __('This email address has been blocked.','ultimatemember'); + break; + case 'blocked_ip': + $err = __('Your IP address has been blocked.','ultimatemember'); + break; case 'inactive': $err = __('Your account has been disabled.','ultimatemember'); break; @@ -80,6 +93,10 @@ $output .= '

' . $err . '

'; } + if ( isset( $success ) ) { + $output .= '

' . $success . '

'; + } + echo $output; } \ No newline at end of file diff --git a/core/um-actions-profile.php b/core/um-actions-profile.php index da7aaf21..633c291b 100644 --- a/core/um-actions-profile.php +++ b/core/um-actions-profile.php @@ -65,13 +65,17 @@ fields->editing ) { - echo $ultimatemember->menu->new_ui( 'bc', 'div.um-cover', 'click', array( + + $items = array( ''.__('Change cover photo','ultimatemember').'', ''.__('Remove','ultimatemember').'', ''.__('Cancel','ultimatemember').'', - ) ); + ); + + echo $ultimatemember->menu->new_ui( 'bc', 'div.um-cover', 'click', $items ); + } - + ?> fields->add_hidden_field( 'cover_photo' ); ?> @@ -156,18 +160,22 @@ if ( !um_profile('profile_photo') ) { // has profile photo - echo $ultimatemember->menu->new_ui( 'bc', 'div.um-profile-photo', 'click', array( + $items = array( ''.__('Upload photo','ultimatemember').'', ''.__('Cancel','ultimatemember').'', - ) ); + ); + + echo $ultimatemember->menu->new_ui( 'bc', 'div.um-profile-photo', 'click', $items ); } else if ( $ultimatemember->fields->editing == true ) { - echo $ultimatemember->menu->new_ui( 'bc', 'div.um-profile-photo', 'click', array( + $items = array( ''.__('Change photo','ultimatemember').'', ''.__('Remove photo','ultimatemember').'', ''.__('Cancel','ultimatemember').'', - ) ); + ); + + echo $ultimatemember->menu->new_ui( 'bc', 'div.um-profile-photo', 'click', $items ); } @@ -261,7 +269,7 @@ if ( !is_user_logged_in() ) return; // not allowed for guests - if ( isset( $ultimatemember->user->cannot_edit ) && $ultimatemember->user->cannot_edit == 1 ) return; + if ( isset( $ultimatemember->user->cannot_edit ) && $ultimatemember->user->cannot_edit == 1 ) return; // do not proceed if user cannot edit if ( $ultimatemember->fields->editing == true ) { @@ -281,19 +289,31 @@ ''.__('My Account','ultimatemember').'', + $items = array( 'editprofile' => ''.__('Edit Profile','ultimatemember').'', + 'myaccount' => ''.__('My Account','ultimatemember').'', 'cancel' => ''.__('Cancel','ultimatemember').'', ); + + $cancel = $items['cancel']; if ( !um_is_myprofile() ) { + $actions = $ultimatemember->user->get_admin_actions(); - unset($menu_items['myaccount']); - $menu_items = array_merge( $actions, $menu_items ); + + unset( $items['cancel'] ); + $items = array_merge( $items, $actions ); + $items['cancel'] = $cancel; + + $items = apply_filters('um_profile_edit_menu_items', $items ); + + } else { + + $items = apply_filters('um_myprofile_edit_menu_items', $items ); + } - echo $ultimatemember->menu->new_ui( 'bc', 'div.um-profile-edit', 'click', $menu_items ); + echo $ultimatemember->menu->new_ui( 'bc', 'div.um-profile-edit', 'click', $items ); ?> diff --git a/core/um-actions-wpadmin.php b/core/um-actions-wpadmin.php index b3a0eef1..0210ba81 100644 --- a/core/um-actions-wpadmin.php +++ b/core/um-actions-wpadmin.php @@ -21,107 +21,4 @@ return true; } } - add_filter( 'show_admin_bar' , 'um_control_admin_bar'); - - /*** - *** @show admin bar menu for plugin - ***/ - add_action('admin_bar_menu', 'um_plugin_admin_bar', 99999999 ); - function um_plugin_admin_bar() { - - global $wp_admin_bar; - - if( !is_super_admin() || !is_admin_bar_showing() || is_admin() ) return; - - if ( !um_get_option('wpadmin_um_bar') ) return; - - $args = array( - 'id' => 'um_parent', - 'title' => 'Ultimate Member', - 'href' => admin_url('admin.php?page=ultimatemember-about'), - 'meta' => array( ) - ); - - $wp_admin_bar->add_node( $args ); - - $args = array( - 'parent' => 'um_parent', - 'id' => 'um_sub1', - 'title' => 'About this plugin', - 'href' => admin_url('admin.php?page=ultimatemember-about'), - 'meta' => array( ) - ); - - $wp_admin_bar->add_node( $args ); - - $args = array( - 'parent' => 'um_parent', - 'id' => 'um_sub2', - 'title' => 'Getting Started', - 'href' => admin_url('admin.php?page=ultimatemember-start'), - 'meta' => array( ) - ); - - $wp_admin_bar->add_node( $args ); - - $args = array( - 'parent' => 'um_parent', - 'id' => 'um_sub3', - 'title' => 'Dashboard', - 'href' => admin_url('admin.php?page=ultimatemember'), - 'meta' => array( ) - ); - - $wp_admin_bar->add_node( $args ); - - $args = array( - 'parent' => 'um_parent', - 'id' => 'um_sub4', - 'title' => 'Settings', - 'href' => admin_url('admin.php?page=um_options'), - 'meta' => array( ) - ); - - $wp_admin_bar->add_node( $args ); - - $args = array( - 'parent' => 'um_parent', - 'id' => 'um_sub5', - 'title' => 'Forms', - 'href' => admin_url('edit.php?post_type=um_form'), - 'meta' => array( ) - ); - - $wp_admin_bar->add_node( $args ); - - $args = array( - 'parent' => 'um_parent', - 'id' => 'um_sub6', - 'title' => 'Member Levels', - 'href' => admin_url('edit.php?post_type=um_role'), - 'meta' => array( ) - ); - - $wp_admin_bar->add_node( $args ); - - $args = array( - 'parent' => 'um_parent', - 'id' => 'um_sub7', - 'title' => 'Member Directories', - 'href' => admin_url('edit.php?post_type=um_directory'), - 'meta' => array( ) - ); - - $wp_admin_bar->add_node( $args ); - - $args = array( - 'parent' => 'um_parent', - 'id' => 'um_sub8', - 'title' => 'Members', - 'href' => admin_url('users.php'), - 'meta' => array( ) - ); - - $wp_admin_bar->add_node( $args ); - - } \ No newline at end of file + add_filter( 'show_admin_bar' , 'um_control_admin_bar'); \ No newline at end of file diff --git a/core/um-filters-login.php b/core/um-filters-login.php index 86ab4c13..30e092e6 100644 --- a/core/um-filters-login.php +++ b/core/um-filters-login.php @@ -1,5 +1,44 @@ '.$err.'
'; + } + + return $message; + } + + /*** + *** @check for blocked ip + ***/ + add_filter('authenticate', 'um_wp_form_errors_hook_ip_test', 10, 3); + function um_wp_form_errors_hook_ip_test( $user, $username, $password ) { + if (!empty($username)) { + + do_action("um_submit_form_errors_hook__blockedips", $args=array() ); + do_action("um_submit_form_errors_hook__blockedemails", $args=array('username' => $username ) ); + + } + + return $user; + } + /*** *** @login checks thru the wordpress admin login ***/ diff --git a/core/um-query.php b/core/um-query.php index c4133c6b..afe7ab1a 100644 --- a/core/um-query.php +++ b/core/um-query.php @@ -21,7 +21,7 @@ class UM_Query { /*** *** @Get users by meta ***/ - function get_users_by_meta($rule, $number = 5){ + function get_users_by_status($rule, $number = 5){ global $wpdb; $args = array( 'fields' => 'ID', 'number' => $number, 'orderby' => 'user_registered', 'order' => 'desc' ); diff --git a/core/um-short-functions.php b/core/um-short-functions.php index 484b333d..e4a538db 100644 --- a/core/um-short-functions.php +++ b/core/um-short-functions.php @@ -42,15 +42,6 @@ return $value; } - /*** - *** @Get number of pending notifications for a meta - ***/ - function um_notify( $rule ) { - global $ultimatemember; - $results = $ultimatemember->query->get_users_by_meta( $rule, 100 ); - return count($results); - } - /*** *** @profile user ID ***/ diff --git a/core/um-user.php b/core/um-user.php index 71d9df46..92eed733 100644 --- a/core/um-user.php +++ b/core/um-user.php @@ -200,6 +200,8 @@ class UM_User { $old_status = ( isset( $this->profile['account_status'] ) ) ? $this->profile['account_status'] : 'null'; + if ( $status == $old_status ) return; // to prevent spam + do_action('um_before_user_status_is_changed', $old_status ); $this->profile['account_status'] = $status; diff --git a/um-config.php b/um-config.php index 6072783d..538fe99a 100644 --- a/um-config.php +++ b/um-config.php @@ -12,16 +12,6 @@ $this->sections[] = array( 'title' => __( 'Registration'), 'fields' => array( - array( - 'id' => 'registration', - 'type' => 'switch', - 'title' => __( 'Registration Status' ), - 'default' => 1, - 'desc' => 'Enable/disable new user registration globally on your site', - 'on' => 'Enabled', - 'off' => 'Disabled', - ), - array( 'id' => 'default_role', 'type' => 'select', @@ -248,16 +238,6 @@ $this->sections[] = array( 'title' => __( 'Backend'), 'fields' => array( - array( - 'id' => 'wpadmin_um_bar', - 'type' => 'switch', - 'title' => __( 'Show Ultimate Member in admin bar when browsing the frontend?' ), - 'default' => 1, - 'desc' => 'Control whether to show or hide the Ultimate Member admin bar when you are browsing the frontend.', - 'on' => __('Yes','ultimatemember'), - 'off' => __('No','ultimatemember'), - ), - array( 'id' => 'panic_key', 'type' => 'text', @@ -350,7 +330,7 @@ $this->sections[] = array( 'type' => 'textarea', 'title' => __( 'Blocked IP Addresses' ), 'desc' => __( 'Enter one IP per line, you can also use wildcards to block a specific range e.g. 41.83.*.*' ), - 'desc' => __('This will block these IPs from accessing the site, you can use full IP numbers or target specific range with a wildcard') + 'desc' => __('This will block the listed IPs from signing up or signing in to the site, you can use full IP numbers or target specific range with a wildcard') ), array( @@ -880,7 +860,7 @@ $this->sections[] = array( 'width' => '150', 'height' => '150', 'title' => __('Default Profile Picture', 'ultimatemember'), - 'desc' => __('You can change the default profile picture globally here. Please make sure photo is 300x300px.', 'ultimatemember'), + 'desc' => __('You can change the default profile picture globally here. Please make sure that the photo is 300x300px.', 'ultimatemember'), 'default' => array( 'url' => um_url . 'assets/img/default_avatar.jpg', ),