From 5281c1e65401dbb3f4fb916f17a4ebabaae7b687 Mon Sep 17 00:00:00 2001 From: Nikita Sinelnikov Date: Mon, 15 Aug 2022 14:25:19 +0300 Subject: [PATCH] - fixed upgrade script; --- includes/admin/core/packages/2.5.0/functions.php | 6 ++++++ includes/core/class-builtin.php | 4 ++-- readme.txt | 2 +- ultimate-member.php | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/includes/admin/core/packages/2.5.0/functions.php b/includes/admin/core/packages/2.5.0/functions.php index 927317d3..2eece725 100644 --- a/includes/admin/core/packages/2.5.0/functions.php +++ b/includes/admin/core/packages/2.5.0/functions.php @@ -21,11 +21,17 @@ function um_upgrade_phone_fields250() { continue; } + $need_update = false; foreach ( $forms_fields as $key => &$field ) { if ( in_array( $key, array( 'phone_number', 'mobile_number' ), true ) ) { $field['type'] = 'tel'; + $need_update = true; } } + + if ( $need_update ) { + update_post_meta( $form_id, '_um_custom_fields', $forms_fields ); + } } // remove cached option with users count, don't create separate AJAX upgrade for that diff --git a/includes/core/class-builtin.php b/includes/core/class-builtin.php index 9448fb7e..8a507fe0 100644 --- a/includes/core/class-builtin.php +++ b/includes/core/class-builtin.php @@ -246,14 +246,14 @@ if ( ! class_exists( 'um\core\Builtin' ) ) { ), 'tel' => array( - 'name' => 'Tel Box', + 'name' => __( 'Telephone Box', 'ultimate-member' ), 'col1' => array('_title','_metakey','_help','_default','_min_chars','_visibility'), 'col2' => array('_label','_placeholder','_public','_roles','_validate','_custom_validate','_max_chars'), 'col3' => array('_required','_editable','_icon'), 'validate' => array( '_title' => array( 'mode' => 'required', - 'error' => __('You must provide a title','ultimate-member') + 'error' => __('You must provide a title','ultimate-member'), ), '_metakey' => array( 'mode' => 'unique', diff --git a/readme.txt b/readme.txt index b04779eb..edca5c33 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.0 Tested up to: 6.0 -Stable tag: 2.4.2 +Stable tag: 2.5.0 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 2491fb82..609ffb7d 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.5.0-beta +Version: 2.5.0 Author: Ultimate Member Author URI: http://ultimatemember.com/ Text Domain: ultimate-member