Changeset 500283
- Timestamp:
- 02/04/2012 07:16:32 PM (14 years ago)
- File:
-
- 1 edited
-
wordpress-reset/trunk/wordpress-reset.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wordpress-reset/trunk/wordpress-reset.php
r496815 r500283 111 111 } 112 112 113 if ( array_key_exists( 'reset', $_GET ) && stristr( $_SERVER['HTTP_REFERER'], 'wordpress-reset' ) ) { 114 add_action( 'admin_notices', function () { 115 $user = get_user_by( 'id', 1 ); 116 echo '<div id="message" class="updated fade"><p><strong>WordPress has been reset back to defaults. The user "' . $user->user_login . '" was recreated with its previous password.</strong></p></div>'; 117 do_action( 'wordpress_reset_post', $user ); 118 } ); 119 } 113 if ( array_key_exists( 'reset', $_GET ) && stristr( $_SERVER['HTTP_REFERER'], 'wordpress-reset' ) ) 114 add_action( 'admin_notices', array( &$this, 'reset_notice' ) ); 115 } 116 117 // admin_notices action hook operations 118 // Inform the user that WordPress has been successfully reset 119 function reset_notice() { 120 $user = get_user_by( 'id', 1 ); 121 echo '<div id="message" class="updated fade"><p><strong>WordPress has been reset back to defaults. The user "' . $user->user_login . '" was recreated with its previous password.</strong></p></div>'; 122 do_action( 'wordpress_reset_post', $user ); 120 123 } 121 124
Note: See TracChangeset
for help on using the changeset viewer.