Update 1.0.58

This commit is contained in:
ultimatemember
2015-02-17 00:51:40 +02:00
parent 60943d9695
commit 251f7b0ef7
14 changed files with 79 additions and 35 deletions
+3 -3
View File
@@ -52,12 +52,12 @@
$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', // Name that appears at the top of your panel
'display_name' => __('Settings', '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
'menu_title' => __('Settings', 'redux-framework-demo'),
'page_title' => __('Settings', 'redux-framework-demo'),
'menu_title' => __('Settings', 'ultimatemember'),
'page_title' => __('Settings', 'ultimatemember'),
'google_api_key' => '', // Must be defined to add google fonts to the typography module
'async_typography' => true, // Use a asynchronous font on the front end or font string
+8 -1
View File
@@ -15,7 +15,14 @@ jQuery(document).ready(function() {
live_value = jQuery(this).val();
if ( jQuery(this).is(':checkbox') ) {
live_value = jQuery(this).parents('.um-field').find('input:checked').val();
if ( jQuery(this).parents('.um-field').find('input:checked').length > 1 ) {
live_value = '';
jQuery(this).parents('.um-field').find('input:checked').each(function(){
live_value = live_value + jQuery(this).val() + ' ';
});
} else {
live_value = jQuery(this).parents('.um-field').find('input:checked').val();
}
}
if ( jQuery(this).is(':radio') ) {
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -170,13 +170,13 @@
}
if ( isset( $array['min_chars'] ) && $array['min_chars'] > 0 ) {
if ( strlen( utf8_decode( $args[$key] ) ) < $array['min_chars'] ) {
if ( $args[$key] && strlen( utf8_decode( $args[$key] ) ) < $array['min_chars'] ) {
$ultimatemember->form->add_error($key, sprintf(__('Your %s must contain at least %s characters','ultimatemember'), $array['label'], $array['min_chars']) );
}
}
if ( isset( $array['max_chars'] ) && $array['max_chars'] > 0 ) {
if ( strlen( utf8_decode( $args[$key] ) ) > $array['max_chars'] ) {
if ( $args[$key] && strlen( utf8_decode( $args[$key] ) ) > $array['max_chars'] ) {
$ultimatemember->form->add_error($key, sprintf(__('Your %s must contain less than %s characters','ultimatemember'), $array['label'], $array['max_chars']) );
}
}
+3 -3
View File
@@ -39,14 +39,14 @@
$user_login = $user_email;
}
if ( isset( $username ) && !isset($user_login) ) {
if ( isset( $username ) && !isset($args['user_login']) ) {
$user_login = $username;
}
if ( isset( $username ) && is_email( $username ) ) {
$user_email = $username;
}
if (!isset($user_password)){
$user_password = $ultimatemember->validation->generate();
}
+11 -6
View File
@@ -6,16 +6,21 @@
add_action('um_after_user_upload','um_remove_unused_uploads', 10);
function um_remove_unused_uploads( $user_id ) {
global $ultimatemember;
um_fetch_user( $user_id );
$array = $ultimatemember->user->profile;
$files = glob( um_user_uploads_dir() . '*', GLOB_BRACE);
foreach($files as $file) {
$str = basename($file);
if ( !strstr( $str, 'profile_photo') && !strstr( $str, 'cover_photo') && !preg_grep('/' . $str . '/', $array ) )
unlink( $file );
if ( file_exists( um_user_uploads_dir() ) && $files && isset( $array ) && is_array( $array ) ) {
foreach($files as $file) {
$str = basename($file);
if ( !strstr( $str, 'profile_photo') && !strstr( $str, 'cover_photo') && !preg_grep('/' . $str . '/', $array ) )
unlink( $file );
}
}
}
+8 -1
View File
@@ -342,6 +342,9 @@ class UM_Fields {
function field_value( $key, $default = false, $data = null ) {
global $ultimatemember;
if ( isset($_SESSION) && isset($_SESSION['um_social_profile'][$key]) )
return $_SESSION['um_social_profile'][$key];
$type = (isset($data['type']))?$data['type']:'';
// preview in backend
@@ -403,6 +406,10 @@ class UM_Fields {
return true;
}
if ( strstr( $data['default'], ', ') ) {
$data['default'] = explode(', ', $data['default']);
}
if ( isset($data['default']) && !is_array($data['default']) && $data['default'] == $value ) {
return true;
}
@@ -1010,7 +1017,7 @@ class UM_Fields {
$output .= '<div class="um-field' . $classes . '"' . $conditional . ' data-key="'.$key.'">';
if ( isset( $data['label'] ) ) {
$output .= $this->field_label( sprintf(__('Confirm New %s','ultimatemember'), $data['label'] ), $key, $data);
$output .= $this->field_label( sprintf(__('Confirm %s','ultimatemember'), $data['label'] ), $key, $data);
}
$output .= '<div class="um-field-area">';
+1 -1
View File
@@ -20,7 +20,7 @@
foreach( $ultimatemember->members->core_search_fields as $key ) {
if ( isset( $query[$key] ) ) {
$query_args['search'] = '*' . $query[$key] . '*';
$query_args['search_columns'] = array( 'user_login', 'user_email' );
$query_args['search_columns'] = array( 'user_login', 'user_email', 'display_name' );
}
}
+1 -1
View File
@@ -81,7 +81,7 @@ class UM_Form {
if ( $form_timestamp == '' )
wp_die( __('Hello, spam bot!') );
if ( $live_timestamp - $form_timestamp < 5 )
if ( $live_timestamp - $form_timestamp < 3 )
wp_die( __('Whoa, slow down! You\'re seeing this message because you tried to submit a form too fast and we think you might be a spam bot. If you are a real human being please wait a few seconds before submitting the form. Thanks!') );
}
+11
View File
@@ -6,15 +6,26 @@ class UM_Members {
add_filter('pre_user_query', array(&$this, 'custom_order_query') );
add_filter('user_search_columns', array(&$this, 'add_display_name'), 99 );
add_action('template_redirect', array(&$this, 'access_members'), 555);
$this->core_search_fields = array(
'user_login',
'username',
'display_name',
);
}
/***
*** @Add display name
***/
function add_display_name(){
$search_columns[] = 'display_name';
return $search_columns;
}
/***
*** @Members page allowed?
***/
+1 -1
View File
@@ -94,7 +94,7 @@ function um_user_ip() {
***/
function um_cap_initials( $name ) {
if ( is_email( $name ) ) return $name;
$name = str_replace('\' ', '\'', ucwords(str_replace('\'', '\' ', strtolower($name))));
$name = str_replace('\' ', '\'', ucwords( str_replace('\'', '\' ', mb_strtolower($name, 'UTF-8') ) ) );
return $name;
}
+1 -1
View File
@@ -3,7 +3,7 @@
Plugin Name: Ultimate Member
Plugin URI: http://ultimatemember.com/
Description: Ultimate Member is a powerful community and membership plugin that allows you to create beautiful community and membership sites with WordPress
Version: 1.0.56
Version: 1.0.58
Author: Ultimate Member
Author URI: http://ultimatemember.com/
*/
+15 -1
View File
@@ -7,7 +7,7 @@ Tags: access control, author, authors, author profile, comments, community, comm
Requires at least: 4.1
Tested up to: 4.1
Stable Tag: 1.0.56
Stable Tag: 1.0.58
License: GNU Version 2 or Any Later Version
@@ -187,6 +187,20 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
== Changelog ==
= 1.0.58: February 16, 2015 =
* Fixed: display name as search field in member directory
* Fixed: translation issues in backend settings
* Fixed: issue with non-english letters in display names
* Fixed: bug with multiple default values for multi-select and checkbox fields
* Fixed: bug with multiple conditional logic based on different checkbox values
= 1.0.57: February 16, 2015 =
* Tweak: Italian language up-to-date
* Fixed: issue with registration where it can trigger a php warning
* Fixed: some translation issues
= 1.0.56: February 15, 2015 =
* Fixed: issue with permalink changes
+13 -13
View File
@@ -33,9 +33,9 @@ $this->sections[] = array(
'default' => 'user_login',
'desc' => 'e.g. ' . trailingslashit( um_get_core_page('user') ) .'<strong>username</strong>/',
'options' => array(
'user_login' => 'Username',
'name' => 'First and Last Name',
'user_id' => 'User ID',
'user_login' => __('Username','ultimatemember'),
'name' => __('First and Last Name','ultimatemember'),
'user_id' => __('User ID','ultimatemember'),
),
'placeholder' => __('Select...','ultimatemember')
),
@@ -48,14 +48,14 @@ $this->sections[] = array(
'desc' => __( 'This is the name that will be displayed for users on the front end of your site. Default setting uses first/last name as display name if it exists','ultimatemember' ),
'default' => 'full_name',
'options' => array(
'username' => 'Username',
'full_name' => 'First name & last name',
'sur_name' => 'Last name & first name',
'initial_name' => 'First name & first initial of last name',
'initial_name_f' => 'First initial of first name & last name',
'first_name' => 'First name only',
'public_name' => 'Display name',
'field' => 'Custom field(s)',
'username' => __('Username','ultimatemember'),
'full_name' => __('First name & last name','ultimatemember'),
'sur_name' => __('Last name & first name','ultimatemember'),
'initial_name' => __('First name & first initial of last name','ultimatemember'),
'initial_name_f' => __('First initial of first name & last name','ultimatemember'),
'first_name' => __('First name only','ultimatemember'),
'public_name' => __('Display name','ultimatemember'),
'field' => __('Custom field(s)','ultimatemember'),
),
'placeholder' => __('Select...')
),
@@ -561,7 +561,7 @@ $this->sections[] = array(
'id' => 'inactive_email_sub',
'type' => 'text',
'title' => __( 'Account Deactivated Email','ultimatemember' ),
'subtitle' => __( 'Subject Line' ),
'subtitle' => __( 'Subject Line','ultimatemember' ),
'default' => 'Your account has been deactivated',
'required' => array( 'inactive_email_on', '=', 1 ),
'desc' => __('This is the subject line of the e-mail','ultimatemember'),
@@ -1548,7 +1548,7 @@ $this->sections[] = array(
$this->sections[] = array(
'subsection' => true,
'title' => __( 'Login Form'),
'title' => __( 'Login Form','ultimatemember'),
'fields' => array(
array(