ninja_forms_get_def_by_id

The Ninja Forms ninja forms get def by id function.

Description

ninja_forms_get_def_by_id( $def_id ); 

Parameters (1)

0. $def_id
The def id.

Usage

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

Defined (1)

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

/deprecated/includes/database.php  
  1. function ninja_forms_get_def_by_id($def_id) { 
  2. global $wpdb; 
  3. $def_row = $wpdb->get_row($wpdb->prepare("SELECT * FROM ".NINJA_FORMS_FAV_FIELDS_TABLE_NAME." WHERE id = %d", $def_id), ARRAY_A); 
  4. $def_row['data'] = unserialize($def_row['data']); 
  5. return $def_row;