pods_register_related_object

Register a related object.

Description

(array|boolean) pods_register_related_object( (string) $name, (string) $label, (null) $options = null ); 

Returns (array|boolean)

Object array or false if unsuccessful

Parameters (3)

0. $name (string)
Object name
1. $label (string)
Object label
2. $options — Optional. (null) => null
Object options

Usage

  1. if ( !function_exists( 'pods_register_related_object' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'pods-custom-content-types-and-fields/includes/general.php'; 
  3.  
  4. // Object name 
  5. $name = ''; 
  6.  
  7. // Object label 
  8. $label = ''; 
  9.  
  10. // Object options 
  11. $options = null; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = pods_register_related_object($name, $label, $options); 
  15.  

Defined (1)

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

/includes/general.php  
  1. function pods_register_related_object ( $name, $label, $options = null ) { 
  2. return PodsForm::field_method( 'pick', 'register_related_object', $name, $label, $options );