WP_Query::__construct
Constructor.
Sets up the WordPress query, if parameter is not empty.
Метод класса: WP_Query{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
global $wp_query; $wp_query->__construct( $query );
- $query(строка|массив)
- URL query string or array of vars.
По умолчанию:''
Заметки
- Смотрите: WP_Query::parse_query() for all available arguments.
Список изменений
| С версии 1.5.0 | Введена. |
Код WP_Query::__construct() WP Query:: construct WP 6.9.4
public function __construct( $query = '' ) {
if ( ! empty( $query ) ) {
$this->query( $query );
}
}