ninja_forms_display_tabs

The Ninja Forms ninja forms display tabs function.

Description

ninja_forms_display_tabs(); 

Usage

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

Defined (1)

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

/deprecated/includes/admin/tabs.php  
  1. function ninja_forms_display_tabs() { 
  2. global $ninja_forms_tabs; 
  3. $current_tab = ninja_forms_get_current_tab(); 
  4. $current_page = esc_html( $_REQUEST['page'] ); 
  5. $opt = nf_get_settings(); 
  6. if(isset($_REQUEST['form_id'])) { 
  7. $form_id = absint( $_REQUEST['form_id'] ); 
  8. }else{ 
  9. $form_id = ''; 
  10. if(isset($ninja_forms_tabs[$current_page]) AND is_array($ninja_forms_tabs[$current_page])) { 
  11. foreach($ninja_forms_tabs[$current_page] as $slug => $tab) { 
  12. if((isset($opt['screen_options']['tab'][$slug]['visible']) AND $opt['screen_options']['tab'][$slug]['visible'] == 1) OR !isset($opt['screen_options']['tab'][$slug]['visible'])) { 
  13. if($tab['add_form_id'] == 1) { 
  14. $link = remove_query_arg( array( 'update_message', 'notification-action' ) ); 
  15. if($form_id != '') { 
  16. $link = esc_url( add_query_arg( array( 'tab' => $slug, 'form_id' => $form_id ), $link ) ); 
  17. }else{ 
  18. $link = esc_url( add_query_arg( array( 'tab' => $slug ), $link ) ); 
  19. }else{ 
  20. $link = esc_url( remove_query_arg( array( 'form_id', 'tab', 'update_message' ) ) ); 
  21. $link = esc_url( add_query_arg( array( 'tab' => $slug ), $link ) ); 
  22.  
  23. if($tab['disable_no_form_id'] AND ($form_id == '' OR $form_id == 'new')) { 
  24. $link = ''; 
  25.  
  26. if( isset( $tab['url'] ) ) { 
  27. $link = $tab['url']; 
  28.  
  29. if( isset( $tab['target'] ) ) { 
  30. $target = $tab['target']; 
  31. }else{ 
  32. $target = ''; 
  33.  
  34. if($tab['show_this_tab_link']) { 
  35. if($current_tab == $slug) { 
  36. ?> 
  37. <span class="nav-tab nav-tab-active <?php echo $tab['active_class'];?>"><?php echo $tab['name'];?></span> 
  38. <?php 
  39. }else{ 
  40. ?> 
  41. <a href="<?php echo $link;?>" target="<?php echo $target;?>" class="nav-tab <?php echo $tab['inactive_class'];?>"><?php echo $tab['name'];?></a> 
  42. <?php