ninja_forms_get_all_defs

The Ninja Forms ninja forms get all defs function.

Description

ninja_forms_get_all_defs(); 

Usage

  1. if ( !function_exists( 'ninja_forms_get_all_defs' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/database.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = ninja_forms_get_all_defs(); 
  7.  

Defined (1)

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

/deprecated/includes/database.php  
  1. function ninja_forms_get_all_defs() { 
  2. global $wpdb; 
  3. $def_results = $wpdb->get_results($wpdb->prepare("SELECT * FROM ".NINJA_FORMS_FAV_FIELDS_TABLE_NAME." WHERE row_type = %d", 0), ARRAY_A); 
  4. if(is_array($def_results) AND !empty($def_results)) { 
  5. $x = 0; 
  6. $count = count($def_results) - 1; 
  7. while($x <= $count) { 
  8. $def_results[$x]['data'] = unserialize($def_results[$x]['data']); 
  9. $x++; 
  10. return $def_results;