sanitize_text_field WordPress Filter Hook
The sanitize_text_field hook is used to clean up data before it is saved to the database. This is a great hook to use when you want to make sure that data is clean and safe before it is stored.
apply_filters( 'sanitize_text_field', string $filtered , string $str ) #
Filters a sanitized text field string.
Parameters
- $filtered
(string)The sanitized string.
- $str
(string)The string prior to being sanitized.
Source
Changelog
Version | Description |
---|---|
2.9.0 | Introduced. |