Ticket #20007: wp-reg-notify-option-patch2.diff
| File wp-reg-notify-option-patch2.diff, 5.0 KB (added by Veraxus, 15 months ago) |
|---|
-
wp-admin/includes/schema.php
387 387 'links_recently_updated_time' => 120, 388 388 'comment_moderation' => 0, 389 389 'moderation_notify' => 1, 390 'registration_notify' => 1, 391 'password_reset_notify' => 1, 390 392 'permalink_structure' => '', 391 393 'gzipcompression' => 0, 392 394 'hack_file' => 0, -
wp-admin/options-discussion.php
120 120 <tr valign="top"> 121 121 <th scope="row"><?php _e('E-mail me whenever'); ?></th> 122 122 <td><fieldset><legend class="screen-reader-text"><span><?php _e('E-mail me whenever'); ?></span></legend> 123 <label for="registration_notify"> 124 <input name="registration_notify" type="checkbox" id="registration_notify" value="1" <?php checked('1', get_option('registration_notify')); ?> /> 125 <?php _e('Somebody registers'); ?> </label> 126 <br /> 123 127 <label for="comments_notify"> 124 128 <input name="comments_notify" type="checkbox" id="comments_notify" value="1" <?php checked('1', get_option('comments_notify')); ?> /> 125 129 <?php _e('Anyone posts a comment'); ?> </label> … … 127 131 <label for="moderation_notify"> 128 132 <input name="moderation_notify" type="checkbox" id="moderation_notify" value="1" <?php checked('1', get_option('moderation_notify')); ?> /> 129 133 <?php _e('A comment is held for moderation'); ?> </label> 134 <br/> 135 <label for="password_reset_notify"> 136 <input name="password_reset_notify" type="checkbox" id="password_reset_notify" value="1" <?php checked('1', get_option('password_reset_notify')); ?> /> 137 <?php _e('Anyone resets their password'); ?> </label> 130 138 </fieldset></td> 131 139 </tr> 132 140 <tr valign="top"> -
wp-admin/options.php
60 60 61 61 $whitelist_options = array( 62 62 'general' => array( 'blogname', 'blogdescription', 'gmt_offset', 'date_format', 'time_format', 'start_of_week', 'timezone_string' ), 63 'discussion' => array( 'default_pingback_flag', 'default_ping_status', 'default_comment_status', ' comments_notify', 'moderation_notify', 'comment_moderation', 'require_name_email', 'comment_whitelist', 'comment_max_links', 'moderation_keys', 'blacklist_keys', 'show_avatars', 'avatar_rating', 'avatar_default', 'close_comments_for_old_posts', 'close_comments_days_old', 'thread_comments', 'thread_comments_depth', 'page_comments', 'comments_per_page', 'default_comments_page', 'comment_order', 'comment_registration' ),63 'discussion' => array( 'default_pingback_flag', 'default_ping_status', 'default_comment_status', 'registration_notify','comments_notify', 'moderation_notify', 'password_reset_notify', 'comment_moderation', 'require_name_email', 'comment_whitelist', 'comment_max_links', 'moderation_keys', 'blacklist_keys', 'show_avatars', 'avatar_rating', 'avatar_default', 'close_comments_for_old_posts', 'close_comments_days_old', 'thread_comments', 'thread_comments_depth', 'page_comments', 'comments_per_page', 'default_comments_page', 'comment_order', 'comment_registration' ), 64 64 'media' => array( 'thumbnail_size_w', 'thumbnail_size_h', 'thumbnail_crop', 'medium_size_w', 'medium_size_h', 'large_size_w', 'large_size_h', 'image_default_size', 'image_default_align', 'image_default_link_type', 'embed_autourls', 'embed_size_w', 'embed_size_h' ), 65 65 'privacy' => array( 'blog_public' ), 66 66 'reading' => array( 'posts_per_page', 'posts_per_rss', 'rss_use_excerpt', 'blog_charset', 'show_on_front', 'page_on_front', 'page_for_posts' ), -
wp-includes/pluggable.php
1160 1160 function wp_password_change_notification(&$user) { 1161 1161 // send a copy of password change notification to the admin 1162 1162 // but check to see if it's the admin whose password we're changing, and skip this 1163 if ( $user->user_email != get_option('admin_email') ) {1163 if ( $user->user_email != get_option('admin_email') && 1 == get_option( 'password_reset_notify' ) ) { 1164 1164 $message = sprintf(__('Password Lost and Changed for user: %s'), $user->user_login) . "\r\n"; 1165 1165 // The blogname option is escaped with esc_html on the way into the database in sanitize_option 1166 1166 // we want to reverse this for the plain text arena of emails. … … 1193 1193 $message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n"; 1194 1194 $message .= sprintf(__('E-mail: %s'), $user_email) . "\r\n"; 1195 1195 1196 @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), $blogname), $message); 1197 1196 if ( 1 == get_option( 'registration_notify' ) ) { 1197 @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), $blogname), $message); 1198 } 1199 1198 1200 if ( empty($plaintext_pass) ) 1199 1201 return; 1200 1202
