Automattic\WooCommerce\Blocks\Utils
BlocksWpQuery::__construct() public WC 1.0
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. Ничего.
Использование
$BlocksWpQuery = new BlocksWpQuery(); $BlocksWpQuery->__construct( $query );
- $query(строка/массив)
- URL query string or array of vars.
Код BlocksWpQuery::__construct() BlocksWpQuery:: construct WC 5.0.0
public function __construct( $query = '' ) {
if ( ! empty( $query ) ) {
$this->init();
$this->query = wp_parse_args( $query );
$this->query_vars = $this->query;
$this->parse_query_vars();
}
}