Automattic\WooCommerce\Blocks\Utils
BlocksWpQuery::__construct
Constructor.
Sets up the WordPress query, if parameter is not empty.
Unlike the constructor in WP_Query, this does not RUN the query.
Метод класса: BlocksWpQuery{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$BlocksWpQuery = new BlocksWpQuery(); $BlocksWpQuery->__construct( $query );
- $query(строка|массив)
- URL query string or array of vars.
По умолчанию:''
Код BlocksWpQuery::__construct() BlocksWpQuery:: construct WC 11.0.1
public function __construct( $query = '' ) {
if ( ! empty( $query ) ) {
$this->init();
$this->query = wp_parse_args( $query );
$this->query_vars = $this->query;
$this->parse_query_vars();
}
}