pods_data

Include and Init the PodsData class.

Description

pods_data( (constant) $pod = null, (constant) $id = null, (constant) $strict = true, (bool) $unique = true ); 

Parameters (4)

0. $pod — Optional. (constant) => null
The pod object to load
1. $id — Optional. (constant) => null
Id of the pod to fetch
2. $strict — Optional. (constant) => true
If true throw an error if the pod does not exist
3. $unique — Optional. (bool) => true
If true always return a unique class

Usage

  1. if ( !function_exists( 'pods_data' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'pods-custom-content-types-and-fields/includes/classes.php'; 
  3.  
  4. // The pod object to load 
  5. $pod = null; 
  6.  
  7. // (optional) Id of the pod to fetch 
  8. $id = null; 
  9.  
  10. // (optional) If true throw an error if the pod does not exist 
  11. $strict = true; 
  12.  
  13. // (optional) If true always return a unique class 
  14. $unique = true; 
  15.  
  16. // NOTICE! Understand what this does before running. 
  17. $result = pods_data($pod, $id, $strict, $unique); 
  18.  

Defined (1)

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

/includes/classes.php  
  1. function pods_data ( $pod = null, $id = null, $strict = true, $unique = true ) { 
  2. require_once( PODS_DIR . 'classes/PodsData.php' ); 
  3.  
  4. if ( $unique && false !== $pod ) 
  5. return new PodsData( $pod, $id, $strict ); 
  6.  
  7. return PodsData::init( $pod, $id, $strict );