pods_pods_field_related_output_type

Override the way realted fields are output.

Description

apply_filters( 'pods_pods_field_related_output_type', (string) $arrays, (array|object) $this_row, (array) $params, (object|Pods) $instance ); 

Parameters (4)

0. $arrays (string) => 'arrays'
How to output related fields. Default is arrays.. Options: id|name|object|array|pod
1. $this_row (array|object)
Current row being outputted.
2. $params (array)
Params array passed to field().
3. $instance (object|Pods)
Current Pods object.

Usage

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

Defined (1)

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

/classes/Pods.php  
  1. $params->output = apply_filters( 'pods_pods_field_related_output_type', 'arrays', $this->row, $params, $this );