ninja_forms_add_list_options

The Ninja Forms ninja forms add list options function.

Description

ninja_forms_add_list_options(); 

Usage

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

Defined (1)

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

/deprecated/includes/admin/ajax.php  
  1. function ninja_forms_add_list_options() { 
  2. global $wpdb; 
  3.  
  4. // Bail if we aren't in the admin 
  5. if ( ! is_admin() ) 
  6. return false; 
  7.  
  8. // Bail if we don't have proper permissions 
  9. if ( ! current_user_can( apply_filters( 'nf_new_field_capabilities', 'manage_options' ) ) ) 
  10. return false; 
  11.  
  12. check_ajax_referer( 'nf_ajax', 'nf_ajax_nonce' ); 
  13.  
  14. $field_id = absint( $_REQUEST['field_id'] ); 
  15. $x = absint( $_REQUEST['x'] ); 
  16. $hidden_value = esc_html( $_REQUEST['hidden_value'] ); 
  17. ninja_forms_field_list_option_output($field_id, $x, '', $hidden_value); 
  18. die();