default_password_nag_handler

The WordPress Core default password nag handler function.

Description

default_password_nag_handler( (constant) $errors = false ); 

Parameters (1)

0. $errors — Optional. (constant) => false
The errors.

Usage

  1. if ( !function_exists( 'default_password_nag_handler' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/user.php'; 
  3.  
  4. // The errors. 
  5. $errors = false; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = default_password_nag_handler($errors); 
  9.  

Defined (1)

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

/wp-admin/includes/user.php  
  1. function default_password_nag_handler($errors = false) { 
  2. global $user_ID; 
  3. // Short-circuit it. 
  4. if ( ! get_user_option('default_password_nag') ) 
  5. return; 
  6.  
  7. // get_user_setting = JS saved UI setting. else no-js-fallback code. 
  8. if ( 'hide' == get_user_setting('default_password_nag') || isset($_GET['default_password_nag']) && '0' == $_GET['default_password_nag'] ) { 
  9. delete_user_setting('default_password_nag'); 
  10. update_user_option($user_ID, 'default_password_nag', false, true);