- fix min-height and height of html textarea

This commit is contained in:
ashubawork
2024-10-03 11:56:36 +03:00
parent f79f2a7d2b
commit a69435f15a
2 changed files with 16 additions and 1 deletions
+3 -1
View File
@@ -259,8 +259,10 @@ function um_profile_field_filter_hook__textarea( $value, $data ) {
if ( ! $value ) {
return '';
}
if ( ! empty( $data['html'] ) ) {
return '<iframe class="um-textarea-html-value" title="' . esc_attr( $data['label'] ) . '" srcdoc="' . wp_kses_post( $value ) .'"></iframe>';
$height = isset( $data['height'] ) && absint( $data['height'] ) > 0 ? absint( $data['height'] ) : '';
return '<iframe class="um-textarea-html-value" onload="resizeIframe(this)" data-height="' . $height . '" title="' . esc_attr( $data['label'] ) . '" srcdoc="' . wp_kses_post( $value ) . '"></iframe>';
}
$description_key = UM()->profile()->get_show_bio_key( UM()->fields()->global_args );