wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
sanitize_text_field › WordPress Function
Seit2.9.0
Veraltetn/v
› sanitize_text_field ( $str )
| Parameter: |
|
| Siehe: | |
| Gibt zurück: |
|
| Definiert in: |
|
| Codex: |
Sanitizes a string from user input or from the database.
- Checks for invalid UTF-8, - Converts single</code> characters to entities
- Strips all tags
- Removes line breaks, tabs, and extra whitespace
- Strips percent-encoded charactersÄhnliche Funktionen: _sanitize_text_fields, sanitize_textarea_field, sanitize_term_field, sanitize_post_field, sanitize_user_field
Quellcode
function sanitize_text_field( $str ) {
$filtered = _sanitize_text_fields( $str, false );
/**
* Filters a sanitized text field string.
*
* @since 2.9.0
*
* @param string $filtered The sanitized string.
* @param string $str The string prior to being sanitized.
*/
return apply_filters( 'sanitize_text_field', $filtered, $str );
}