ACF_Location_Post_Category::get_values()publicACF 5.9.0

Returns an array of possible values for this rule type.

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

Хуков нет.

Возвращает

Массив.

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

$ACF_Location_Post_Category = new ACF_Location_Post_Category();
$ACF_Location_Post_Category->get_values( $rule );
$rule(массив) (обязательный)
A location rule.

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

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

Код ACF_Location_Post_Category::get_values() ACF 6.0.4

public function get_values( $rule ) {
	$choices = acf_get_taxonomy_terms( array( 'category' ) );
	if ( $choices ) {
		return reset( $choices );
	}
	return array();
}