ri_gfdp_getFormTransientExpiration

The Gravity Forms Data Persistence Add-On Reloaded ri gfdp getFormTransientExpiration function.

Description

ri_gfdp_getFormTransientExpiration( $form ); 

Parameters (1)

0. $form
The form.

Usage

  1. if ( !function_exists( 'ri_gfdp_getFormTransientExpiration' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'gravity-forms-data-persistence-add-on-reloaded/gravity-forms-data-persistence-add-on-reloaded.php'; 
  3.  
  4. // The form. 
  5. $form = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = ri_gfdp_getFormTransientExpiration($form); 
  9.  

Defined (1)

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

/gravity-forms-data-persistence-add-on-reloaded.php  
  1. function ri_gfdp_getFormTransientExpiration($form) { 
  2. if($form['ri_gfdp_persist_duration_int']) { 
  3. $duration_int = intval(rgar($form, 'ri_gfdp_persist_duration_int')); 
  4. $duration = intval(rgar($form, 'ri_gfdp_persist_duration')); 
  5. $expiration = $duration_int * $duration; 
  6. if (is_int($expiration)) 
  7. return $expiration; 
  8.  
  9. return 0;