WP_Importer::min_whitespace( string $text ): string

In this article

Replaces newlines, tabs, and multiple spaces with a single space.

Parameters

$textstringrequired

Return

string

Source

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

User Contributed Notes

You must log in before being able to contribute a note or feedback.