WP_Importer::min_whitespace
Replaces newlines, tabs, and multiple spaces with a single space.
Method of the class: WP_Importer{}
No Hooks.
Returns
String.
Usage
$WP_Importer = new WP_Importer(); $WP_Importer->min_whitespace( $text );
- $text(string) (required)
- .
WP_Importer::min_whitespace() WP Importer::min whitespace code WP 6.9.1
public function min_whitespace( $text ) {
return preg_replace( '|[\r\n\t ]+|', ' ', $text );
}