pods_api

Include and get the PodsAPI object, for use with all calls that Pods makes for add, save, delete, and more.

Description

pods_api( (constant) $pod = null, (null) $format = null ); 

Parameters (2)

0. $pod — Optional. (constant) => null
(deprecated) The Pod name
1. $format — Optional. (null) => null
(deprecated) Format used in import() and export()

Usage

  1. if ( !function_exists( 'pods_api' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'pods-custom-content-types-and-fields/includes/classes.php'; 
  3.  
  4. // (optional) (deprecated) The Pod name 
  5. $pod = null; 
  6.  
  7. // (optional) (deprecated) Format used in import() and export() 
  8. $format = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = pods_api($pod, $format); 
  12.  

Defined (1)

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

/includes/classes.php  
  1. function pods_api ( $pod = null, $format = null ) { 
  2. require_once( PODS_DIR . 'classes/PodsAPI.php' ); 
  3.  
  4. return PodsAPI::init( $pod, $format );