WPDev.one
Core Function
View Source on Trac ↗

_sanitize_text_fields()

_sanitize_text_fields( mixed $str, mixed $keep_newlines = false )

Internal helper function to sanitize a string from user input or from the database.

Parameters 1 required

Name / Type Description
$str
string

String to sanitize.

Required
$keep_newlines
bool

Optional. Whether to keep newlines. Default: false.

Return Value

(string)
Sanitized string.

Function Information

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