WPDev.one
Core Function
View Source on Trac ↗

sanitize_text_field()

sanitize_text_field( mixed $str )

Sanitizes a string from user input or from the database.

Parameters 1 required

Name / Type Description
$str
string

String to sanitize.

Required

Return Value

(string)
Sanitized string.

Function Information

Since Version
2.9.0
Source File
wp-includes/formatting.php
Advertisement