ninja_forms_screen_option_tabs

The Ninja Forms ninja forms screen option tabs function.

Description

ninja_forms_screen_option_tabs(); 

Usage

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

Defined (1)

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

/deprecated/includes/admin/register-screen-options.php  
  1. function ninja_forms_screen_option_tabs() { 
  2. global $ninja_forms_tabs, $ninja_forms_sidebars; 
  3. $current_tab = ninja_forms_get_current_tab(); 
  4. $current_page = $_REQUEST['page']; 
  5. $opt = nf_get_settings(); 
  6. if(isset($ninja_forms_tabs[$current_page]) AND is_array($ninja_forms_tabs[$current_page])) { 
  7. ?> 
  8. <div class="tabs-prefs"> 
  9. <h5>Show These Tabs</h5> 
  10. <?php 
  11. foreach($ninja_forms_tabs[$current_page] as $slug => $tab) { 
  12. if(!isset($opt['screen_options']['tab'][$slug]['visible']) OR $opt['screen_options']['tab'][$slug]['visible'] == 1) { 
  13. $checked = 'checked = "checked"'; 
  14. }else{ 
  15. $checked = ''; 
  16. ?> 
  17. <input type="hidden" name="ninja-forms-tab[<?php echo $slug;?>]" value="0"> 
  18. <label for="ninja-forms-tab-<?php echo $slug;?>"><input class="hide-tab-tog" name="ninja-forms-tab[<?php echo $slug;?>]" type="checkbox" id="ninja-forms-tab-<?php echo $slug;?>" value="1" <?php echo $checked;?> ><?php echo $tab['name'];?></label> 
  19. <?php 
  20. ?> 
  21. <br class="clear"> 
  22. </div> 
  23. <?php if(isset($ninja_forms_sidebars[$current_page][$current_tab]) AND is_array($ninja_forms_sidebars[$current_page][$current_tab])) {?> 
  24. <div class="sidebar-prefs"> 
  25. <h5>Show These Sidebars</h5> 
  26. <?php 
  27. foreach($ninja_forms_sidebars[$current_page][$current_tab] as $slug => $sidebar) { 
  28. if(!isset($opt['screen_options']['tab'][$current_tab]['sidebars'][$slug]['visible']) OR $opt['screen_options']['tab'][$current_tab]['sidebars'][$slug]['visible'] == 1) { 
  29. $checked = 'checked = "checked"'; 
  30. }else{ 
  31. $checked = ''; 
  32. ?> 
  33. <input type="hidden" name="ninja-forms-sidebar[<?php echo $slug;?>]" value="0"> 
  34. <label for="ninja-forms-sidebar-<?php echo $slug;?>"><input class="hide-sidebar-tog" name="ninja-forms-sidebar[<?php echo $slug;?>]" type="checkbox" id="ninja-forms-sidebar-<?php echo $slug;?>" value="1" <?php echo $checked;?> ><?php echo $sidebar['name'];?></label> 
  35. <?php 
  36. ?> 
  37. <br class="clear"> 
  38. </div> 
  39. <?php