Yoast\WP\SEO\Presentations
Indexable_Term_Archive_Presentation::is_multiple_terms_query() protected Yoast 1.0
Checks if term archive query is for multiple terms (/term-1,term-2/ or /term-1+term-2/).
{} Это метод класса: Indexable_Term_Archive_Presentation{}
Хуков нет.
Возвращает
true/false. Whether the query contains multiple terms.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->is_multiple_terms_query();
Код Indexable_Term_Archive_Presentation::is_multiple_terms_query() Indexable Term Archive Presentation::is multiple terms query Yoast 15.6.2
protected function is_multiple_terms_query() {
$query = $this->wp_query_wrapper->get_query();
if ( ! isset( $query->tax_query ) ) {
return false;
}
$queried_terms = $query->tax_query->queried_terms;
if ( empty( $queried_terms[ $this->source->taxonomy ]['terms'] ) ) {
return false;
}
return \count( $queried_terms[ $this->source->taxonomy ]['terms'] ) > 1;
}