wp_spaces_regexp WordPress Filter Hook

The wp_spaces_regexp Wordpress hook is used to filter content with regular expressions. It allows you to match and replace content with specified patterns. This hook is useful for customizing content on your site.

apply_filters( 'wp_spaces_regexp', string $spaces ) #

Filters the regexp for common whitespace characters.


Description

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.


Top ↑

Parameters

$spaces

(string)Regexp pattern for matching common whitespace characters.


Top ↑

Source

File: wp-includes/formatting.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More