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.


Top ↑

Return

(string) The query with the placeholder removed.


Top ↑

Source

File: wp-includes/wp-db.php

	public function remove_placeholder_escape( $query ) {
		return str_replace( $this->placeholder_escape(), '%', $query );
	}


Top ↑

Changelog

Changelog
VersionDescription
4.8.3Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.