Uses
Uses | Description |
---|---|
wp-includes/wp-db.php: wpdb::_escape() | Escapes data. Works on arrays. |
wp-includes/wp-db.php: wpdb::_real_escape() | Real escape, using mysqli_real_escape_string() or mysql_real_escape_string(). |
Escapes data. Works on arrays.
(string|array) (Required) Data to escape.
(string|array) Escaped data, in the same type as supplied.
File: wp-includes/wp-db.php
public function _escape( $data ) { if ( is_array( $data ) ) { foreach ( $data as $k => $v ) { if ( is_array( $v ) ) { $data[ $k ] = $this->_escape( $v ); } else { $data[ $k ] = $this->_real_escape( $v ); } } } else { $data = $this->_real_escape( $data ); } return $data; }
Version | Description |
---|---|
2.8.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wpdb/_escape