- 2.0.49 release;

This commit is contained in:
nikitasinelnikov
2019-05-29 18:51:22 +03:00
parent b7f65e76b1
commit 572f47033f
15 changed files with 531 additions and 487 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ Ultimate Member is the #1 user profile & membership plugin for WordPress. The pl
| Latest Version |Requires at least|Stable Tag|
| :------------: |:------------:|:------------:|
| 2.0.48 | WordPress 4.9 or higher| 2.0.48 |
| 2.0.49 | WordPress 4.9 or higher| 2.0.49 |
Features of the plugin include:
@@ -48,7 +48,7 @@ GNU Version 2 or Any Later Version
Releases
====================
[Official Release Version: 2.0.48](https://github.com/ultimatemember/ultimatemember/releases/tag/2.0.48).
[Official Release Version: 2.0.49](https://github.com/ultimatemember/ultimatemember/releases/tag/2.0.49).
Changelog
====================
+10 -2
View File
@@ -1225,8 +1225,16 @@ if ( ! class_exists( 'um\core\Builtin' ) ) {
*/
function all_user_fields( $exclude_types = null, $show_all = false ) {
$fields_without_metakey = array('block','shortcode','spacing','divider','group');
remove_filter('um_fields_without_metakey', 'um_user_tags_requires_no_metakey');
$fields_without_metakey = array(
'block',
'shortcode',
'spacing',
'divider',
'group'
);
$fields_without_metakey = apply_filters( 'um_fields_without_metakey', $fields_without_metakey );
remove_filter( 'um_fields_without_metakey', 'um_user_tags_requires_no_metakey' );
/**
* UM hook
+3 -3
View File
@@ -2084,19 +2084,19 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
$output .= '<div class="um-field' . $classes . '"' . $conditional . ' data-key="' . $key . '">';
if (isset( $data['label'] )) {
if ( isset( $data['label'] ) ) {
$output .= $this->field_label( $label, $key, $data );
}
$output .= '<div class="um-field-area">';
if (isset( $icon ) && $icon && isset( $this->field_icons ) && $this->field_icons == 'field') {
if ( isset( $icon ) && $icon && isset( $this->field_icons ) && $this->field_icons == 'field') {
$output .= '<div class="um-field-icon"><i class="' . $icon . '"></i></div>';
}
$output .= '<input ' . $disabled . ' class="' . $this->get_class( $key, $data ) . '" type="' . $input . '" name="' . $key . UM()->form()->form_suffix . '" id="' . $key . UM()->form()->form_suffix . '" value="' . $this->field_value( $key, $default, $data ) . '" placeholder="' . $placeholder . '" data-validate="' . $validate . '" data-key="' . $key . '" />
$output .= '<input ' . $disabled . ' class="' . $this->get_class( $key, $data ) . '" type="' . $input . '" name="' . $key . UM()->form()->form_suffix . '" id="' . $key . UM()->form()->form_suffix . '" value="' . esc_attr( $this->field_value( $key, $default, $data ) ) . '" placeholder="' . esc_attr( $placeholder ) . '" data-validate="' . $validate . '" data-key="' . $key . '" />
</div>';
+1 -1
View File
@@ -337,7 +337,7 @@ if ( ! class_exists( 'um\core\Profile' ) ) {
foreach ( $array as $key ) {
if ( $key ) {
$data = array();
if ( isset( UM()->builtin()->all_user_fields[ $key ] ) ){
if ( isset( UM()->builtin()->all_user_fields[ $key ] ) ) {
$data = UM()->builtin()->all_user_fields[ $key ];
}
+14 -8
View File
@@ -82,8 +82,10 @@ if ( ! class_exists( 'um\core\User' ) ) {
add_action( 'user_register', array( &$this, 'set_gravatar' ), 11, 1 );
add_action( 'added_existing_user', array( &$this, 'add_um_role_existing_user' ), 10, 2 );
add_action( 'wpmu_activate_user', array( &$this, 'add_um_role_wpmu_new_user' ), 10, 1 );
if ( is_multisite() ) {
add_action( 'added_existing_user', array( &$this, 'add_um_role_existing_user' ), 10, 2 );
add_action( 'wpmu_activate_user', array( &$this, 'add_um_role_wpmu_new_user' ), 10, 1 );
}
add_action( 'init', array( &$this, 'check_membership' ), 10 );
@@ -187,8 +189,9 @@ if ( ! class_exists( 'um\core\User' ) ) {
*/
function add_um_role_existing_user( $user_id, $result ) {
// Bail if no user ID was passed
if ( empty( $user_id ) )
if ( empty( $user_id ) ) {
return;
}
if ( ! empty( $_POST['um-role'] ) ) {
if ( ! user_can( $user_id, $_POST['um-role'] ) ) {
@@ -427,8 +430,9 @@ if ( ! class_exists( 'um\core\User' ) ) {
*/
function user_register_via_admin( $user_id ) {
if ( empty( $user_id ) )
if ( empty( $user_id ) ) {
return;
}
if ( is_admin() ) {
//if there custom 2 role not empty
@@ -481,10 +485,12 @@ if ( ! class_exists( 'um\core\User' ) ) {
$userdata = get_userdata( $user_id );
$new_roles = $userdata->roles;
if ( ! empty( $_POST['um-role'] ) ) {
$new_roles = array_merge( $new_roles, array( $_POST['um-role'] ) );
if ( ! user_can( $user_id, $_POST['um-role'] ) ) {
UM()->roles()->set_role( $user_id, $_POST['um-role'] );
if ( is_admin() ) {
if ( ! empty( $_POST['um-role'] ) ) {
$new_roles = array_merge( $new_roles, array( $_POST['um-role'] ) );
if ( ! user_can( $user_id, $_POST['um-role'] ) ) {
UM()->roles()->set_role( $user_id, $_POST['um-role'] );
}
}
}
+1 -1
View File
@@ -171,7 +171,7 @@ function um_submit_account_details( $args ) {
UM()->user()->password_changed();
do_action( 'send_password_change_email', $args );
add_filter( 'send_password_change_email', '__return_false' );
//clear all sessions with old passwords
$user = WP_Session_Tokens::get_instance( um_user( 'ID' ) );
+2 -2
View File
@@ -119,7 +119,7 @@ function um_profile_content_main( $args ) {
* }
* ?>
*/
do_action( "um_after_form_fields", $args );
do_action( 'um_after_form_fields', $args );
/**
* UM hook
@@ -921,7 +921,7 @@ function um_profile_header( $args ) {
</div>
<?php if (isset( $args['metafields'] ) && !empty( $args['metafields'] )) { ?>
<?php if ( ! empty( $args['metafields'] ) ) { ?>
<div class="um-meta">
<?php echo UM()->profile()->show_meta( $args['metafields'] ); ?>
+21
View File
@@ -378,6 +378,27 @@ function um_prepare_user_query_args( $query_args, $args ) {
} elseif ( 'display_name' == $sortby ) {
/*$display_name = UM()->options()->get( 'display_name' );
if ( $display_name == 'username' ) {
$query_args['orderby'] = 'user_login';
$order = 'ASC';
} else {
$query_args['meta_query'][] = array(
'relation' => 'OR',
'full_name' => array(
'key' => 'full_name',
'compare' => 'EXISTS'
),
array(
'key' => 'full_name',
'compare' => 'NOT EXISTS'
)
);
$query_args['orderby'] = 'full_name, display_name';
$order = 'ASC';
}*/
$query_args['meta_query'][] = array(
'relation' => 'OR',
'full_name' => array(
File diff suppressed because it is too large Load Diff
+10 -1
View File
@@ -6,7 +6,7 @@ Donate link:
Tags: community, member, membership, user-profile, user-registration
Requires at least: 4.9
Tested up to: 5.2
Stable tag: 2.0.48
Stable tag: 2.0.49
License: GNU Version 2 or Any Later Version
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
@@ -133,6 +133,15 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
= Important: UM2.0+ is a significant update to the code base from 1.3.88. Please make sure you take a full-site backup with restore point before updating the plugin =
= 2.0.49: May 29, 2019 =
* Enhancements:
- Extended hooks for 3rd party integrations
* Bugfixes:
- Fixed security vulnerability with registration form
- Fixed the using of deprecated send password hook
= 2.0.48: May 16, 2019 =
* Enhancements:
+1 -1
View File
@@ -87,7 +87,7 @@
* }
* ?>
*/
do_action( "um_after_form_fields", $args );
do_action( 'um_after_form_fields', $args );
/**
* UM hook
+1 -1
View File
@@ -89,7 +89,7 @@
* }
* ?>
*/
do_action( "um_after_form_fields", $args ); ?>
do_action( 'um_after_form_fields', $args ); ?>
</form>
</div>
</div>
+1 -1
View File
@@ -137,7 +137,7 @@
* }
* ?>
*/
do_action( "um_after_form_fields", $args );
do_action( 'um_after_form_fields', $args );
} ?>
</form>
</div>
+1 -1
View File
@@ -87,7 +87,7 @@
* }
* ?>
*/
do_action( "um_after_form_fields", $args );
do_action( 'um_after_form_fields', $args );
/**
* UM hook
+1 -1
View File
@@ -3,7 +3,7 @@
Plugin Name: Ultimate Member
Plugin URI: http://ultimatemember.com/
Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress
Version: 2.0.48
Version: 2.0.49
Author: Ultimate Member
Author URI: http://ultimatemember.com/
Text Domain: ultimate-member