ninja_forms_register_tab_form_preview

The Ninja Forms ninja forms register tab form preview function.

Description

ninja_forms_register_tab_form_preview(); 

Usage

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

Defined (1)

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

/deprecated/includes/admin/pages/ninja-forms/tabs/form-preview/form-preview.php  
  1. function ninja_forms_register_tab_form_preview() { 
  2. if(isset($_REQUEST['form_id'])) { 
  3. $form_id = absint( $_REQUEST['form_id'] ); 
  4. }else{ 
  5. $form_id = ''; 
  6.  
  7. $args = array( 
  8. 'name' => __( 'Form Preview', 'ninja-forms' ),  
  9. 'page' => 'ninja-forms',  
  10. 'display_function' => '',  
  11. 'save_function' => '',  
  12. 'disable_no_form_id' => true,  
  13. 'show_save' => false,  
  14. 'url' => ninja_forms_preview_link( $form_id, false ),  
  15. 'target' => '_blank',  
  16. ); 
  17. ninja_forms_register_tab( 'form_preview', $args );