Merge branch 'master' of https://github.com/ultimatemember/ultimatemember into development/2.1.22

This commit is contained in:
Nikita Sinelnikov
2021-07-07 21:06:08 +03:00
4 changed files with 21 additions and 5 deletions
+11 -1
View File
@@ -1745,7 +1745,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
?>
<p><label for="_force_confirm_pass"><?php _e( 'Automatically add a confirm password field?', 'ultimate-member' ) ?> <?php UM()->tooltip( __( 'Turn on to add a confirm password field. If turned on the confirm password field will only show on register forms and not on login forms.', 'ultimate-member' ) ); ?></label>
<input type="checkbox" name="_force_confirm_pass" id="_force_confirm_pass" value="1" <?php checked( isset( $this->edit_mode_value ) ? $this->edit_mode_value : 0 ) ?> />
<input type="checkbox" name="_force_confirm_pass" id="_force_confirm_pass" value="1" <?php checked( isset( $this->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" />
</p>
<?php
@@ -2279,6 +2279,16 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
<?php
break;
case '_label_confirm_pass':
?>
<p><label for="_label_confirm_pass"><?php _e( 'Confirm password field label', 'ultimate-member' ) ?> <?php UM()->tooltip( __( 'This label is the text that appears above the confirm password field. Leave blank to show default label.', 'ultimate-member' ) ); ?></label>
<input type="text" name="_label_confirm_pass" id="_label_confirm_pass" value="<?php echo htmlspecialchars( $this->edit_mode_value, ENT_QUOTES ); ?>" />
</p>
<?php
break;
case '_placeholder':
?>
+4
View File
@@ -70,6 +70,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 );
+2 -1
View File
@@ -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(
+4 -3
View File
@@ -2388,10 +2388,11 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
$key = 'confirm_' . $original_key;
$output .= '<div ' . $this->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 );
}