pods_register_field_type

Add a new Pod field type.

Description

(array) pods_register_field_type( (string) $type, (null) $file = null ); 

Returns (array)

Field type array

Parameters (2)

0. $type (string)
The new field type identifier
1. $file — Optional. (null) => null
The new field type class file location

Usage

  1. if ( !function_exists( 'pods_register_field_type' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'pods-custom-content-types-and-fields/includes/general.php'; 
  3.  
  4. // The new field type identifier 
  5. $type = ''; 
  6.  
  7. // The new field type class file location 
  8. $file = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = pods_register_field_type($type, $file); 
  12.  

Defined (1)

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

/includes/general.php  
  1. function pods_register_field_type ( $type, $file = null ) { 
  2. return PodsForm::register_field_type( $type, $file );