Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: sanitize_text_field

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
5209
5210      /**
5211       * Filters a sanitized text field string.
5212       *
5213       * @since 2.9.0
5214       *
5215       * @param string $filtered The sanitized string.
5216       * @param string $str      The string prior to being sanitized.
5217       */
5218      return apply_filters( 'sanitize_text_field', $filtered, $str );
5219 }
5220
5221 /**
5222  * Sanitizes a multiline string from user input or from the database.
5223  *
5224  * The function is like sanitize_text_field(), but preserves
5225  * new lines (\n) and other whitespace, which are legitimate
5226  * input in textarea elements.
5227  *