ninja_forms_register_exp_forms_metabox

The Ninja Forms ninja forms register exp metabox function.

Description

ninja_forms_register_exp_forms_metabox(); 

Usage

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

Defined (1)

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

/deprecated/includes/admin/pages/ninja-forms-impexp/tabs/impexp-forms/impexp-forms.php  
  1. function ninja_forms_register_exp_forms_metabox() { 
  2. if ( ! isset ( $_REQUEST['page'] ) || 'ninja-forms-impexp' != $_REQUEST['page'] ) 
  3. return false; 
  4.  
  5. $form_results = ninja_forms_get_all_forms(); 
  6. $form_select = array(); 
  7. if(is_array($form_results) AND !empty($form_results)) { 
  8. foreach($form_results as $form) { 
  9. if( isset( $form['data'] ) ) { 
  10. $data = $form['data']; 
  11. $form_title = $data['form_title']; 
  12. array_push($form_select, array('name' => $form_title, 'value' => $form['id'])); 
  13. $args = array( 
  14. 'page' => 'ninja-forms-impexp',  
  15. 'tab' => 'impexp_forms',  
  16. 'slug' => 'exp_form',  
  17. 'title' => __('Export a form', 'ninja-forms'),  
  18. 'settings' => array( 
  19. array( 
  20. 'name' => 'form_id',  
  21. 'type' => 'select',  
  22. 'label' => __('Select a form', 'ninja-forms'),  
  23. 'desc' => '',  
  24. 'options' => $form_select,  
  25. 'help_text' => '',  
  26. ),  
  27. array( 
  28. 'name' => 'submit',  
  29. 'type' => 'submit',  
  30. 'label' => __('Export Form', 'ninja-forms'),  
  31. 'class' => 'button-secondary',  
  32. ),  
  33. ),  
  34. );