wpdb::strip_invalid_text( array $data )
Strips any invalid characters based on value/charset pairs.
Parameters
- $data
-
(Required) Array of value arrays. Each value array has the keys 'value' and 'charset'.<br> An optional 'ascii' key can be set to false to avoid redundant ASCII checks.
Return
(array|WP_Error) The $data parameter, with invalid characters removed from each value.<br> This works as a passthrough: any additional keys such as 'field' are retained in each value array. If we cannot remove invalid characters, a WP_Error object is returned.
Source
File: wp-includes/class-wpdb.php
Changelog
Version | Description |
---|---|
4.2.0 | Introduced. |