WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WP_Term_Query::parse_query() WP 4.6.0

Parse arguments passed to the term query with default query parameters.

Это метод класса: WP_Term_Query

Хуки из метода
Возвращает

Null. Ничего.

Использование

$WP_Term_Query = new WP_Term_Query();
$var = $WP_Term_Query->parse_query( $query );
$query(строка/массив)
WP_Term_Query arguments. See WP_Term_Query::__construct()
По умолчанию: ''

Список изменений

С версии 4.6.0 Введена.

Код WP Term Query::parse query: wp-includes/class-wp-term-query.php WP 5.3.2

<?php
public function parse_query( $query = '' ) {
	if ( empty( $query ) ) {
		$query = $this->query_vars;
	}

	$taxonomies = isset( $query['taxonomy'] ) ? (array) $query['taxonomy'] : null;

	/**
	 * Filters the terms query default arguments.
	 *
	 * Use {@see 'get_terms_args'} to filter the passed arguments.
	 *
	 * @since 4.4.0
	 *
	 * @param array    $defaults   An array of default get_terms() arguments.
	 * @param string[] $taxonomies An array of taxonomy names.
	 */
	$this->query_var_defaults = apply_filters( 'get_terms_defaults', $this->query_var_defaults, $taxonomies );

	$query = wp_parse_args( $query, $this->query_var_defaults );

	$query['number'] = absint( $query['number'] );
	$query['offset'] = absint( $query['offset'] );

	// 'parent' overrides 'child_of'.
	if ( 0 < intval( $query['parent'] ) ) {
		$query['child_of'] = false;
	}

	if ( 'all' == $query['get'] ) {
		$query['childless']    = false;
		$query['child_of']     = 0;
		$query['hide_empty']   = 0;
		$query['hierarchical'] = false;
		$query['pad_counts']   = false;
	}

	$query['taxonomy'] = $taxonomies;

	$this->query_vars = $query;

	/**
	 * Fires after term query vars have been parsed.
	 *
	 * @since 4.6.0
	 *
	 * @param WP_Term_Query $this Current instance of WP_Term_Query.
	 */
	do_action( 'parse_term_query', $this );
}