From 9f4585de43864aa6c9aef0f09a29ec5137f95593 Mon Sep 17 00:00:00 2001 From: yuriinalivaiko Date: Mon, 7 Jun 2021 16:50:05 +0300 Subject: [PATCH 1/2] The field setting "Confirm password field label" See GitHub issue #828 --- includes/admin/core/class-admin-metabox.php | 12 +++++++++++- includes/core/class-builtin.php | 3 ++- includes/core/class-fields.php | 7 ++++--- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/includes/admin/core/class-admin-metabox.php b/includes/admin/core/class-admin-metabox.php index ceaf819f..b9fa46f9 100644 --- a/includes/admin/core/class-admin-metabox.php +++ b/includes/admin/core/class-admin-metabox.php @@ -1732,7 +1732,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) { ?>

- edit_mode_value ) ? $this->edit_mode_value : 0 ) ?> /> + edit_mode_value ) ? $this->edit_mode_value : 0 ) ?> class="um-adm-conditional" data-cond1="1" data-cond1-show="_label_confirm_pass" data-cond1-hide="xxx" />

+ +

+ +

+ + diff --git a/includes/core/class-builtin.php b/includes/core/class-builtin.php index 55930ef6..0445586c 100644 --- a/includes/core/class-builtin.php +++ b/includes/core/class-builtin.php @@ -352,7 +352,7 @@ if ( ! class_exists( 'um\core\Builtin' ) ) { 'password' => array( 'name' => 'Password', 'col1' => array('_title','_metakey','_help','_min_chars','_max_chars','_visibility'), - 'col2' => array('_label','_placeholder','_public','_roles','_force_good_pass','_force_confirm_pass'), + 'col2' => array('_label','_placeholder','_public','_roles','_force_good_pass','_force_confirm_pass','_label_confirm_pass'), 'col3' => array('_required','_editable','_icon'), 'validate' => array( '_title' => array( @@ -714,6 +714,7 @@ if ( ! class_exists( 'um\core\Builtin' ) ) { 'max_chars' => 30, 'force_good_pass' => 1, 'force_confirm_pass' => 1, + 'label_confirm_pass' => __('Confirm Password','ultimate-member') ), 'first_name' => array( diff --git a/includes/core/class-fields.php b/includes/core/class-fields.php index 50efd958..af320a53 100644 --- a/includes/core/class-fields.php +++ b/includes/core/class-fields.php @@ -2388,10 +2388,11 @@ if ( ! class_exists( 'um\core\Fields' ) ) { $key = 'confirm_' . $original_key; $output .= '
get_atts( $key, $classes, $conditional, $data ) . '>'; - if ( isset( $data['label'] ) ) { - + if ( ! empty( $data['label_confirm_pass'] ) ) { + $data['label'] = __( $data['label_confirm_pass'], 'ultimate-member' ); + $output .= $this->field_label( $data['label'], $key, $data ); + } elseif ( isset( $data['label'] ) ) { $data['label'] = __( $data['label'], 'ultimate-member' ); - $output .= $this->field_label( sprintf( __( 'Confirm %s', 'ultimate-member' ), $data['label'] ), $key, $data ); } From 189b302f209d184002ab5dd80710d814cdfca9c3 Mon Sep 17 00:00:00 2001 From: yuriinalivaiko Date: Fri, 11 Jun 2021 14:04:27 +0300 Subject: [PATCH 2/2] Fix: Don't replace content in the Avada header. --- includes/core/class-access.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/core/class-access.php b/includes/core/class-access.php index d1ad50b4..161570f5 100644 --- a/includes/core/class-access.php +++ b/includes/core/class-access.php @@ -63,6 +63,10 @@ if ( ! class_exists( 'um\core\Access' ) ) { // turn on/off content replacement on the filter 'the_content' add_action( 'get_header', array( &$this, 'replace_post_content_on' ), 12 ); add_action( 'get_footer', array( &$this, 'replace_post_content_off' ), 8 ); + // turn on/off content replacement on the filter 'the_content' with the theme "Avada" + add_action( 'avada_before_body_content', array( &$this, 'replace_post_content_off' ), 8 ); + add_action( 'avada_before_main_container', array( &$this, 'replace_post_content_on' ), 12 ); + add_action( 'avada_after_main_content', array( &$this, 'replace_post_content_off' ), 8 ); //filter attachment add_filter( 'wp_get_attachment_url', array( &$this, 'filter_attachment' ), 99, 2 );