ninja_forms_update_screen_options

The Ninja Forms ninja forms update screen options function.

Description

ninja_forms_update_screen_options(); 

Usage

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

Defined (1)

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

/deprecated/includes/admin/display-screen-options.php  
  1. function ninja_forms_update_screen_options() { 
  2. global $ninja_forms_screen_options; 
  3. $current_tab = ninja_forms_get_current_tab(); 
  4. if(isset($_POST['_wpnonce'])) { 
  5. $nonce = $_POST['_wpnonce']; 
  6. }else{ 
  7. $nonce = ''; 
  8. if(!empty($_POST) AND $_POST['ninja_forms_save_screen_options'] == 1 AND wp_verify_nonce($nonce, 'ninja_forms_update_options') AND check_admin_referer( 'ninja_forms_update_options', '_wpnonce' )) { 
  9. if(!empty($ninja_forms_screen_options) AND is_array($ninja_forms_screen_options)) { 
  10. //print_r($ninja_forms_screen_options); 
  11. if(isset($ninja_forms_screen_options['_universal_']) AND is_array($ninja_forms_screen_options['_universal_'])) { 
  12. foreach($ninja_forms_screen_options['_universal_'] as $slug => $option) { 
  13. $save_function = $option['save_function']; 
  14. $arguments = func_get_args(); 
  15. array_shift($arguments); // We need to remove the first arg ($function_name) 
  16. call_user_func_array($save_function, $arguments); 
  17. if(isset($ninja_forms_screen_options[$current_tab]) AND is_array($ninja_forms_screen_options[$current_tab])) { 
  18. foreach($ninja_forms_screen_options[$current_tab] as $slug => $option) { 
  19. $save_function = $option['save_function']; 
  20. $arguments = func_get_args(); 
  21. array_shift($arguments); // We need to remove the first arg ($function_name) 
  22. call_user_func_array($save_function, $arguments);