Changeset 12087 for trunk/src/bp-messages/bp-messages-notifications.php
- Timestamp:
- 05/11/2018 06:46:30 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-messages/bp-messages-notifications.php
r11800 r12087 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 );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)