W3cubDocs

/WordPress

WP_Importer::min_whitespace( string $string )

Replace newlines, tabs, and multiple spaces with a single space

Parameters

$string

(string) (Required)

Return

(string)

Source

File: wp-admin/includes/class-wp-importer.php

public function min_whitespace( $string ) {
		return preg_replace( '|[\r\n\t ]+|', ' ', $string );
	}

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_importer/min_whitespace