wp_spaces_regexp хук-фильтр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', 'wp_kama_spaces_regexp_filter' );

/**
 * Function for `wp_spaces_regexp` filter-hook.
 * 
 * @param string $spaces Regexp pattern for matching common whitespace characters.
 *
 * @return string
 */
function wp_kama_spaces_regexp_filter( $spaces ){

	// filter...
	return $spaces;
}
$spaces(строка)
Regexp pattern for matching common whitespace characters.

Список изменений

С версии 4.0.0 Введена.

Где вызывается хук

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

Где используется хук в WordPress

Использование не найдено.