wpdb::remove_placeholder_escape() WordPress Method
The wpdb::remove_placeholder_escape() method is used to remove the escape character from a string, typically used before sending a query to the database. This is useful when you need to insert data that contains the escape character (such as a backslash) and you do not want it to be treated as an escape character.
wpdb::remove_placeholder_escape( string $query ) #
Removes the placeholder escape strings from a query.
Parameters
- $query
(string)(Required)The query from which the placeholder will be removed.
Return
(string) The query with the placeholder removed.
Source
File: wp-includes/wp-db.php
public function remove_placeholder_escape( $query ) {
return str_replace( $this->placeholder_escape(), '%', $query );
}
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description |
|---|---|
| 4.8.3 | Introduced. |