mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-13 19:56:27 +09:00
- fixed save fields register/profile;
This commit is contained in:
@@ -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.46 | WordPress 4.9 or higher| 2.0.46 |
|
||||
| 2.0.47 | WordPress 4.9 or higher| 2.0.47 |
|
||||
|
||||
|
||||
Features of the plugin include:
|
||||
@@ -48,7 +48,7 @@ GNU Version 2 or Any Later Version
|
||||
|
||||
Releases
|
||||
====================
|
||||
[Official Release Version: 2.0.46](https://github.com/ultimatemember/ultimatemember/releases/tag/2.0.46).
|
||||
[Official Release Version: 2.0.47](https://github.com/ultimatemember/ultimatemember/releases/tag/2.0.47).
|
||||
|
||||
Changelog
|
||||
====================
|
||||
|
||||
@@ -167,7 +167,7 @@ if ( ! class_exists( 'UM_Functions' ) ) {
|
||||
}
|
||||
|
||||
$path = '';
|
||||
if( $basename ) {
|
||||
if ( $basename ) {
|
||||
$array = explode( '/', trim( $basename, '/' ) );
|
||||
$path = $array[0];
|
||||
}
|
||||
@@ -279,8 +279,8 @@ if ( ! class_exists( 'UM_Functions' ) ) {
|
||||
trailingslashit( 'ultimate-member/' . $path ) . $template_name
|
||||
) );
|
||||
|
||||
if( !$template ) {
|
||||
if( $path ) {
|
||||
if ( ! $template ) {
|
||||
if ( $path ) {
|
||||
$template = trailingslashit( trailingslashit( WP_PLUGIN_DIR ) . $path );
|
||||
} else {
|
||||
$template = trailingslashit( um_path );
|
||||
|
||||
@@ -1417,10 +1417,11 @@ if ( ! class_exists( 'UM' ) ) {
|
||||
return $this->classes['mobile'];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @since 2.0.44
|
||||
*
|
||||
* @return um\lib\mobiledetect\Um_Mobile_Detect
|
||||
* @return um\core\Multisite
|
||||
*/
|
||||
function multisite() {
|
||||
|
||||
@@ -1431,6 +1432,7 @@ if ( ! class_exists( 'UM' ) ) {
|
||||
return $this->classes['multisite'];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Include files with hooked filters/actions
|
||||
*
|
||||
|
||||
@@ -2304,13 +2304,13 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
||||
$img = '';
|
||||
}
|
||||
$output .= '<div class="um-single-image-preview show ' . $crop_class . '" data-crop="' . $crop_data . '" data-key="' . $key . '">
|
||||
<a href="#" class="cancel"><i class="um-icon-close"></i></a>' . $img . '
|
||||
</div><a href="#" data-modal="um_upload_single" data-modal-size="' . $modal_size . '" data-modal-copy="1" class="um-button um-btn-auto-width">' . __( 'Change photo', 'ultimate-member' ) . '</a>';
|
||||
<a href="javascript:void(0);" class="cancel"><i class="um-icon-close"></i></a>' . $img . '
|
||||
</div><a href="javascript:void(0);" data-modal="um_upload_single" data-modal-size="' . $modal_size . '" data-modal-copy="1" class="um-button um-btn-auto-width">' . __( 'Change photo', 'ultimate-member' ) . '</a>';
|
||||
} else {
|
||||
$output .= '<div class="um-single-image-preview ' . $crop_class . '" data-crop="' . $crop_data . '" data-key="' . $key . '">
|
||||
<a href="#" class="cancel"><i class="um-icon-close"></i></a>
|
||||
<a href="javascript:void(0);" class="cancel"><i class="um-icon-close"></i></a>
|
||||
<img src="" alt="" />
|
||||
<div class="um-clear"></div></div><a href="#" data-modal="um_upload_single" data-modal-size="' . $modal_size . '" data-modal-copy="1" class="um-button um-btn-auto-width">' . $button_text . '</a>';
|
||||
<div class="um-clear"></div></div><a href="javascript:void(0);" data-modal="um_upload_single" data-modal-size="' . $modal_size . '" data-modal-copy="1" class="um-button um-btn-auto-width">' . $button_text . '</a>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
/* modal hidden */
|
||||
|
||||
@@ -75,7 +75,7 @@ if ( ! class_exists( 'um\core\Validation' ) ) {
|
||||
//validation of correct values from options in wp-admin
|
||||
if ( in_array( $fields[ $key ]['type'], array( 'select' ) ) &&
|
||||
isset( $value ) && ! empty( $fields[ $key ]['options'] ) &&
|
||||
! in_array( $value, $fields[ $key ]['options'] ) ) {
|
||||
! in_array( stripslashes( $value ), array_map( 'trim', $fields[ $key ]['options'] ) ) ) {
|
||||
unset( $changes[ $key ] );
|
||||
}
|
||||
|
||||
@@ -83,8 +83,8 @@ if ( ! class_exists( 'um\core\Validation' ) ) {
|
||||
//the user cannot set invalid value in the hidden input at the page
|
||||
if ( in_array( $fields[ $key ]['type'], array( 'multiselect', 'checkbox', 'radio' ) ) &&
|
||||
isset( $value ) && ! empty( $fields[ $key ]['options'] ) ) {
|
||||
|
||||
$changes[ $key ] = array_intersect( $value, $fields[ $key ]['options'] );
|
||||
$value = array_map( 'stripslashes', array_map( 'trim', $value ) );
|
||||
$changes[ $key ] = array_intersect( $value, array_map( 'trim', $fields[ $key ]['options'] ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -249,7 +249,7 @@ function um_user_edit_profile( $args ) {
|
||||
//validation of correct values from options in wp-admin
|
||||
if ( in_array( $array['type'], array( 'select' ) ) &&
|
||||
isset( $args['submitted'][ $key ] ) && ! empty( $array['options'] ) &&
|
||||
! in_array( $args['submitted'][ $key ], $array['options'] ) ) {
|
||||
! in_array( stripslashes( $args['submitted'][ $key ] ), array_map( 'trim', $array['options'] ) ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -257,8 +257,8 @@ function um_user_edit_profile( $args ) {
|
||||
//the user cannot set invalid value in the hidden input at the page
|
||||
if ( in_array( $array['type'], array( 'multiselect', 'checkbox', 'radio' ) ) &&
|
||||
isset( $args['submitted'][ $key ] ) && ! empty( $array['options'] ) ) {
|
||||
|
||||
$args['submitted'][ $key ] = array_intersect( $args['submitted'][ $key ], $array['options'] );
|
||||
$args['submitted'][ $key ] = array_map( 'stripslashes', array_map( 'trim', $args['submitted'][ $key ] ) );
|
||||
$args['submitted'][ $key ] = array_intersect( $args['submitted'][ $key ], array_map( 'trim', $array['options'] ) );
|
||||
}
|
||||
|
||||
if ( $array['type'] == 'multiselect' || $array['type'] == 'checkbox' && ! isset( $args['submitted'][ $key ] ) ) {
|
||||
@@ -566,7 +566,7 @@ function um_profile_header_cover_area( $args ) {
|
||||
|
||||
?>
|
||||
|
||||
<div class="um-cover <?php if (um_profile( 'cover_photo' ) || ( $default_cover && $default_cover['url'] )) echo 'has-cover'; ?>"
|
||||
<div class="um-cover <?php if ( um_profile( 'cover_photo' ) || ( $default_cover && $default_cover['url'] ) ) echo 'has-cover'; ?>"
|
||||
data-user_id="<?php echo um_profile_id(); ?>" data-ratio="<?php echo $args['cover_ratio']; ?>">
|
||||
|
||||
<?php
|
||||
@@ -595,9 +595,9 @@ function um_profile_header_cover_area( $args ) {
|
||||
$hide_remove = um_profile( 'cover_photo' ) ? false : ' style="display:none;"';
|
||||
|
||||
$items = array(
|
||||
'<a href="#" class="um-manual-trigger" data-parent=".um-cover" data-child=".um-btn-auto-width">' . __( 'Change cover photo', 'ultimate-member' ) . '</a>',
|
||||
'<a href="#" class="um-reset-cover-photo" data-user_id="' . um_profile_id() . '" ' . $hide_remove . '>' . __( 'Remove', 'ultimate-member' ) . '</a>',
|
||||
'<a href="#" class="um-dropdown-hide">' . __( 'Cancel', 'ultimate-member' ) . '</a>',
|
||||
'<a href="javascript:void(0);" class="um-manual-trigger" data-parent=".um-cover" data-child=".um-btn-auto-width">' . __( 'Change cover photo', 'ultimate-member' ) . '</a>',
|
||||
'<a href="javascript:void(0);" class="um-reset-cover-photo" data-user_id="' . um_profile_id() . '" ' . $hide_remove . '>' . __( 'Remove', 'ultimate-member' ) . '</a>',
|
||||
'<a href="javascript:void(0);" class="um-dropdown-hide">' . __( 'Cancel', 'ultimate-member' ) . '</a>',
|
||||
);
|
||||
|
||||
UM()->profile()->new_ui( 'bc', 'div.um-cover', 'click', $items );
|
||||
@@ -609,12 +609,10 @@ function um_profile_header_cover_area( $args ) {
|
||||
|
||||
<div class="um-cover-e" data-ratio="<?php echo $args['cover_ratio']; ?>">
|
||||
|
||||
<?php if (um_profile( 'cover_photo' )) { ?>
|
||||
<?php if ( um_profile( 'cover_photo' ) ) {
|
||||
|
||||
<?php
|
||||
|
||||
if (UM()->mobile()->isMobile()) {
|
||||
if (UM()->mobile()->isTablet()) {
|
||||
if ( UM()->mobile()->isMobile() ) {
|
||||
if ( UM()->mobile()->isTablet() ) {
|
||||
echo um_user( 'cover_photo', 1000 );
|
||||
} else {
|
||||
echo um_user( 'cover_photo', 300 );
|
||||
@@ -623,9 +621,7 @@ function um_profile_header_cover_area( $args ) {
|
||||
echo um_user( 'cover_photo', 1000 );
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php } else if ($default_cover && $default_cover['url']) {
|
||||
} elseif ( $default_cover && $default_cover['url'] ) {
|
||||
|
||||
$default_cover = $default_cover['url'];
|
||||
|
||||
@@ -633,10 +629,9 @@ function um_profile_header_cover_area( $args ) {
|
||||
|
||||
} else {
|
||||
|
||||
if (!isset( UM()->user()->cannot_edit )) { ?>
|
||||
if ( ! isset( UM()->user()->cannot_edit ) ) { ?>
|
||||
|
||||
<a href="#" class="um-cover-add um-manual-trigger" data-parent=".um-cover"
|
||||
data-child=".um-btn-auto-width"><span class="um-cover-add-i"><i
|
||||
<a href="javascript:void(0);" class="um-cover-add"><span class="um-cover-add-i"><i
|
||||
class="um-icon-plus um-tip-n"
|
||||
title="<?php _e( 'Upload a cover photo', 'ultimate-member' ); ?>"></i></span></a>
|
||||
|
||||
@@ -735,8 +730,8 @@ function um_profile_header( $args ) {
|
||||
if (!um_profile( 'profile_photo' )) { // has profile photo
|
||||
|
||||
$items = array(
|
||||
'<a href="#" class="um-manual-trigger" data-parent=".um-profile-photo" data-child=".um-btn-auto-width">' . __( 'Upload photo', 'ultimate-member' ) . '</a>',
|
||||
'<a href="#" class="um-dropdown-hide">' . __( 'Cancel', 'ultimate-member' ) . '</a>',
|
||||
'<a href="javascript:void(0);" class="um-manual-trigger" data-parent=".um-profile-photo" data-child=".um-btn-auto-width">' . __( 'Upload photo', 'ultimate-member' ) . '</a>',
|
||||
'<a href="javascript:void(0);" class="um-dropdown-hide">' . __( 'Cancel', 'ultimate-member' ) . '</a>',
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -767,9 +762,9 @@ function um_profile_header( $args ) {
|
||||
} else if (UM()->fields()->editing == true) {
|
||||
|
||||
$items = array(
|
||||
'<a href="#" class="um-manual-trigger" data-parent=".um-profile-photo" data-child=".um-btn-auto-width">' . __( 'Change photo', 'ultimate-member' ) . '</a>',
|
||||
'<a href="#" class="um-reset-profile-photo" data-user_id="' . um_profile_id() . '" data-default_src="' . um_get_default_avatar_uri() . '">' . __( 'Remove photo', 'ultimate-member' ) . '</a>',
|
||||
'<a href="#" class="um-dropdown-hide">' . __( 'Cancel', 'ultimate-member' ) . '</a>',
|
||||
'<a href="javascript:void(0);" class="um-manual-trigger" data-parent=".um-profile-photo" data-child=".um-btn-auto-width">' . __( 'Change photo', 'ultimate-member' ) . '</a>',
|
||||
'<a href="javascript:void(0);" class="um-reset-profile-photo" data-user_id="' . um_profile_id() . '" data-default_src="' . um_get_default_avatar_uri() . '">' . __( 'Remove photo', 'ultimate-member' ) . '</a>',
|
||||
'<a href="javascript:void(0);" class="um-dropdown-hide">' . __( 'Cancel', 'ultimate-member' ) . '</a>',
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -1121,7 +1116,7 @@ function um_add_edit_icon( $args ) {
|
||||
'editprofile' => '<a href="' . um_edit_profile_url() . '" class="real_url">' . __( 'Edit Profile', 'ultimate-member' ) . '</a>',
|
||||
'myaccount' => '<a href="' . um_get_core_page( 'account' ) . '" class="real_url">' . __( 'My Account', 'ultimate-member' ) . '</a>',
|
||||
'logout' => '<a href="' . um_get_core_page( 'logout' ) . '" class="real_url">' . __( 'Logout', 'ultimate-member' ) . '</a>',
|
||||
'cancel' => '<a href="#" class="um-dropdown-hide">' . __( 'Cancel', 'ultimate-member' ) . '</a>',
|
||||
'cancel' => '<a href="javascript:void(0);" class="um-dropdown-hide">' . __( 'Cancel', 'ultimate-member' ) . '</a>',
|
||||
);
|
||||
|
||||
if ( ! empty( UM()->user()->cannot_edit ) ) {
|
||||
|
||||
+7
-1
@@ -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.46
|
||||
Stable tag: 2.0.47
|
||||
License: GNU Version 2 or Any Later Version
|
||||
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
||||
|
||||
@@ -133,6 +133,12 @@ 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.47: May 13, 2019 =
|
||||
|
||||
* Bugfixes:
|
||||
- Fixed save special characters values
|
||||
- Fixed trim fields options before validation
|
||||
|
||||
= 2.0.46: May 10, 2019 =
|
||||
|
||||
* 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.0.46
|
||||
Version: 2.0.47
|
||||
Author: Ultimate Member
|
||||
Author URI: http://ultimatemember.com/
|
||||
Text Domain: ultimate-member
|
||||
|
||||
Reference in New Issue
Block a user