Uses
Uses | Description |
---|---|
wp-includes/wp-db.php: wpdb::placeholder_escape() | Generates and returns a placeholder escape string for use in queries returned by ::prepare(). |
Adds a placeholder escape string, to escape anything that resembles a printf() placeholder.
(string) (Required) The query to escape.
(string) The query with the placeholder escape string inserted where necessary.
File: wp-includes/wp-db.php
public function add_placeholder_escape( $query ) { /* * To prevent returning anything that even vaguely resembles a placeholder, * we clobber every % we can find. */ return str_replace( '%', $this->placeholder_escape(), $query ); }
Version | Description |
---|---|
4.8.3 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wpdb/add_placeholder_escape