mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- fix bio conflict
This commit is contained in:
@@ -2767,7 +2767,22 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
||||
} else {
|
||||
$textarea_field_value = '';
|
||||
if ( ! empty( $field_value ) ) {
|
||||
$textarea_field_value = ! empty( $data['html'] ) ? $field_value : wp_strip_all_tags( $field_value );
|
||||
$profile_custom_settings = get_post_meta( $this->global_args['form_id'], '_um_profile_use_custom_settings', true );
|
||||
if ( 1 === $profile_custom_settings ) {
|
||||
$bio_html = get_post_meta( $this->global_args['form_id'], '_um_profile_show_bio', true );
|
||||
} else {
|
||||
if ( UM()->options()->get( 'profile_show_html_bio' ) ) {
|
||||
$bio_html = 1;
|
||||
} else {
|
||||
$bio_html = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ( 1 === (int) $bio_html && array_key_exists( 'html', $data ) && 1 === (int) $data['html'] ) {
|
||||
$textarea_field_value = $field_value;
|
||||
} else {
|
||||
$textarea_field_value = wp_strip_all_tags( $field_value );
|
||||
}
|
||||
}
|
||||
$output .= '<textarea ' . $disabled . ' style="height: ' . esc_attr( $data['height'] ) . ';" class="' . esc_attr( $this->get_class( $key, $data ) ) . '" name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '" placeholder="' . esc_attr( $placeholder ) . '">' . esc_textarea( $textarea_field_value ) . '</textarea>';
|
||||
}
|
||||
|
||||
@@ -1237,14 +1237,28 @@ function um_profile_header( $args ) {
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<?php } elseif ( UM()->fields()->editing == true && $args['show_bio'] ) { ?>
|
||||
<?php } elseif ( UM()->fields()->editing == true && $args['show_bio'] ) {
|
||||
if ( ! empty( $args['custom_fields']['description'] ) ) {
|
||||
if ( array_key_exists( 'html', $args['custom_fields']['description'] ) && 1 === (int) $args['custom_fields']['description']['html'] && 1 === (int) UM()->options()->get( 'profile_show_html_bio' ) ) {
|
||||
$description_value = UM()->fields()->field_value( $description_key );
|
||||
} else {
|
||||
$description_value = wp_strip_all_tags( UM()->fields()->field_value( $description_key ) );
|
||||
}
|
||||
} else {
|
||||
if ( 1 === (int) UM()->options()->get( 'profile_show_html_bio' ) ) {
|
||||
$description_value = UM()->fields()->field_value( $description_key );
|
||||
} else {
|
||||
$description_value = wp_strip_all_tags( UM()->fields()->field_value( $description_key ) );
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="um-meta-text">
|
||||
<textarea id="um-meta-bio"
|
||||
data-html="<?php echo esc_attr( UM()->options()->get( 'profile_show_html_bio' ) ); ?>"
|
||||
data-character-limit="<?php echo esc_attr( UM()->options()->get( 'profile_bio_maxchars' ) ); ?>"
|
||||
placeholder="<?php esc_attr_e( 'Tell us a bit about yourself...', 'ultimate-member' ); ?>"
|
||||
name="<?php echo esc_attr( $description_key ); ?>"><?php echo UM()->fields()->field_value( $description_key ) ?></textarea>
|
||||
name="<?php echo esc_attr( $description_key ); ?>"><?php echo $description_value; ?></textarea>
|
||||
<span class="um-meta-bio-character um-right"><span
|
||||
class="um-bio-limit"><?php echo UM()->options()->get( 'profile_bio_maxchars' ); ?></span></span>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user