wpdb::add_placeholder_escape()publicWP 4.8.3

Метод класса: wpdb{}

No Hooks.

Return

String. The query with the placeholder escape string inserted where necessary.

Usage

global $wpdb;
$wpdb->add_placeholder_escape( $query );
$query(string) (required)
The query to escape.

Changelog

Since 4.8.3 Introduced.

Code of wpdb::add_placeholder_escape() WP 6.1.1

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 );
}