WordPress at a glance
filter is not described

wp_spaces_regexp filter-hook . WP 4.0.0

Filters the regexp for common whitespace characters.

This string is substituted for the \s sequence as needed in regular expressions. For websites not written in English, different characters may represent whitespace. For websites not encoded in UTF-8, the 0xC2 0xA0 sequence may not be in use.


add_filter( 'wp_spaces_regexp', 'filter_function_name_9275' );
function filter_function_name_9275( $spaces ){
	// filter...

	return $spaces;
Regexp pattern for matching common whitespace characters.


Since 4.0.0 Introduced.

Where the hook is called

wp-includes/formatting.php 5548
$spaces = apply_filters( 'wp_spaces_regexp', '[\r\n\t ]|\xC2\xA0| ' );

Where the hook is used (in WP core)

Usage not found!