Changeset 29206 for trunk/src/wp-admin/includes/user.php
- Timestamp:
- 07/17/2014 09:13:53 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/user.php
r28500 r29206 391 391 function default_password_nag_handler($errors = false) { 392 392 global $user_ID; 393 if ( ! get_user_option('default_password_nag') ) //Short circuit it. 393 // Short-circuit it. 394 if ( ! get_user_option('default_password_nag') ) 394 395 return; 395 396 396 // get_user_setting = JS saved UI setting. else no-js-fallback code.397 // get_user_setting = JS saved UI setting. else no-js-fallback code. 397 398 if ( 'hide' == get_user_setting('default_password_nag') || isset($_GET['default_password_nag']) && '0' == $_GET['default_password_nag'] ) { 398 399 delete_user_setting('default_password_nag'); … … 402 403 403 404 add_action('profile_update', 'default_password_nag_edit_user', 10, 2); 405 404 406 /** 405 407 * @since 2.8.0 406 408 */ 407 409 function default_password_nag_edit_user($user_ID, $old_data) { 408 if ( ! get_user_option('default_password_nag', $user_ID) ) //Short circuit it. 410 // Short-circuit it. 411 if ( ! get_user_option('default_password_nag', $user_ID) ) 409 412 return; 410 413 411 414 $new_data = get_userdata($user_ID); 412 415 413 if ( $new_data->user_pass != $old_data->user_pass ) { //Remove the nag if the password has been changed. 416 // Remove the nag if the password has been changed. 417 if ( $new_data->user_pass != $old_data->user_pass ) { 414 418 delete_user_setting('default_password_nag'); 415 419 update_user_option($user_ID, 'default_password_nag', false, true); … … 418 422 419 423 add_action('admin_notices', 'default_password_nag'); 424 420 425 /** 421 426 * @since 2.8.0 … … 423 428 function default_password_nag() { 424 429 global $pagenow; 425 if ( 'profile.php' == $pagenow || ! get_user_option('default_password_nag') ) //Short circuit it. 430 // Short-circuit it. 431 if ( 'profile.php' == $pagenow || ! get_user_option('default_password_nag') ) 426 432 return; 427 433
Note: See TracChangeset
for help on using the changeset viewer.