WP_Date_Query::get_sql_clauses()
Generates SQL clauses to be appended to a main query.
Called by the public WP_Date_Query::get_sql(), this method is abstracted out to maintain parity with the other Query classes.
Метод класса: WP_Date_Query{}
Хуков нет.
Возвращает
Строку[]
. Array containing JOIN and WHERE SQL clauses to append to the main query.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_sql_clauses();
Список изменений
С версии 4.1.0 | Введена. |
Код WP_Date_Query::get_sql_clauses() WP Date Query::get sql clauses WP 6.7.2
protected function get_sql_clauses() { $sql = $this->get_sql_for_query( $this->queries ); if ( ! empty( $sql['where'] ) ) { $sql['where'] = ' AND ' . $sql['where']; } return $sql; }