acf/location/rule_operators/(param) хук-фильтрACF 5.6.0

Filters the location rule operators.

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

add_filter( 'acf/location/rule_operators/(param)', 'wp_kama_acf_location_rule_operators_param_filter', 10, 2 );

/**
 * Function for `acf/location/rule_operators/(param)` filter-hook.
 * 
 * @param array $types The location rule operators.
 * @param       $rule  
 *
 * @return array
 */
function wp_kama_acf_location_rule_operators_param_filter( $types, $rule ){

	// filter...
	return $types;
}
$types(массив)
The location rule operators.
$rule
-

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

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

Где вызывается хук

acf_get_location_rule_operators()
acf/location/rule_operators/(param)
acf/includes/locations.php 198
$operators = apply_filters( "acf/location/rule_operators/{$rule['param']}", $operators, $rule );

Где используется хук в Advanced Custom Fields

acf/includes/locations/abstract-acf-legacy-location.php 27
add_filter( "acf/location/rule_operators/{$this->name}", array( $this, 'rule_operators' ), 5, 2 );