default_password_nag

The WordPress Core default password nag function.

Description

default_password_nag(); 

Usage

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

Defined (1)

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

/wp-admin/includes/user.php  
  1. function default_password_nag() { 
  2. global $pagenow; 
  3. // Short-circuit it. 
  4. if ( 'profile.php' == $pagenow || ! get_user_option('default_password_nag') ) 
  5. return; 
  6.  
  7. echo '<div class="error default-password-nag">'; 
  8. echo '<p>'; 
  9. echo '<strong>' . __('Notice:') . '</strong> '; 
  10. _e('You’re using the auto-generated password for your account. Would you like to change it?'); 
  11. echo '</p><p>'; 
  12. printf( '<a href="%s">' . __('Yes, take me to my profile page') . '</a> | ', get_edit_profile_url() . '#password' ); 
  13. printf( '<a href="%s" id="default-password-nag-no">' . __('No thanks, do not remind me again') . '</a>', '?default_password_nag=0' ); 
  14. echo '</p></div>';