diff --git a/includes/core/class-fields.php b/includes/core/class-fields.php index 6c3670f4..71f3384e 100644 --- a/includes/core/class-fields.php +++ b/includes/core/class-fields.php @@ -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 .= ''; } diff --git a/includes/core/um-actions-profile.php b/includes/core/um-actions-profile.php index b2a99eae..1c548ec0 100644 --- a/includes/core/um-actions-profile.php +++ b/includes/core/um-actions-profile.php @@ -1237,14 +1237,28 @@ function um_profile_header( $args ) { } ?> - fields()->editing == true && $args['show_bio'] ) { ?> + 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 ) ); + } + } + ?>