mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Merge pull request #1227 from ultimatemember/development/2.6.6
Version 2.6.6
This commit is contained in:
@@ -42,7 +42,7 @@ GNU Version 2 or Any Later Version
|
||||
|
||||
## Releases
|
||||
|
||||
[Official Release Version: 2.6.5](https://github.com/ultimatemember/ultimatemember/releases/tag/2.6.5).
|
||||
[Official Release Version: 2.6.6](https://github.com/ultimatemember/ultimatemember/releases/tag/2.6.6).
|
||||
|
||||
## Changelog
|
||||
|
||||
|
||||
@@ -915,11 +915,13 @@ if ( ! class_exists( 'um\admin\core\Admin_Builder' ) ) {
|
||||
<p><?php esc_html_e( 'This field type is not setup correctly.', 'ultimate-member' ); ?></p>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<input type="hidden" name="_in_row" id="_in_row" value="<?php echo esc_attr( $metabox->edit_array['in_row'] ); ?>" />
|
||||
<input type="hidden" name="_in_sub_row" id="_in_sub_row" value="<?php echo esc_attr( $metabox->edit_array['in_sub_row'] ); ?>" />
|
||||
<input type="hidden" name="_in_column" id="_in_column" value="<?php echo esc_attr( $metabox->edit_array['in_column'] ); ?>" />
|
||||
<input type="hidden" name="_in_group" id="_in_group" value="<?php echo esc_attr( $metabox->edit_array['in_group'] ); ?>" />
|
||||
if ( 'row' !== $arg1 ) {
|
||||
?>
|
||||
<input type="hidden" name="_in_row" id="_in_row" value="<?php echo esc_attr( $metabox->edit_array['in_row'] ); ?>" />
|
||||
<input type="hidden" name="_in_sub_row" id="_in_sub_row" value="<?php echo esc_attr( $metabox->edit_array['in_sub_row'] ); ?>" />
|
||||
<input type="hidden" name="_in_column" id="_in_column" value="<?php echo esc_attr( $metabox->edit_array['in_column'] ); ?>" />
|
||||
<input type="hidden" name="_in_group" id="_in_group" value="<?php echo esc_attr( $metabox->edit_array['in_group'] ); ?>" />
|
||||
<?php } ?>
|
||||
<input type="hidden" name="_type" id="_type" value="<?php echo esc_attr( $arg1 ); ?>" />
|
||||
<input type="hidden" name="post_id" id="post_id" value="<?php echo esc_attr( $arg2 ); ?>" />
|
||||
<input type="hidden" name="edit_mode" id="edit_mode" value="true" />
|
||||
|
||||
@@ -69,7 +69,7 @@ if ( ! class_exists( 'UM' ) ) {
|
||||
*
|
||||
* @var
|
||||
*/
|
||||
public $is_permalinks;
|
||||
public $is_permalinks = false;
|
||||
|
||||
/**
|
||||
* @var null|string
|
||||
|
||||
@@ -1755,7 +1755,7 @@ if ( ! class_exists( 'um\core\Access' ) ) {
|
||||
|
||||
$redirects = array_unique( $redirects );
|
||||
|
||||
$current_url = UM()->permalinks()->get_current_url( get_option( 'permalink_structure' ) );
|
||||
$current_url = UM()->permalinks()->get_current_url( UM()->is_permalinks );
|
||||
$current_url = untrailingslashit( $current_url );
|
||||
$current_url_slash = trailingslashit( $current_url );
|
||||
|
||||
|
||||
@@ -2530,7 +2530,7 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
||||
|
||||
$output .= '</div>';
|
||||
|
||||
if ( 'login' !== $this->set_mode && isset( $data['force_confirm_pass'] ) && 1 === $data['force_confirm_pass'] ) {
|
||||
if ( 'login' !== $this->set_mode && ! empty( $data['force_confirm_pass'] ) ) {
|
||||
|
||||
$key = 'confirm_' . $original_key;
|
||||
$output .= '<div ' . $this->get_atts( $key, $classes, $conditional, $data ) . '>';
|
||||
|
||||
@@ -633,18 +633,22 @@ function um_submit_form_errors_hook_( $args ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset( $array['force_confirm_pass'] ) && $array['force_confirm_pass'] == 1 ) {
|
||||
if ( $args[ 'confirm_' . $key ] == '' && ! UM()->form()->has_error( $key ) ) {
|
||||
UM()->form()->add_error( 'confirm_' . $key , __( 'Please confirm your password', 'ultimate-member' ) );
|
||||
}
|
||||
if ( $args[ 'confirm_' . $key ] != $args[$key] && !UM()->form()->has_error( $key ) ) {
|
||||
UM()->form()->add_error( 'confirm_' . $key , __( 'Your passwords do not match', 'ultimate-member' ) );
|
||||
if ( ! empty( $array['force_confirm_pass'] ) ) {
|
||||
if ( ! array_key_exists( 'confirm_' . $key, $args ) && ! UM()->form()->has_error( $key ) ) {
|
||||
UM()->form()->add_error( 'confirm_' . $key, __( 'Please confirm your password', 'ultimate-member' ) );
|
||||
} else {
|
||||
if ( '' === $args[ 'confirm_' . $key ] && ! UM()->form()->has_error( $key ) ) {
|
||||
UM()->form()->add_error( 'confirm_' . $key, __( 'Please confirm your password', 'ultimate-member' ) );
|
||||
}
|
||||
if ( $args[ 'confirm_' . $key ] !== $args[ $key ] && ! UM()->form()->has_error( $key ) ) {
|
||||
UM()->form()->add_error( 'confirm_' . $key, __( 'Your passwords do not match', 'ultimate-member' ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset( $array['min_selections'] ) && $array['min_selections'] > 0 ) {
|
||||
if ( ( ! isset( $args[ $key ] ) ) || ( isset( $args[ $key ] ) && is_array( $args[ $key ] ) && count( $args[ $key ] ) < $array['min_selections'] ) ) {
|
||||
UM()->form()->add_error($key, sprintf( __( 'Please select at least %s choices', 'ultimate-member' ), $array['min_selections'] ) );
|
||||
UM()->form()->add_error( $key, sprintf( __( 'Please select at least %s choices', 'ultimate-member' ), $array['min_selections'] ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1691,7 +1691,7 @@ function um_profile_menu( $args ) {
|
||||
|
||||
<?php foreach ( $tabs as $id => $tab ) {
|
||||
|
||||
$nav_link = UM()->permalinks()->get_current_url( get_option( 'permalink_structure' ) );
|
||||
$nav_link = UM()->permalinks()->get_current_url( UM()->is_permalinks );
|
||||
$nav_link = remove_query_arg( 'um_action', $nav_link );
|
||||
$nav_link = remove_query_arg( 'subnav', $nav_link );
|
||||
$nav_link = add_query_arg( 'profiletab', $id, $nav_link );
|
||||
|
||||
@@ -87,11 +87,15 @@ add_filter( 'um_profile_field_filter_hook__youtube_video', 'um_profile_field_fil
|
||||
*/
|
||||
function um_profile_field_filter_hook__spotify( $value, $data ) {
|
||||
if ( preg_match( '/https:\/\/open.spotify.com\/.*/', $value ) ) {
|
||||
$url = str_replace( 'open.spotify.com/', 'open.spotify.com/embed/', $value );
|
||||
if ( false !== strpos( $value, '/user/' ) ) {
|
||||
$value = '<a href="' . esc_attr( $value ) . '" target="_blank">' . esc_html( $value ) . '</a>';
|
||||
} else {
|
||||
$url = str_replace( 'open.spotify.com/', 'open.spotify.com/embed/', $value );
|
||||
|
||||
$value = '<div class="um-spotify">
|
||||
$value = '<div class="um-spotify">
|
||||
<iframe width="100%" height="352" style="border-radius:12px" frameBorder="0" allowfullscreen="" loading="lazy" src="' . esc_url( $url ) . '"></iframe>
|
||||
</div>';
|
||||
}
|
||||
} else {
|
||||
return __( 'Invalid Spotify URL', 'ultimate-member' );
|
||||
}
|
||||
@@ -439,7 +443,7 @@ function um_profile_field_filter_hook__( $value, $data, $type = '' ) {
|
||||
|
||||
$value = '<a href="'. esc_attr( $value ) .'" title="' . esc_attr( $alt ) . '" target="' . esc_attr( $data['url_target'] ) . '" ' . $url_rel . '>' . esc_html( $alt ) . '</a>';
|
||||
} else {
|
||||
if ( ( isset( $data['validate'] ) && $data['validate'] !== '' && strstr( $data['validate'], 'url' ) ) || ( isset( $data['type'] ) && $data['type'] == 'url' ) ) {
|
||||
if ( ( isset( $data['validate'] ) && $data['validate'] !== '' && $data['type'] !== 'spotify' && strstr( $data['validate'], 'url' ) ) || ( isset( $data['type'] ) && $data['type'] == 'url' ) ) {
|
||||
$alt = ( isset( $data['url_text'] ) && !empty( $data['url_text'] ) ) ? $data['url_text'] : $value;
|
||||
$url_rel = ( isset( $data['url_rel'] ) && $data['url_rel'] == 'nofollow' ) ? 'rel="nofollow"' : '';
|
||||
if ( ! strstr( $value, 'http' )
|
||||
@@ -460,6 +464,7 @@ function um_profile_field_filter_hook__( $value, $data, $type = '' ) {
|
||||
if ( $data['validate'] == 'tiktok_url' ) $value = 'https://tiktok.com/' . $value;
|
||||
if ( $data['validate'] == 'twitch_url' ) $value = 'https://twitch.tv/' . $value;
|
||||
if ( $data['validate'] == 'reddit_url' ) $value = 'https://www.reddit.com/user/' . $value;
|
||||
if ( $data['validate'] == 'spotify_url' ) $value = 'https://open.spotify.com/' . $value;
|
||||
}
|
||||
|
||||
if ( strpos( $value, 'http://' ) !== 0 ) {
|
||||
|
||||
+10
-1
@@ -7,7 +7,7 @@ Tags: community, member, membership, user-profile, user-registration
|
||||
Requires PHP: 5.6
|
||||
Requires at least: 5.5
|
||||
Tested up to: 6.2
|
||||
Stable tag: 2.6.5
|
||||
Stable tag: 2.6.6
|
||||
License: GNU Version 2 or Any Later Version
|
||||
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
||||
|
||||
@@ -163,6 +163,15 @@ No, you do not need to use our plugin’s login or registration pages and can us
|
||||
* 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.6.6: June 29, 2023 =
|
||||
|
||||
* Bugfixes:
|
||||
|
||||
- Fixed: Password Confirm field and validation
|
||||
- Fixed: Form Builder row editing
|
||||
- Fixed: Spotify URL user URL display on user profile
|
||||
- Fixed: Spotify URL validation
|
||||
|
||||
= 2.6.5: June 28, 2023 =
|
||||
|
||||
* Enhancements:
|
||||
|
||||
+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.6.5
|
||||
Version: 2.6.6
|
||||
Author: Ultimate Member
|
||||
Author URI: http://ultimatemember.com/
|
||||
Text Domain: ultimate-member
|
||||
|
||||
Reference in New Issue
Block a user