mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Merge pull request #1362 from ultimatemember/fix/content_block_new_line
Content block field new line
This commit is contained in:
@@ -655,6 +655,9 @@ if ( ! class_exists( 'um\admin\core\Admin_Builder' ) ) {
|
||||
}
|
||||
} elseif ( false !== strpos( $key, 'um_editor' ) ) {
|
||||
if ( 'block' === $array['post']['_type'] ) {
|
||||
// the nl2br() function does not work as expected, there is an extra empty line left
|
||||
// use str_replace for correct work
|
||||
$val = str_replace( "\r\n\r\n", '<br>', $val );
|
||||
$save[ $field_id ]['content'] = wp_kses_post( $val );
|
||||
} else {
|
||||
$save[ $field_id ]['content'] = sanitize_textarea_field( $val );
|
||||
|
||||
Reference in New Issue
Block a user