rgempty

The Gravity Forms rgempty function.

Description

rgempty( (string) $name, (null) $array = null ); 

Parameters (2)

0. $name (string)
The name.
1. $array — Optional. (null) => null
The array.

Usage

  1. if ( !function_exists( 'rgempty' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'gravity-forms/gravityforms.php'; 
  3.  
  4. // The name. 
  5. $name = ''; 
  6.  
  7. // The array. 
  8. $array = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = rgempty($name, $array); 
  12.  

Defined (1)

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

/gravityforms.php  
  1. function rgempty( $name, $array = null ) { 
  2.  
  3. if ( is_array( $name ) ) { 
  4. return empty( $name ); 
  5.  
  6. if ( ! $array ) { 
  7. $array = $_POST; 
  8.  
  9. $val = rgar( $array, $name ); 
  10.  
  11. return empty( $val );