WPSEO_Meta_Columns::determine_score_filters()protectedYoast 1.0

Determines the score filters to be used. If more than one is passed, it created an AND statement for the query.

Метод класса: WPSEO_Meta_Columns{}

Хуков нет.

Возвращает

Массив. Array containing the score filters that need to be applied to the meta query.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->determine_score_filters( $score_filters );
$score_filters(массив) (обязательный)
Array containing the score filters.

Код WPSEO_Meta_Columns::determine_score_filters() Yoast 22.4

protected function determine_score_filters( $score_filters ) {
	if ( count( $score_filters ) > 1 ) {
		return array_merge( [ 'relation' => 'AND' ], $score_filters );
	}

	return $score_filters;
}