acf/location/validate_rule/type=(param)
Filters the location rule to ensure is valid.
Использование
add_filter( 'acf/location/validate_rule/type=(param)', 'wp_kama_acf_location_validate_rule_type_param_filter' );
/**
* Function for `acf/location/validate_rule/type=(param)` filter-hook.
*
* @param array $rule The location rule.
*
* @return array
*/
function wp_kama_acf_location_validate_rule_type_param_filter( $rule ){
// filter...
return $rule;
}
- $rule(массив)
- The location rule.
Список изменений
| С версии 5.9.0 | Введена. |
Где вызывается хук
acf/location/validate_rule/type=(param)
acf/includes/locations.php 168
$rule = apply_filters( "acf/location/validate_rule/type={$rule['param']}", $rule );
Где используется хук в Advanced Custom Fields PRO
acf/includes/compatibility.php 43
add_filter( 'acf/location/validate_rule/type=post_taxonomy', array( $this, 'validate_post_taxonomy_location_rule' ), 20, 1 );
acf/includes/compatibility.php 44
add_filter( 'acf/location/validate_rule/type=post_category', array( $this, 'validate_post_taxonomy_location_rule' ), 20, 1 );