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
4677
4678      /**
4679       * Filters a sanitized text field string.
4680       *
4681       * @since 2.9.0
4682       *
4683       * @param string $filtered The sanitized string.
4684       * @param string $str      The string prior to being sanitized.
4685       */
4686      return apply_filters( 'sanitize_text_field', $filtered, $str );
4687 }
4688
4689 /**
4690  * Sanitizes a multiline string from user input or from the database.
4691  *
4692  * The function is like sanitize_text_field(), but preserves
4693  * new lines (\n) and other whitespace, which are legitimate
4694  * input in textarea elements.
4695  *