wpdb::add_placeholder_escape()
Adds a placeholder escape string, to escape anything that resembles a printf() placeholder.
Метод класса: wpdb{}
Хуков нет.
Возвращает
Строку
. The query with the placeholder escape string inserted where necessary.
Использование
global $wpdb; $wpdb->add_placeholder_escape( $query );
- $query(строка) (обязательный)
- The query to escape.
Список изменений
С версии 4.8.3 | Введена. |
Код wpdb::add_placeholder_escape() wpdb::add placeholder escape WP 6.6.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 ); }