messages_screen_notification_settings

Render the markup for the Messages section of Settings > Notifications.

Description

messages_screen_notification_settings(); 

Usage

  1. if ( !function_exists( 'messages_screen_notification_settings' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-messages/bp-messages-screens.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = messages_screen_notification_settings(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-messages/bp-messages-screens.php  
  1. function messages_screen_notification_settings() { 
  2.  
  3. if ( bp_action_variables() ) { 
  4. bp_do_404(); 
  5. return; 
  6.  
  7. if ( !$new_messages = bp_get_user_meta( bp_displayed_user_id(), 'notification_messages_new_message', true ) ) { 
  8. $new_messages = 'yes'; 
  9. } ?> 
  10.  
  11. <table class="notification-settings" id="messages-notification-settings"> 
  12. <thead> 
  13. <tr> 
  14. <th class="icon"></th> 
  15. <th class="title"><?php _e( 'Messages', buddypress ) ?></th> 
  16. <th class="yes"><?php _e( 'Yes', buddypress ) ?></th> 
  17. <th class="no"><?php _e( 'No', buddypress )?></th> 
  18. </tr> 
  19. </thead> 
  20.  
  21. <tbody> 
  22. <tr id="messages-notification-settings-new-message"> 
  23. <td></td> 
  24. <td><?php _e( 'A member sends you a new message', buddypress ) ?></td> 
  25. <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 
  26. /** translators: accessibility text */ 
  27. _e( 'Yes, send email', buddypress ); 
  28. ?></label></td> 
  29. <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 
  30. /** translators: accessibility text */ 
  31. _e( 'No, do not send email', buddypress ); 
  32. ?></label></td> 
  33. </tr> 
  34.  
  35. <?php 
  36.  
  37. /** 
  38. * Fires inside the closing </tbody> tag for messages screen notification settings. 
  39. * @since 1.0.0 
  40. */ 
  41. </tbody> 
  42. </table> 
  43.  
  44. <?php