acf/location/rule_match/<param>

The Advanced Custom Fields acf location rule match param hook.

Description

apply_filters( 'acf/location/rule_match/<param>', (bool) $false, (unknown) $rule, (unknown) $options ); 

Parameters (3)

0. $false (bool) => false
The false.
1. $rule (unknown)
The rule.
2. $options (unknown)
The options.

Usage

To run the hook, copy the example below.
  1. $false = apply_filters( 'acf/location/rule_match/{$param}', $false, $rule, $options ); 
  2.  
  3. if ( !empty( $false ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the acf/location/rule_match/<param> callback 
  2. function filter_acf_location_rule_match_param( $false, $rule, $options ) { 
  3. // make filter magic happen here... 
  4. return $false
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( "acf/location/rule_match/{$param}", 'filter_acf_location_rule_match_param', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( "acf/location/rule_match/{$param}", 'filter_acf_location_rule_match_param', 10, 3 ); 

Defined (1)

The filter is defined in the following location(s).

/core/controllers/location.php  
  1. $match = apply_filters( 'acf/location/rule_match/' . $rule['param'] , false, $rule, $options );