Ticket #7822: 7822.diff
| File 7822.diff, 35.7 KB (added by , 8 years ago) |
|---|
-
src/bp-activity/bp-activity-notifications.php
diff --git a/src/bp-activity/bp-activity-notifications.php b/src/bp-activity/bp-activity-notifications.php index 63e3cf222..e98050496 100644
a b function bp_activity_add_notification_for_synced_blog_comment( $activity_id, $po 339 339 } 340 340 } 341 341 add_action( 'bp_blogs_comment_sync_activity_comment', 'bp_activity_add_notification_for_synced_blog_comment', 10, 4 ); 342 343 /** 344 * Add activity notifications settings to the notifications settings page. 345 * 346 * @since 1.2.0 347 */ 348 function bp_activity_screen_notification_settings() { 349 if ( bp_activity_do_mentions() ) { 350 if ( ! $mention = bp_get_user_meta( bp_displayed_user_id(), 'notification_activity_new_mention', true ) ) { 351 $mention = 'yes'; 352 } 353 } 354 355 if ( ! $reply = bp_get_user_meta( bp_displayed_user_id(), 'notification_activity_new_reply', true ) ) { 356 $reply = 'yes'; 357 } 358 359 ?> 360 361 <table class="notification-settings" id="activity-notification-settings"> 362 <thead> 363 <tr> 364 <th class="icon"> </th> 365 <th class="title"><?php _e( 'Activity', 'buddypress' ) ?></th> 366 <th class="yes"><?php _e( 'Yes', 'buddypress' ) ?></th> 367 <th class="no"><?php _e( 'No', 'buddypress' )?></th> 368 </tr> 369 </thead> 370 371 <tbody> 372 <?php if ( bp_activity_do_mentions() ) : ?> 373 <tr id="activity-notification-settings-mentions"> 374 <td> </td> 375 <td><?php printf( __( 'A member mentions you in an update using "@%s"', 'buddypress' ), bp_core_get_username( bp_displayed_user_id() ) ) ?></td> 376 <td class="yes"><input type="radio" name="notifications[notification_activity_new_mention]" id="notification-activity-new-mention-yes" value="yes" <?php checked( $mention, 'yes', true ) ?>/><label for="notification-activity-new-mention-yes" class="bp-screen-reader-text"><?php 377 /* translators: accessibility text */ 378 _e( 'Yes, send email', 'buddypress' ); 379 ?></label></td> 380 <td class="no"><input type="radio" name="notifications[notification_activity_new_mention]" id="notification-activity-new-mention-no" value="no" <?php checked( $mention, 'no', true ) ?>/><label for="notification-activity-new-mention-no" class="bp-screen-reader-text"><?php 381 /* translators: accessibility text */ 382 _e( 'No, do not send email', 'buddypress' ); 383 ?></label></td> 384 </tr> 385 <?php endif; ?> 386 387 <tr id="activity-notification-settings-replies"> 388 <td> </td> 389 <td><?php _e( "A member replies to an update or comment you've posted", 'buddypress' ) ?></td> 390 <td class="yes"><input type="radio" name="notifications[notification_activity_new_reply]" id="notification-activity-new-reply-yes" value="yes" <?php checked( $reply, 'yes', true ) ?>/><label for="notification-activity-new-reply-yes" class="bp-screen-reader-text"><?php 391 /* translators: accessibility text */ 392 _e( 'Yes, send email', 'buddypress' ); 393 ?></label></td> 394 <td class="no"><input type="radio" name="notifications[notification_activity_new_reply]" id="notification-activity-new-reply-no" value="no" <?php checked( $reply, 'no', true ) ?>/><label for="notification-activity-new-reply-no" class="bp-screen-reader-text"><?php 395 /* translators: accessibility text */ 396 _e( 'No, do not send email', 'buddypress' ); 397 ?></label></td> 398 </tr> 399 400 <?php 401 402 /** 403 * Fires inside the closing </tbody> tag for activity screen notification settings. 404 * 405 * @since 1.2.0 406 */ 407 do_action( 'bp_activity_screen_notification_settings' ) ?> 408 </tbody> 409 </table> 410 411 <?php 412 } 413 add_action( 'bp_notification_settings', 'bp_activity_screen_notification_settings', 1 ); -
src/bp-activity/classes/class-bp-activity-component.php
diff --git a/src/bp-activity/classes/class-bp-activity-component.php b/src/bp-activity/classes/class-bp-activity-component.php index c11e27297..e72d8460d 100644
a b class BP_Activity_Component extends BP_Component { 137 137 // Theme compatibility. 138 138 new BP_Activity_Theme_Compat(); 139 139 } 140 141 // Activity notifications HTML table.142 if ( bp_is_user_settings_notifications() ) {143 require $this->path . 'bp-activity/screens/settings-email.php';144 }145 140 } 146 141 147 142 /** -
deleted file src/bp-activity/screens/settings-email.php
diff --git a/src/bp-activity/screens/settings-email.php b/src/bp-activity/screens/settings-email.php deleted file mode 100644 index c97dffb54..000000000
+ - 1 <?php2 /**3 * Activity: Integration into user's "Settings > Email" screen4 *5 * @package BuddyPress6 * @subpackage ActivityScreens7 * @since 3.0.08 */9 10 // Exit if accessed directly.11 defined( 'ABSPATH' ) || exit;12 13 /**14 * Add activity notifications settings to the notifications settings page.15 *16 * @since 1.2.017 */18 function bp_activity_screen_notification_settings() {19 if ( bp_activity_do_mentions() ) {20 if ( ! $mention = bp_get_user_meta( bp_displayed_user_id(), 'notification_activity_new_mention', true ) ) {21 $mention = 'yes';22 }23 }24 25 if ( ! $reply = bp_get_user_meta( bp_displayed_user_id(), 'notification_activity_new_reply', true ) ) {26 $reply = 'yes';27 }28 29 ?>30 31 <table class="notification-settings" id="activity-notification-settings">32 <thead>33 <tr>34 <th class="icon"> </th>35 <th class="title"><?php _e( 'Activity', 'buddypress' ) ?></th>36 <th class="yes"><?php _e( 'Yes', 'buddypress' ) ?></th>37 <th class="no"><?php _e( 'No', 'buddypress' )?></th>38 </tr>39 </thead>40 41 <tbody>42 <?php if ( bp_activity_do_mentions() ) : ?>43 <tr id="activity-notification-settings-mentions">44 <td> </td>45 <td><?php printf( __( 'A member mentions you in an update using "@%s"', 'buddypress' ), bp_core_get_username( bp_displayed_user_id() ) ) ?></td>46 <td class="yes"><input type="radio" name="notifications[notification_activity_new_mention]" id="notification-activity-new-mention-yes" value="yes" <?php checked( $mention, 'yes', true ) ?>/><label for="notification-activity-new-mention-yes" class="bp-screen-reader-text"><?php47 /* translators: accessibility text */48 _e( 'Yes, send email', 'buddypress' );49 ?></label></td>50 <td class="no"><input type="radio" name="notifications[notification_activity_new_mention]" id="notification-activity-new-mention-no" value="no" <?php checked( $mention, 'no', true ) ?>/><label for="notification-activity-new-mention-no" class="bp-screen-reader-text"><?php51 /* translators: accessibility text */52 _e( 'No, do not send email', 'buddypress' );53 ?></label></td>54 </tr>55 <?php endif; ?>56 57 <tr id="activity-notification-settings-replies">58 <td> </td>59 <td><?php _e( "A member replies to an update or comment you've posted", 'buddypress' ) ?></td>60 <td class="yes"><input type="radio" name="notifications[notification_activity_new_reply]" id="notification-activity-new-reply-yes" value="yes" <?php checked( $reply, 'yes', true ) ?>/><label for="notification-activity-new-reply-yes" class="bp-screen-reader-text"><?php61 /* translators: accessibility text */62 _e( 'Yes, send email', 'buddypress' );63 ?></label></td>64 <td class="no"><input type="radio" name="notifications[notification_activity_new_reply]" id="notification-activity-new-reply-no" value="no" <?php checked( $reply, 'no', true ) ?>/><label for="notification-activity-new-reply-no" class="bp-screen-reader-text"><?php65 /* translators: accessibility text */66 _e( 'No, do not send email', 'buddypress' );67 ?></label></td>68 </tr>69 70 <?php71 72 /**73 * Fires inside the closing </tbody> tag for activity screen notification settings.74 *75 * @since 1.2.076 */77 do_action( 'bp_activity_screen_notification_settings' ) ?>78 </tbody>79 </table>80 81 <?php82 }83 add_action( 'bp_notification_settings', 'bp_activity_screen_notification_settings', 1 );84 No newline at end of file -
src/bp-friends/bp-friends-notifications.php
diff --git a/src/bp-friends/bp-friends-notifications.php b/src/bp-friends/bp-friends-notifications.php index b215dfb86..5962e9c9b 100644
a b function bp_friends_remove_notifications_data( $user_id = 0 ) { 230 230 bp_notifications_delete_notifications_from_user( $user_id, buddypress()->friends->id, 'friendship_request' ); 231 231 } 232 232 add_action( 'friends_remove_data', 'bp_friends_remove_notifications_data', 10, 1 ); 233 234 /** 235 * Add Friends-related settings to the Settings > Notifications page. 236 * 237 * @since 1.0.0 238 */ 239 function friends_screen_notification_settings() { 240 241 if ( !$send_requests = bp_get_user_meta( bp_displayed_user_id(), 'notification_friends_friendship_request', true ) ) 242 $send_requests = 'yes'; 243 244 if ( !$accept_requests = bp_get_user_meta( bp_displayed_user_id(), 'notification_friends_friendship_accepted', true ) ) 245 $accept_requests = 'yes'; ?> 246 247 <table class="notification-settings" id="friends-notification-settings"> 248 <thead> 249 <tr> 250 <th class="icon"></th> 251 <th class="title"><?php _ex( 'Friends', 'Friend settings on notification settings page', 'buddypress' ) ?></th> 252 <th class="yes"><?php _e( 'Yes', 'buddypress' ) ?></th> 253 <th class="no"><?php _e( 'No', 'buddypress' )?></th> 254 </tr> 255 </thead> 256 257 <tbody> 258 <tr id="friends-notification-settings-request"> 259 <td></td> 260 <td><?php _ex( 'A member sends you a friendship request', 'Friend settings on notification settings page', 'buddypress' ) ?></td> 261 <td class="yes"><input type="radio" name="notifications[notification_friends_friendship_request]" id="notification-friends-friendship-request-yes" value="yes" <?php checked( $send_requests, 'yes', true ) ?>/><label for="notification-friends-friendship-request-yes" class="bp-screen-reader-text"><?php 262 /* translators: accessibility text */ 263 _e( 'Yes, send email', 'buddypress' ); 264 ?></label></td> 265 <td class="no"><input type="radio" name="notifications[notification_friends_friendship_request]" id="notification-friends-friendship-request-no" value="no" <?php checked( $send_requests, 'no', true ) ?>/><label for="notification-friends-friendship-request-no" class="bp-screen-reader-text"><?php 266 /* translators: accessibility text */ 267 _e( 'No, do not send email', 'buddypress' ); 268 ?></label></td> 269 </tr> 270 <tr id="friends-notification-settings-accepted"> 271 <td></td> 272 <td><?php _ex( 'A member accepts your friendship request', 'Friend settings on notification settings page', 'buddypress' ) ?></td> 273 <td class="yes"><input type="radio" name="notifications[notification_friends_friendship_accepted]" id="notification-friends-friendship-accepted-yes" value="yes" <?php checked( $accept_requests, 'yes', true ) ?>/><label for="notification-friends-friendship-accepted-yes" class="bp-screen-reader-text"><?php 274 /* translators: accessibility text */ 275 _e( 'Yes, send email', 'buddypress' ); 276 ?></label></td> 277 <td class="no"><input type="radio" name="notifications[notification_friends_friendship_accepted]" id="notification-friends-friendship-accepted-no" value="no" <?php checked( $accept_requests, 'no', true ) ?>/><label for="notification-friends-friendship-accepted-no" class="bp-screen-reader-text"><?php 278 /* translators: accessibility text */ 279 _e( 'No, do not send email', 'buddypress' ); 280 ?></label></td> 281 </tr> 282 283 <?php 284 285 /** 286 * Fires after the last table row on the friends notification screen. 287 * 288 * @since 1.0.0 289 */ 290 do_action( 'friends_screen_notification_settings' ); ?> 291 292 </tbody> 293 </table> 294 295 <?php 296 } 297 add_action( 'bp_notification_settings', 'friends_screen_notification_settings' ); -
src/bp-friends/classes/class-bp-friends-component.php
diff --git a/src/bp-friends/classes/class-bp-friends-component.php b/src/bp-friends/classes/class-bp-friends-component.php index 0d461d4d3..90a244b75 100644
a b class BP_Friends_Component extends BP_Component { 92 92 require $this->path . 'bp-friends/screens/requests.php'; 93 93 } 94 94 } 95 96 // Settings.97 if ( bp_is_user_settings_notifications() ) {98 require $this->path . 'bp-friends/screens/settings-email.php';99 }100 95 } 101 96 102 97 /** -
deleted file src/bp-friends/screens/settings-email.php
diff --git a/src/bp-friends/screens/settings-email.php b/src/bp-friends/screens/settings-email.php deleted file mode 100644 index b4d0f2c3c..000000000
+ - 1 <?php2 /**3 * Friends: Integration into user's "Settings > Email" screen4 *5 * @package BuddyPress6 * @subpackage FriendsScreens7 * @since 3.0.08 */9 10 /**11 * Add Friends-related settings to the Settings > Notifications page.12 *13 * @since 1.0.014 */15 function friends_screen_notification_settings() {16 17 if ( !$send_requests = bp_get_user_meta( bp_displayed_user_id(), 'notification_friends_friendship_request', true ) )18 $send_requests = 'yes';19 20 if ( !$accept_requests = bp_get_user_meta( bp_displayed_user_id(), 'notification_friends_friendship_accepted', true ) )21 $accept_requests = 'yes'; ?>22 23 <table class="notification-settings" id="friends-notification-settings">24 <thead>25 <tr>26 <th class="icon"></th>27 <th class="title"><?php _ex( 'Friends', 'Friend settings on notification settings page', 'buddypress' ) ?></th>28 <th class="yes"><?php _e( 'Yes', 'buddypress' ) ?></th>29 <th class="no"><?php _e( 'No', 'buddypress' )?></th>30 </tr>31 </thead>32 33 <tbody>34 <tr id="friends-notification-settings-request">35 <td></td>36 <td><?php _ex( 'A member sends you a friendship request', 'Friend settings on notification settings page', 'buddypress' ) ?></td>37 <td class="yes"><input type="radio" name="notifications[notification_friends_friendship_request]" id="notification-friends-friendship-request-yes" value="yes" <?php checked( $send_requests, 'yes', true ) ?>/><label for="notification-friends-friendship-request-yes" class="bp-screen-reader-text"><?php38 /* translators: accessibility text */39 _e( 'Yes, send email', 'buddypress' );40 ?></label></td>41 <td class="no"><input type="radio" name="notifications[notification_friends_friendship_request]" id="notification-friends-friendship-request-no" value="no" <?php checked( $send_requests, 'no', true ) ?>/><label for="notification-friends-friendship-request-no" class="bp-screen-reader-text"><?php42 /* translators: accessibility text */43 _e( 'No, do not send email', 'buddypress' );44 ?></label></td>45 </tr>46 <tr id="friends-notification-settings-accepted">47 <td></td>48 <td><?php _ex( 'A member accepts your friendship request', 'Friend settings on notification settings page', 'buddypress' ) ?></td>49 <td class="yes"><input type="radio" name="notifications[notification_friends_friendship_accepted]" id="notification-friends-friendship-accepted-yes" value="yes" <?php checked( $accept_requests, 'yes', true ) ?>/><label for="notification-friends-friendship-accepted-yes" class="bp-screen-reader-text"><?php50 /* translators: accessibility text */51 _e( 'Yes, send email', 'buddypress' );52 ?></label></td>53 <td class="no"><input type="radio" name="notifications[notification_friends_friendship_accepted]" id="notification-friends-friendship-accepted-no" value="no" <?php checked( $accept_requests, 'no', true ) ?>/><label for="notification-friends-friendship-accepted-no" class="bp-screen-reader-text"><?php54 /* translators: accessibility text */55 _e( 'No, do not send email', 'buddypress' );56 ?></label></td>57 </tr>58 59 <?php60 61 /**62 * Fires after the last table row on the friends notification screen.63 *64 * @since 1.0.065 */66 do_action( 'friends_screen_notification_settings' ); ?>67 68 </tbody>69 </table>70 71 <?php72 }73 add_action( 'bp_notification_settings', 'friends_screen_notification_settings' );74 No newline at end of file -
src/bp-groups/bp-groups-notifications.php
diff --git a/src/bp-groups/bp-groups-notifications.php b/src/bp-groups/bp-groups-notifications.php index ec9ea5607..b94850fb5 100644
a b function bp_groups_remove_data_for_user_notifications( $user_id ) { 1052 1052 } 1053 1053 } 1054 1054 add_action( 'groups_remove_data_for_user', 'bp_groups_remove_data_for_user_notifications', 10 ); 1055 1056 /** 1057 * Render the group settings fields on the Notification Settings page. 1058 * 1059 * @since 1.0.0 1060 */ 1061 function groups_screen_notification_settings() { 1062 1063 if ( !$group_invite = bp_get_user_meta( bp_displayed_user_id(), 'notification_groups_invite', true ) ) 1064 $group_invite = 'yes'; 1065 1066 if ( !$group_update = bp_get_user_meta( bp_displayed_user_id(), 'notification_groups_group_updated', true ) ) 1067 $group_update = 'yes'; 1068 1069 if ( !$group_promo = bp_get_user_meta( bp_displayed_user_id(), 'notification_groups_admin_promotion', true ) ) 1070 $group_promo = 'yes'; 1071 1072 if ( !$group_request = bp_get_user_meta( bp_displayed_user_id(), 'notification_groups_membership_request', true ) ) 1073 $group_request = 'yes'; 1074 1075 if ( ! $group_request_completed = bp_get_user_meta( bp_displayed_user_id(), 'notification_membership_request_completed', true ) ) { 1076 $group_request_completed = 'yes'; 1077 } 1078 ?> 1079 1080 <table class="notification-settings" id="groups-notification-settings"> 1081 <thead> 1082 <tr> 1083 <th class="icon"></th> 1084 <th class="title"><?php _ex( 'Groups', 'Group settings on notification settings page', 'buddypress' ) ?></th> 1085 <th class="yes"><?php _e( 'Yes', 'buddypress' ) ?></th> 1086 <th class="no"><?php _e( 'No', 'buddypress' )?></th> 1087 </tr> 1088 </thead> 1089 1090 <tbody> 1091 <tr id="groups-notification-settings-invitation"> 1092 <td></td> 1093 <td><?php _ex( 'A member invites you to join a group', 'group settings on notification settings page','buddypress' ) ?></td> 1094 <td class="yes"><input type="radio" name="notifications[notification_groups_invite]" id="notification-groups-invite-yes" value="yes" <?php checked( $group_invite, 'yes', true ) ?>/><label for="notification-groups-invite-yes" class="bp-screen-reader-text"><?php 1095 /* translators: accessibility text */ 1096 _e( 'Yes, send email', 'buddypress' ); 1097 ?></label></td> 1098 <td class="no"><input type="radio" name="notifications[notification_groups_invite]" id="notification-groups-invite-no" value="no" <?php checked( $group_invite, 'no', true ) ?>/><label for="notification-groups-invite-no" class="bp-screen-reader-text"><?php 1099 /* translators: accessibility text */ 1100 _e( 'No, do not send email', 'buddypress' ); 1101 ?></label></td> 1102 </tr> 1103 <tr id="groups-notification-settings-info-updated"> 1104 <td></td> 1105 <td><?php _ex( 'Group information is updated', 'group settings on notification settings page', 'buddypress' ) ?></td> 1106 <td class="yes"><input type="radio" name="notifications[notification_groups_group_updated]" id="notification-groups-group-updated-yes" value="yes" <?php checked( $group_update, 'yes', true ) ?>/><label for="notification-groups-group-updated-yes" class="bp-screen-reader-text"><?php 1107 /* translators: accessibility text */ 1108 _e( 'Yes, send email', 'buddypress' ); 1109 ?></label></td> 1110 <td class="no"><input type="radio" name="notifications[notification_groups_group_updated]" id="notification-groups-group-updated-no" value="no" <?php checked( $group_update, 'no', true ) ?>/><label for="notification-groups-group-updated-no" class="bp-screen-reader-text"><?php 1111 /* translators: accessibility text */ 1112 _e( 'No, do not send email', 'buddypress' ); 1113 ?></label></td> 1114 </tr> 1115 <tr id="groups-notification-settings-promoted"> 1116 <td></td> 1117 <td><?php _ex( 'You are promoted to a group administrator or moderator', 'group settings on notification settings page', 'buddypress' ) ?></td> 1118 <td class="yes"><input type="radio" name="notifications[notification_groups_admin_promotion]" id="notification-groups-admin-promotion-yes" value="yes" <?php checked( $group_promo, 'yes', true ) ?>/><label for="notification-groups-admin-promotion-yes" class="bp-screen-reader-text"><?php 1119 /* translators: accessibility text */ 1120 _e( 'Yes, send email', 'buddypress' ); 1121 ?></label></td> 1122 <td class="no"><input type="radio" name="notifications[notification_groups_admin_promotion]" id="notification-groups-admin-promotion-no" value="no" <?php checked( $group_promo, 'no', true ) ?>/><label for="notification-groups-admin-promotion-no" class="bp-screen-reader-text"><?php 1123 /* translators: accessibility text */ 1124 _e( 'No, do not send email', 'buddypress' ); 1125 ?></label></td> 1126 </tr> 1127 <tr id="groups-notification-settings-request"> 1128 <td></td> 1129 <td><?php _ex( 'A member requests to join a private group for which you are an admin', 'group settings on notification settings page', 'buddypress' ) ?></td> 1130 <td class="yes"><input type="radio" name="notifications[notification_groups_membership_request]" id="notification-groups-membership-request-yes" value="yes" <?php checked( $group_request, 'yes', true ) ?>/><label for="notification-groups-membership-request-yes" class="bp-screen-reader-text"><?php 1131 /* translators: accessibility text */ 1132 _e( 'Yes, send email', 'buddypress' ); 1133 ?></label></td> 1134 <td class="no"><input type="radio" name="notifications[notification_groups_membership_request]" id="notification-groups-membership-request-no" value="no" <?php checked( $group_request, 'no', true ) ?>/><label for="notification-groups-membership-request-no" class="bp-screen-reader-text"><?php 1135 /* translators: accessibility text */ 1136 _e( 'No, do not send email', 'buddypress' ); 1137 ?></label></td> 1138 </tr> 1139 <tr id="groups-notification-settings-request-completed"> 1140 <td></td> 1141 <td><?php _ex( 'Your request to join a group has been approved or denied', 'group settings on notification settings page', 'buddypress' ) ?></td> 1142 <td class="yes"><input type="radio" name="notifications[notification_membership_request_completed]" id="notification-groups-membership-request-completed-yes" value="yes" <?php checked( $group_request_completed, 'yes', true ) ?>/><label for="notification-groups-membership-request-completed-yes" class="bp-screen-reader-text"><?php 1143 /* translators: accessibility text */ 1144 _e( 'Yes, send email', 'buddypress' ); 1145 ?></label></td> 1146 <td class="no"><input type="radio" name="notifications[notification_membership_request_completed]" id="notification-groups-membership-request-completed-no" value="no" <?php checked( $group_request_completed, 'no', true ) ?>/><label for="notification-groups-membership-request-completed-no" class="bp-screen-reader-text"><?php 1147 /* translators: accessibility text */ 1148 _e( 'No, do not send email', 'buddypress' ); 1149 ?></label></td> 1150 </tr> 1151 1152 <?php 1153 1154 /** 1155 * Fires at the end of the available group settings fields on Notification Settings page. 1156 * 1157 * @since 1.0.0 1158 */ 1159 do_action( 'groups_screen_notification_settings' ); ?> 1160 1161 </tbody> 1162 </table> 1163 1164 <?php 1165 } 1166 add_action( 'bp_notification_settings', 'groups_screen_notification_settings' ); -
src/bp-groups/classes/class-bp-groups-component.php
diff --git a/src/bp-groups/classes/class-bp-groups-component.php b/src/bp-groups/classes/class-bp-groups-component.php index 5b46a42e6..f7d45658d 100644
a b class BP_Groups_Component extends BP_Component { 210 210 // Theme compatibility. 211 211 new BP_Groups_Theme_Compat(); 212 212 } 213 214 // Groups notifications HTML table.215 if ( bp_is_user_settings_notifications() ) {216 require $this->path . 'bp-groups/screens/user/settings-email.php';217 }218 213 } 219 214 220 215 /** -
deleted file src/bp-groups/screens/user/settings-email.php
diff --git a/src/bp-groups/screens/user/settings-email.php b/src/bp-groups/screens/user/settings-email.php deleted file mode 100644 index ecfc7be9d..000000000
+ - 1 <?php2 /**3 * Groups: Integration into user's "Settings > Email" screen4 *5 * @package BuddyPress6 * @subpackage GroupScreens7 * @since 3.0.08 */9 10 /**11 * Render the group settings fields on the Notification Settings page.12 *13 * @since 1.0.014 */15 function groups_screen_notification_settings() {16 17 if ( !$group_invite = bp_get_user_meta( bp_displayed_user_id(), 'notification_groups_invite', true ) )18 $group_invite = 'yes';19 20 if ( !$group_update = bp_get_user_meta( bp_displayed_user_id(), 'notification_groups_group_updated', true ) )21 $group_update = 'yes';22 23 if ( !$group_promo = bp_get_user_meta( bp_displayed_user_id(), 'notification_groups_admin_promotion', true ) )24 $group_promo = 'yes';25 26 if ( !$group_request = bp_get_user_meta( bp_displayed_user_id(), 'notification_groups_membership_request', true ) )27 $group_request = 'yes';28 29 if ( ! $group_request_completed = bp_get_user_meta( bp_displayed_user_id(), 'notification_membership_request_completed', true ) ) {30 $group_request_completed = 'yes';31 }32 ?>33 34 <table class="notification-settings" id="groups-notification-settings">35 <thead>36 <tr>37 <th class="icon"></th>38 <th class="title"><?php _ex( 'Groups', 'Group settings on notification settings page', 'buddypress' ) ?></th>39 <th class="yes"><?php _e( 'Yes', 'buddypress' ) ?></th>40 <th class="no"><?php _e( 'No', 'buddypress' )?></th>41 </tr>42 </thead>43 44 <tbody>45 <tr id="groups-notification-settings-invitation">46 <td></td>47 <td><?php _ex( 'A member invites you to join a group', 'group settings on notification settings page','buddypress' ) ?></td>48 <td class="yes"><input type="radio" name="notifications[notification_groups_invite]" id="notification-groups-invite-yes" value="yes" <?php checked( $group_invite, 'yes', true ) ?>/><label for="notification-groups-invite-yes" class="bp-screen-reader-text"><?php49 /* translators: accessibility text */50 _e( 'Yes, send email', 'buddypress' );51 ?></label></td>52 <td class="no"><input type="radio" name="notifications[notification_groups_invite]" id="notification-groups-invite-no" value="no" <?php checked( $group_invite, 'no', true ) ?>/><label for="notification-groups-invite-no" class="bp-screen-reader-text"><?php53 /* translators: accessibility text */54 _e( 'No, do not send email', 'buddypress' );55 ?></label></td>56 </tr>57 <tr id="groups-notification-settings-info-updated">58 <td></td>59 <td><?php _ex( 'Group information is updated', 'group settings on notification settings page', 'buddypress' ) ?></td>60 <td class="yes"><input type="radio" name="notifications[notification_groups_group_updated]" id="notification-groups-group-updated-yes" value="yes" <?php checked( $group_update, 'yes', true ) ?>/><label for="notification-groups-group-updated-yes" class="bp-screen-reader-text"><?php61 /* translators: accessibility text */62 _e( 'Yes, send email', 'buddypress' );63 ?></label></td>64 <td class="no"><input type="radio" name="notifications[notification_groups_group_updated]" id="notification-groups-group-updated-no" value="no" <?php checked( $group_update, 'no', true ) ?>/><label for="notification-groups-group-updated-no" class="bp-screen-reader-text"><?php65 /* translators: accessibility text */66 _e( 'No, do not send email', 'buddypress' );67 ?></label></td>68 </tr>69 <tr id="groups-notification-settings-promoted">70 <td></td>71 <td><?php _ex( 'You are promoted to a group administrator or moderator', 'group settings on notification settings page', 'buddypress' ) ?></td>72 <td class="yes"><input type="radio" name="notifications[notification_groups_admin_promotion]" id="notification-groups-admin-promotion-yes" value="yes" <?php checked( $group_promo, 'yes', true ) ?>/><label for="notification-groups-admin-promotion-yes" class="bp-screen-reader-text"><?php73 /* translators: accessibility text */74 _e( 'Yes, send email', 'buddypress' );75 ?></label></td>76 <td class="no"><input type="radio" name="notifications[notification_groups_admin_promotion]" id="notification-groups-admin-promotion-no" value="no" <?php checked( $group_promo, 'no', true ) ?>/><label for="notification-groups-admin-promotion-no" class="bp-screen-reader-text"><?php77 /* translators: accessibility text */78 _e( 'No, do not send email', 'buddypress' );79 ?></label></td>80 </tr>81 <tr id="groups-notification-settings-request">82 <td></td>83 <td><?php _ex( 'A member requests to join a private group for which you are an admin', 'group settings on notification settings page', 'buddypress' ) ?></td>84 <td class="yes"><input type="radio" name="notifications[notification_groups_membership_request]" id="notification-groups-membership-request-yes" value="yes" <?php checked( $group_request, 'yes', true ) ?>/><label for="notification-groups-membership-request-yes" class="bp-screen-reader-text"><?php85 /* translators: accessibility text */86 _e( 'Yes, send email', 'buddypress' );87 ?></label></td>88 <td class="no"><input type="radio" name="notifications[notification_groups_membership_request]" id="notification-groups-membership-request-no" value="no" <?php checked( $group_request, 'no', true ) ?>/><label for="notification-groups-membership-request-no" class="bp-screen-reader-text"><?php89 /* translators: accessibility text */90 _e( 'No, do not send email', 'buddypress' );91 ?></label></td>92 </tr>93 <tr id="groups-notification-settings-request-completed">94 <td></td>95 <td><?php _ex( 'Your request to join a group has been approved or denied', 'group settings on notification settings page', 'buddypress' ) ?></td>96 <td class="yes"><input type="radio" name="notifications[notification_membership_request_completed]" id="notification-groups-membership-request-completed-yes" value="yes" <?php checked( $group_request_completed, 'yes', true ) ?>/><label for="notification-groups-membership-request-completed-yes" class="bp-screen-reader-text"><?php97 /* translators: accessibility text */98 _e( 'Yes, send email', 'buddypress' );99 ?></label></td>100 <td class="no"><input type="radio" name="notifications[notification_membership_request_completed]" id="notification-groups-membership-request-completed-no" value="no" <?php checked( $group_request_completed, 'no', true ) ?>/><label for="notification-groups-membership-request-completed-no" class="bp-screen-reader-text"><?php101 /* translators: accessibility text */102 _e( 'No, do not send email', 'buddypress' );103 ?></label></td>104 </tr>105 106 <?php107 108 /**109 * Fires at the end of the available group settings fields on Notification Settings page.110 *111 * @since 1.0.0112 */113 do_action( 'groups_screen_notification_settings' ); ?>114 115 </tbody>116 </table>117 118 <?php119 }120 add_action( 'bp_notification_settings', 'groups_screen_notification_settings' );121 No newline at end of file -
src/bp-messages/bp-messages-notifications.php
diff --git a/src/bp-messages/bp-messages-notifications.php b/src/bp-messages/bp-messages-notifications.php index 750e2388b..6f257d347 100644
a b function bp_messages_message_delete_notifications( $thread_id, $message_ids ) { 239 239 } 240 240 } 241 241 add_action( 'bp_messages_thread_after_delete', 'bp_messages_message_delete_notifications', 10, 2 ); 242 243 /** 244 * Render the markup for the Messages section of Settings > Notifications. 245 * 246 * @since 1.0.0 247 */ 248 function messages_screen_notification_settings() { 249 250 if ( bp_action_variables() ) { 251 bp_do_404(); 252 return; 253 } 254 255 if ( !$new_messages = bp_get_user_meta( bp_displayed_user_id(), 'notification_messages_new_message', true ) ) { 256 $new_messages = 'yes'; 257 } ?> 258 259 <table class="notification-settings" id="messages-notification-settings"> 260 <thead> 261 <tr> 262 <th class="icon"></th> 263 <th class="title"><?php _e( 'Messages', 'buddypress' ) ?></th> 264 <th class="yes"><?php _e( 'Yes', 'buddypress' ) ?></th> 265 <th class="no"><?php _e( 'No', 'buddypress' )?></th> 266 </tr> 267 </thead> 268 269 <tbody> 270 <tr id="messages-notification-settings-new-message"> 271 <td></td> 272 <td><?php _e( 'A member sends you a new message', 'buddypress' ) ?></td> 273 <td class="yes"><input type="radio" name="notifications[notification_messages_new_message]" id="notification-messages-new-messages-yes" value="yes" <?php checked( $new_messages, 'yes', true ) ?>/><label for="notification-messages-new-messages-yes" class="bp-screen-reader-text"><?php 274 /* translators: accessibility text */ 275 _e( 'Yes, send email', 'buddypress' ); 276 ?></label></td> 277 <td class="no"><input type="radio" name="notifications[notification_messages_new_message]" id="notification-messages-new-messages-no" value="no" <?php checked( $new_messages, 'no', true ) ?>/><label for="notification-messages-new-messages-no" class="bp-screen-reader-text"><?php 278 /* translators: accessibility text */ 279 _e( 'No, do not send email', 'buddypress' ); 280 ?></label></td> 281 </tr> 282 283 <?php 284 285 /** 286 * Fires inside the closing </tbody> tag for messages screen notification settings. 287 * 288 * @since 1.0.0 289 */ 290 do_action( 'messages_screen_notification_settings' ); ?> 291 </tbody> 292 </table> 293 294 <?php 295 } 296 add_action( 'bp_notification_settings', 'messages_screen_notification_settings', 2 ); -
src/bp-messages/classes/class-bp-messages-component.php
diff --git a/src/bp-messages/classes/class-bp-messages-component.php b/src/bp-messages/classes/class-bp-messages-component.php index 2d88c2dca..b9ccc35ee 100644
a b class BP_Messages_Component extends BP_Component { 138 138 } 139 139 } 140 140 } 141 142 // Groups notifications HTML table.143 if ( bp_is_user_settings_notifications() ) {144 require $this->path . 'bp-messages/screens/settings-email.php';145 }146 141 } 147 142 148 143 /** -
deleted file src/bp-messages/screens/settings-email.php
diff --git a/src/bp-messages/screens/settings-email.php b/src/bp-messages/screens/settings-email.php deleted file mode 100644 index 094f13c7b..000000000
+ - 1 <?php2 /**3 * Messages: Integration into user's "Settings > Email" screen4 *5 * @package BuddyPress6 * @subpackage MessageScreens7 * @since 3.0.08 */9 10 /**11 * Render the markup for the Messages section of Settings > Notifications.12 *13 * @since 1.0.014 */15 function messages_screen_notification_settings() {16 17 if ( bp_action_variables() ) {18 bp_do_404();19 return;20 }21 22 if ( !$new_messages = bp_get_user_meta( bp_displayed_user_id(), 'notification_messages_new_message', true ) ) {23 $new_messages = 'yes';24 } ?>25 26 <table class="notification-settings" id="messages-notification-settings">27 <thead>28 <tr>29 <th class="icon"></th>30 <th class="title"><?php _e( 'Messages', 'buddypress' ) ?></th>31 <th class="yes"><?php _e( 'Yes', 'buddypress' ) ?></th>32 <th class="no"><?php _e( 'No', 'buddypress' )?></th>33 </tr>34 </thead>35 36 <tbody>37 <tr id="messages-notification-settings-new-message">38 <td></td>39 <td><?php _e( 'A member sends you a new message', 'buddypress' ) ?></td>40 <td class="yes"><input type="radio" name="notifications[notification_messages_new_message]" id="notification-messages-new-messages-yes" value="yes" <?php checked( $new_messages, 'yes', true ) ?>/><label for="notification-messages-new-messages-yes" class="bp-screen-reader-text"><?php41 /* translators: accessibility text */42 _e( 'Yes, send email', 'buddypress' );43 ?></label></td>44 <td class="no"><input type="radio" name="notifications[notification_messages_new_message]" id="notification-messages-new-messages-no" value="no" <?php checked( $new_messages, 'no', true ) ?>/><label for="notification-messages-new-messages-no" class="bp-screen-reader-text"><?php45 /* translators: accessibility text */46 _e( 'No, do not send email', 'buddypress' );47 ?></label></td>48 </tr>49 50 <?php51 52 /**53 * Fires inside the closing </tbody> tag for messages screen notification settings.54 *55 * @since 1.0.056 */57 do_action( 'messages_screen_notification_settings' ); ?>58 </tbody>59 </table>60 61 <?php62 }63 add_action( 'bp_notification_settings', 'messages_screen_notification_settings', 2 );64 No newline at end of file