mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-16 05:03:33 +09:00
Merge pull request #831 from ultimatemember/development/2.1.20
Development/2.1.20
This commit is contained in:
@@ -41,7 +41,7 @@ GNU Version 2 or Any Later Version
|
||||
|
||||
## Releases
|
||||
|
||||
[Official Release Version: 2.1.19](https://github.com/ultimatemember/ultimatemember/releases/tag/2.1.19).
|
||||
[Official Release Version: 2.1.20](https://github.com/ultimatemember/ultimatemember/releases/tag/2.1.20).
|
||||
|
||||
## Changelog
|
||||
|
||||
|
||||
@@ -275,6 +275,11 @@ if ( ! class_exists( 'um\admin\core\Admin_Menu' ) ) {
|
||||
$size = 0;
|
||||
|
||||
foreach( new \RecursiveIteratorIterator( new \RecursiveDirectoryIterator( $directory ) ) as $file ) {
|
||||
$filename = $file->getFilename();
|
||||
if ( $filename == '.' || $filename == '..' ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$size += $file->getSize();
|
||||
}
|
||||
return round ( $size / 1048576, 2);
|
||||
|
||||
@@ -652,7 +652,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
'id' => 'activation_link_expiry_time',
|
||||
'type' => 'number',
|
||||
'label' => __( 'Activation link lifetime', 'ultimate-member' ),
|
||||
'tooltip' => __( 'How long does an activation link live? Leave empty for endless links.', 'ultimate-member' ),
|
||||
'tooltip' => __( 'How long does an activation link live in seconds? Leave empty for endless links.', 'ultimate-member' ),
|
||||
'size' => 'small',
|
||||
),
|
||||
)
|
||||
|
||||
@@ -4346,14 +4346,14 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
||||
if ( UM()->options()->get( 'profile_empty_text' ) ) {
|
||||
|
||||
$emo = UM()->options()->get( 'profile_empty_text_emo' );
|
||||
if ($emo) {
|
||||
if ( $emo ) {
|
||||
$emo = '<i class="um-faicon-frown-o"></i>';
|
||||
} else {
|
||||
$emo = false;
|
||||
}
|
||||
|
||||
if (um_is_myprofile()) {
|
||||
$output .= '<p class="um-profile-note">' . $emo . '<span>' . sprintf( __( 'Your profile is looking a little empty. Why not <a href="%s">add</a> some information!', 'ultimate-member' ), um_edit_profile_url() ) . '</span></p>';
|
||||
if ( um_is_myprofile() ) {
|
||||
$output .= '<p class="um-profile-note">' . $emo . '<span>' . sprintf( __( 'Your profile is looking a little empty. Why not <a href="%s">add</a> some information!', 'ultimate-member' ), esc_url( um_edit_profile_url() ) ) . '</span></p>';
|
||||
} else {
|
||||
$output .= '<p class="um-profile-note">' . $emo . '<span>' . __( 'This user has not added any information to their profile yet.', 'ultimate-member' ) . '</span></p>';
|
||||
}
|
||||
|
||||
@@ -88,14 +88,14 @@ if ( ! class_exists( 'um\core\Permalinks' ) ) {
|
||||
if ( !$id = $wp_the_query->get_queried_object_id() )
|
||||
return;
|
||||
|
||||
if( UM()->config()->permalinks['user'] == $id ) {
|
||||
$link = $this->get_current_url();
|
||||
if ( UM()->config()->permalinks['user'] == $id ) {
|
||||
$link = esc_url( $this->get_current_url() );
|
||||
echo "<link rel='canonical' href='$link' />\n";
|
||||
return;
|
||||
}
|
||||
|
||||
$link = get_permalink( $id );
|
||||
if ( $page = get_query_var('cpage') ){
|
||||
if ( $page = get_query_var( 'cpage' ) ){
|
||||
$link = get_comments_pagenum_link( $page );
|
||||
echo "<link rel='canonical' href='$link' />\n";
|
||||
}
|
||||
@@ -303,7 +303,7 @@ if ( ! class_exists( 'um\core\Permalinks' ) ) {
|
||||
* @return string
|
||||
*/
|
||||
function add_query( $key, $value ) {
|
||||
$this->current_url = add_query_arg( $key, $value, $this->get_current_url() );
|
||||
$this->current_url = add_query_arg( $key, $value, $this->get_current_url() );
|
||||
return $this->current_url;
|
||||
}
|
||||
|
||||
|
||||
@@ -96,14 +96,14 @@ if ( ! class_exists( 'um\core\Profile' ) ) {
|
||||
* @return array
|
||||
*/
|
||||
function tabs_privacy() {
|
||||
$privacy = array(
|
||||
$privacy = apply_filters( 'um_profile_tabs_privacy_list', array(
|
||||
0 => __( 'Anyone', 'ultimate-member' ),
|
||||
1 => __( 'Guests only', 'ultimate-member' ),
|
||||
2 => __( 'Members only', 'ultimate-member' ),
|
||||
3 => __( 'Only the owner', 'ultimate-member' ),
|
||||
4 => __( 'Only specific roles', 'ultimate-member' ),
|
||||
5 => __( 'Owner and specific roles', 'ultimate-member' ),
|
||||
);
|
||||
) );
|
||||
|
||||
return $privacy;
|
||||
}
|
||||
@@ -249,7 +249,7 @@ if ( ! class_exists( 'um\core\Profile' ) ) {
|
||||
break;
|
||||
|
||||
default:
|
||||
$can_view = true;
|
||||
$can_view = apply_filters( 'um_profile_menu_can_view_tab', true, $privacy, $tab, $tab_data, $target_id );
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -677,7 +677,10 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) {
|
||||
|
||||
//not display on admin preview
|
||||
if ( empty( $_POST['act_id'] ) || $_POST['act_id'] != 'um_admin_preview_form' ) {
|
||||
if ( 'register' == $mode && is_user_logged_in() ) {
|
||||
|
||||
$enable_loggedin_registration = apply_filters( 'um_registration_for_loggedin_users', false, $args );
|
||||
|
||||
if ( 'register' == $mode && is_user_logged_in() && ! $enable_loggedin_registration ) {
|
||||
ob_get_clean();
|
||||
return __( 'You are already registered', 'ultimate-member' );
|
||||
}
|
||||
|
||||
@@ -363,6 +363,9 @@ function um_user_edit_profile( $args ) {
|
||||
|
||||
}
|
||||
|
||||
// use this filter after all validations has been completed and we can extends data based on key
|
||||
$to_update = apply_filters( 'um_change_usermeta_for_update', $to_update, $args, $fields, $key );
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ function um_dynamic_login_page_redirect( $redirect_to = '' ) {
|
||||
|
||||
$uri = um_get_core_page( 'login' );
|
||||
|
||||
if (!$redirect_to) {
|
||||
if ( ! $redirect_to ) {
|
||||
$redirect_to = UM()->permalinks()->get_current_url();
|
||||
}
|
||||
|
||||
|
||||
+12
-1
@@ -7,7 +7,7 @@ Tags: community, member, membership, user-profile, user-registration
|
||||
Requires PHP: 5.6
|
||||
Requires at least: 5.0
|
||||
Tested up to: 5.7
|
||||
Stable tag: 2.1.19
|
||||
Stable tag: 2.1.20
|
||||
License: GNU Version 2 or Any Later Version
|
||||
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
||||
|
||||
@@ -155,6 +155,17 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
|
||||
* To learn more about version 2.1 please see this [docs](https://docs.ultimatemember.com/article/1512-upgrade-2-1-0)
|
||||
* UM2.1+ is a significant update to the Member Directories' code base from 2.0.x. Please make sure you take a full-site backup with restore point before updating the plugin
|
||||
|
||||
= 2.1.20: May 7, 2021 =
|
||||
|
||||
* Enhancements:
|
||||
- Added: Hook to unlock the ability to add new users through the registration form
|
||||
- Added: Filter hook 'um_change_usermeta_for_update' for extending `$to_update` usermeta array after all profile fields validations
|
||||
- Added: Filter hook 'um_profile_tabs_privacy_list' and 'um_profile_menu_can_view_tab' for extending privacy options for Profile Tabs
|
||||
|
||||
* Bugfixes:
|
||||
- Fixed: XSS vulnerability when getting user profile URL
|
||||
- Fixed: Temp directory size calculation
|
||||
|
||||
= 2.1.19: April 20, 2021 =
|
||||
|
||||
* Bugfixes:
|
||||
|
||||
+1
-1
@@ -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.1.19
|
||||
Version: 2.1.20
|
||||
Author: Ultimate Member
|
||||
Author URI: http://ultimatemember.com/
|
||||
Text Domain: ultimate-member
|
||||
|
||||
Reference in New Issue
Block a user