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

Filters the result.

Використання

add_filter( 'acf/location/rule_match/(param)', 'wp_kama_acf_location_rule_match_param_filter', 10, 4);

/**
 * Function for `acf/location/rule_match/(param)` filter-hook.
 *
 * @param bool $result The match result.
 * @param array $rule location rule.
 * @param array $screen The screen args.
 * @param array $field_group The field group array.
 *
 * @return bool
 */
function wp_kama_acf_location_rule_match_param_filter( $result, $rule, $screen, $field_group ){

	// Filter...
	return $result;
}
$result
(true|false)
The match result.
$rule
(масив)
The location rule.
$screen
(масив)
The screen args.
$field_group
(масив)
The field group array.

список змін

З версії 5.6.0Введено.

Де викликається хук

acf/includes/locations.php 268

$result = apply_filters( "acf/location/rule_match/{$rule['param']}", $result, $rule, $screen, $field_group );

Де використовується хук в Advanced Custom Fields

Залишити відповідь

Ваша e-mail адреса не оприлюднюватиметься. Обов’язкові поля позначені *