Add a function: wp_spaces_regexp()
. It is not used yet.
This function is required by a bunch of patches by miqrogroove. Needs filter docs. Props miqrogroove. See #27588. git-svn-id: https://develop.svn.wordpress.org/trunk@28708 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
faf208de38
commit
b7d411e724
@ -3844,3 +3844,24 @@ function get_url_in_content( $content ) {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the regexp for common whitespace characters.
|
||||
*
|
||||
* By default, spaces include new lines, tabs, nbsp entities, and the UTF-8 nbsp.
|
||||
* This is designed to replace the PCRE \s sequence. In ticket #22692, that
|
||||
* sequence was found to be unreliable due to random inclusion of the A0 byte.
|
||||
*
|
||||
* @since 4.0.0
|
||||
*
|
||||
* @return string The spaces regexp.
|
||||
*/
|
||||
function wp_spaces_regexp() {
|
||||
static $spaces;
|
||||
|
||||
if ( empty( $spaces ) ) {
|
||||
$spaces = apply_filters( 'wp_spaces_regexp', '[\r\n\t ]|\xC2\xA0| ' );
|
||||
}
|
||||
|
||||
return $spaces;
|
||||
}
|
Loading…
Reference in New Issue
Block a user