ninja_forms_get_all_favs

The Ninja Forms ninja forms get all favs function.

Description

ninja_forms_get_all_favs(); 

Usage

  1. if ( !function_exists( 'ninja_forms_get_all_favs' ) ) { 
  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_favs(); 
  7.  

Defined (1)

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

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