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
5326
5327      /**
5328       * Filters a sanitized text field string.
5329       *
5330       * @since 2.9.0
5331       *
5332       * @param string $filtered The sanitized string.
5333       * @param string $str      The string prior to being sanitized.
5334       */
5335      return apply_filters( 'sanitize_text_field', $filtered, $str );
5336 }
5337
5338 /**
5339  * Sanitizes a multiline string from user input or from the database.
5340  *
5341  * The function is like sanitize_text_field(), but preserves
5342  * new lines (\n) and other whitespace, which are legitimate
5343  * input in textarea elements.
5344  *