pods_api_save_pod_item_taggable_data

Filter for changing tag before adding new item.

Description

apply_filters( 'pods_api_save_pod_item_taggable_data', (array) $tag_data, (int) $v, (obj) $search_data, (string) $field, $compact ); 

Parameters (5)

0. $tag_data (array)
Fields for creating new item.
1. $v (int)
Field ID of tag.
2. $search_data (obj)
Search object for tag.
3. $field (string)
Table info for field.
4. $compact
The compact.

Usage

To run the hook, copy the example below.
  1. $tag_data = apply_filters( 'pods_api_save_pod_item_taggable_data', $tag_data, $v, $search_data, $field, $compact ); 
  2.  
  3. if ( !empty( $tag_data ) ) { 
  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_taggable_data callback 
  2. function filter_pods_api_save_pod_item_taggable_data( $tag_data, $v, $search_data, $field, $compact ) { 
  3. // make filter magic happen here... 
  4. return $tag_data
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'pods_api_save_pod_item_taggable_data', 'filter_pods_api_save_pod_item_taggable_data', 10, 5 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'pods_api_save_pod_item_taggable_data', 'filter_pods_api_save_pod_item_taggable_data', 10, 5 ); 

Defined (1)

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

/classes/PodsAPI.php  
  1. $tag_data = apply_filters( 'pods_api_save_pod_item_taggable_data', $tag_data, $v, $search_data, $field, compact( $pieces ) );