pods_api_save_pod_item_track_changed_fields_<pod>

Override $params['track_changed_fields'].

Description

apply_filters( 'pods_api_save_pod_item_track_changed_fields_<pod>', $boolean_params_track_changed_fields, (unknown) $params ); 

Use for globally setting field change tracking.

Parameters (2)

0. $boolean_params_track_changed_fields
The boolean params track changed fields.
1. $params (unknown)
The params.

Usage

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

Defined (1)

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

/classes/PodsAPI.php  
  1. $track_changed_fields = apply_filters( 'pods_api_save_pod_item_track_changed_fields_' . $params->pod, (boolean) $params->track_changed_fields, $params );