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