pods_serial_comma

The Pods - Custom Content Types and Fields pods serial comma hook.

Description

apply_filters( 'pods_serial_comma', (unknown) $params_separator, (unknown) $value, (unknown) $original_value, (unknown) $params ); 

Parameters (4)

0. $params_separator (unknown)
The params separator.
1. $value (unknown)
The value.
2. $original_value (unknown)
The original value.
3. $params (unknown)
The params.

Usage

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

Defined (1)

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

/includes/data.php  
  1. $value = trim( implode( $params->separator . ' ', $value ), $params->separator . ' ' ) . apply_filters( 'pods_serial_comma', $params->separator . ' ', $value, $original_value, $params );