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