From 01060cecef32fe4272cf9be66b50aba74c917327 Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Thu, 29 Jun 2023 00:52:52 +0300 Subject: [PATCH 1/7] - changed version; --- readme.txt | 4 ++++ ultimate-member.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index cf58145f..ddc24a83 100644 --- a/readme.txt +++ b/readme.txt @@ -163,6 +163,10 @@ 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: July xx, 2023 = + + + = 2.6.5: June 28, 2023 = * Enhancements: diff --git a/ultimate-member.php b/ultimate-member.php index cb9a6c58..170c45b7 100644 --- a/ultimate-member.php +++ b/ultimate-member.php @@ -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-alpha Author: Ultimate Member Author URI: http://ultimatemember.com/ Text Domain: ultimate-member From 2529a0db7f62eb9aa74c93fbc5ba25090a49d73f Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Thu, 29 Jun 2023 12:21:40 +0300 Subject: [PATCH 2/7] - fixed edit "Master row" in form builder; - maybe fixed "Confirm Password"; --- includes/admin/core/class-admin-builder.php | 12 +++++++----- includes/core/class-fields.php | 2 +- includes/core/um-actions-form.php | 18 +++++++++++------- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/includes/admin/core/class-admin-builder.php b/includes/admin/core/class-admin-builder.php index 73cdf064..265771e4 100644 --- a/includes/admin/core/class-admin-builder.php +++ b/includes/admin/core/class-admin-builder.php @@ -915,11 +915,13 @@ if ( ! class_exists( 'um\admin\core\Admin_Builder' ) ) {

- - - - + if ( 'row' !== $arg1 ) { + ?> + + + + + diff --git a/includes/core/class-fields.php b/includes/core/class-fields.php index ccab2037..69efa860 100644 --- a/includes/core/class-fields.php +++ b/includes/core/class-fields.php @@ -2530,7 +2530,7 @@ if ( ! class_exists( 'um\core\Fields' ) ) { $output .= ''; - 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 .= '
get_atts( $key, $classes, $conditional, $data ) . '>'; diff --git a/includes/core/um-actions-form.php b/includes/core/um-actions-form.php index e8eea188..25c2a3e2 100644 --- a/includes/core/um-actions-form.php +++ b/includes/core/um-actions-form.php @@ -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'] ) ); } } From 8347abdafa4356bbf6189d568952374029341f23 Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Thu, 29 Jun 2023 12:46:12 +0300 Subject: [PATCH 3/7] - fixed Spotify URL when URL to Spotify user is used; --- includes/core/um-filters-fields.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/includes/core/um-filters-fields.php b/includes/core/um-filters-fields.php index a64ec2ad..02926e94 100644 --- a/includes/core/um-filters-fields.php +++ b/includes/core/um-filters-fields.php @@ -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 = '' . esc_html( $value ) . ''; + } else { + $url = str_replace( 'open.spotify.com/', 'open.spotify.com/embed/', $value ); - $value = '
+ $value = '
'; + } } else { return __( 'Invalid Spotify URL', 'ultimate-member' ); } From 834ded35f8b93c4f490ee11c6ae6863ea337cd58 Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Thu, 29 Jun 2023 13:00:47 +0300 Subject: [PATCH 4/7] - fixed Spotify URL validation; --- includes/core/um-filters-fields.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/core/um-filters-fields.php b/includes/core/um-filters-fields.php index 02926e94..2bf8bb6d 100644 --- a/includes/core/um-filters-fields.php +++ b/includes/core/um-filters-fields.php @@ -443,7 +443,7 @@ function um_profile_field_filter_hook__( $value, $data, $type = '' ) { $value = '' . esc_html( $alt ) . ''; } 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' ) @@ -464,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 ) { From 628038a57ff0ccccb36f18092155907963ae695a Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Thu, 29 Jun 2023 13:10:22 +0300 Subject: [PATCH 5/7] - updated readme.txt; --- readme.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index ddc24a83..79c33767 100644 --- a/readme.txt +++ b/readme.txt @@ -163,9 +163,14 @@ 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: July xx, 2023 = += 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 = From 84ea062a1f6539ed738457ca80aa41eedc7543e3 Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Thu, 29 Jun 2023 13:50:47 +0300 Subject: [PATCH 6/7] - fixed getting permalink for profile tab if permalinks settings are disabled; --- includes/class-init.php | 2 +- includes/core/class-access.php | 2 +- includes/core/um-actions-profile.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/class-init.php b/includes/class-init.php index 16fc39f1..3c839c9a 100644 --- a/includes/class-init.php +++ b/includes/class-init.php @@ -69,7 +69,7 @@ if ( ! class_exists( 'UM' ) ) { * * @var */ - public $is_permalinks; + public $is_permalinks = false; /** * @var null|string diff --git a/includes/core/class-access.php b/includes/core/class-access.php index 2be2b8a0..9c24d7f2 100644 --- a/includes/core/class-access.php +++ b/includes/core/class-access.php @@ -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 ); diff --git a/includes/core/um-actions-profile.php b/includes/core/um-actions-profile.php index 4a4b10d2..5d3328c5 100644 --- a/includes/core/um-actions-profile.php +++ b/includes/core/um-actions-profile.php @@ -1691,7 +1691,7 @@ function um_profile_menu( $args ) { $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 ); From f72af17780c1c8b2ad007d0c835dac024b12de06 Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Thu, 29 Jun 2023 16:58:34 +0300 Subject: [PATCH 7/7] - updated versions; --- README.md | 2 +- readme.txt | 2 +- ultimate-member.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f29f8ff0..95c67922 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/readme.txt b/readme.txt index 79c33767..06f8c613 100644 --- a/readme.txt +++ b/readme.txt @@ -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 diff --git a/ultimate-member.php b/ultimate-member.php index 170c45b7..11466c42 100644 --- a/ultimate-member.php +++ b/ultimate-member.php @@ -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.6-alpha +Version: 2.6.6 Author: Ultimate Member Author URI: http://ultimatemember.com/ Text Domain: ultimate-member