ninja_forms_save_screen_option_tabs

The Ninja Forms ninja forms save screen option tabs function.

Description

ninja_forms_save_screen_option_tabs(); 

Usage

  1. if ( !function_exists( 'ninja_forms_save_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_save_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_save_screen_option_tabs() { 
  2. $current_tab = ninja_forms_get_current_tab(); 
  3. $current_page = $_REQUEST['page']; 
  4. $opt = nf_get_settings(); 
  5. if(is_array($_POST['ninja-forms-tab'])) { 
  6. foreach($_POST['ninja-forms-tab'] as $slug => $val) { 
  7. $opt['screen_options']['tab'][$slug]['visible'] = $val; 
  8. if(is_array($_POST['ninja-forms-sidebar'])) { 
  9. foreach($_POST['ninja-forms-sidebar'] as $slug => $val) { 
  10. $opt['screen_options']['tab'][$current_tab]['sidebars'][$slug]['visible'] = $val; 
  11. update_option('ninja_forms_settings', $opt);