<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[BuddyPress][9947] trunk/src/bp-messages: Messages: Separate actions from screen functions</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://buddypress.trac.wordpress.org/changeset/9947">9947</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://buddypress.trac.wordpress.org/changeset/9947","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>johnjamesjacoby</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2015-06-15 23:54:42 +0000 (Mon, 15 Jun 2015)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Messages: Separate actions from screen functions
This change extracts action-specific functionality from 2 message specific screen functions (per the component coding standards) by introducing two new functions in `bp-messages-actions.php` and hooking them to `bp_actions`. These new functions handle the creation of new private messages and notices, and the editing & deletion of existing notices.
A few additional improvements were also made to these functionalities:
* String improvements to provide additional clarity to site members performing message related actions
* Code scrutinization and documentation improvements to better understand what these functions are for and when they were introduced
* Updates to new helper functions introduced since these functions were first introduced and last updated
Fixes <a href="http://buddypress.trac.wordpress.org/ticket/6505">#6505</a> (in trunk, for 2.4)</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcbpmessagesbpmessagesactionsphp">trunk/src/bp-messages/bp-messages-actions.php</a></li>
<li><a href="#trunksrcbpmessagesbpmessagesscreensphp">trunk/src/bp-messages/bp-messages-screens.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcbpmessagesbpmessagesactionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-messages/bp-messages-actions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-messages/bp-messages-actions.php 2015-06-15 21:01:31 UTC (rev 9946)
+++ trunk/src/bp-messages/bp-messages-actions.php 2015-06-15 23:54:42 UTC (rev 9947)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -15,6 +15,194 @@
</span><span class="cx" style="display: block; padding: 0 10px"> defined( 'ABSPATH' ) || exit;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Handle creating of private messages or sitewide notices
+ *
+ * @since BuddyPress (2.4.0)
+ *
+ * @return boolean
+ */
+function bp_messages_action_create_message() {
+
+ // Bail if not posting to the compose message screen
+ if ( ! bp_is_post_request() || ! bp_is_messages_component() || ! bp_is_current_action( 'compose' ) ) {
+ return false;
+ }
+
+ // Check the nonce
+ check_admin_referer( 'messages_send_message' );
+
+ // Define local variables
+ $redirect_to = '';
+ $feedback = '';
+ $success = false;
+
+ // Missing subject or content
+ if ( empty( $_POST['subject'] ) || empty( $_POST['content'] ) ) {
+ $success = false;
+ $feedback = __( 'Message was not sent. Check the contents and try again.', 'buddypress' );
+
+ // Subject and content present
+ } else {
+
+ // Setup the link to the logged-in user's messages
+ $member_messages = trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() );
+
+ // Site-wide notice
+ if ( isset( $_POST['send-notice'] ) ) {
+
+ // Attempt to save the notice and redirect to notices
+ if ( messages_send_notice( $_POST['subject'], $_POST['content'] ) ) {
+ $success = true;
+ $feedback = __( 'Notice successfully created.', 'buddypress' );
+ $redirect_to = trailingslashit( $member_messages . 'notices' );
+
+ // Notice could not be sent
+ } else {
+ $success = false;
+ $feedback = __( 'Notice was not created. Please try again.', 'buddypress' );
+ }
+
+ // Private conversation
+ } else {
+
+ // Filter recipients into the format we need - array( 'username/userid', 'username/userid' )
+ $autocomplete_recipients = (array) explode( ',', $_POST['send-to-input'] );
+ $typed_recipients = (array) explode( ' ', $_POST['send_to_usernames'] );
+ $recipients = array_merge( $autocomplete_recipients, $typed_recipients );
+
+ /**
+ * Filters the array of recipients to receive the composed message.
+ *
+ * @since BuddyPress (1.2.10)
+ *
+ * @param array $recipients Array of recipients to receive message.
+ */
+ $recipients = apply_filters( 'bp_messages_recipients', $recipients );
+
+ // Attempt to send the message
+ $thread_id = messages_new_message( array(
+ 'recipients' => $recipients,
+ 'subject' => $_POST['subject'],
+ 'content' => $_POST['content']
+ ) );
+
+ // Send the message and redirect to it
+ if ( ! empty( $thread_id ) ) {
+ $success = true;
+ $feedback = __( 'Message successfully sent.', 'buddypress' );
+ $view = trailingslashit( $member_messages . 'view' );
+ $redirect_to = trailingslashit( $view . $thread_id );
+
+ // Message could not be sent
+ } else {
+ $success = false;
+ $feedback = __( 'Message was not sent. Please try again.', 'buddypress' );
+ }
+ }
+ }
+
+ // Feedback
+ if ( ! empty( $feedback ) ) {
+
+ // Determine message type
+ $type = ( true === $success )
+ ? 'success'
+ : 'error';
+
+ // Add feedback message
+ bp_core_add_message( $feedback, $type );
+ }
+
+ // Maybe redirect
+ if ( ! empty( $redirect_to ) ) {
+ bp_core_redirect( $redirect_to );
+ }
+}
+add_action( 'bp_actions', 'bp_messages_action_create_message' );
+
+/**
+ * Handle editing of sitewide notices
+ *
+ * @since BuddyPress (2.4.0)
+ *
+ * @global int $notice_id
+ *
+ * @return boolean
+ */
+function bp_messages_action_edit_notice() {
+ global $notice_id;
+
+ // Bail if not viewing a single notice URL
+ if ( ! bp_is_messages_component() || ! bp_is_current_action( 'notices' ) || ! bp_action_variable( 1 ) ) {
+ return false;
+ }
+
+ // Get action variables
+ $action = bp_action_variable( 0 ); // deactivate|activate|delete
+ $notice_id = bp_action_variable( 1 ); // 1|2|3|etc...
+
+ // Bail if notice ID is not numeric
+ if ( ! is_numeric( $notice_id ) ) {
+ return;
+ }
+
+ // Define local variables
+ $redirect_to = '';
+ $feedback = '';
+ $success = false;
+
+ // Get the notice from database
+ $notice = new BP_Messages_Notice( $notice_id );
+
+ // Take action
+ switch ( $action ) {
+
+ // Deactivate
+ case 'deactivate' :
+ $success = $notice->deactivate();
+ $feedback = true === $success
+ ? __( 'Notice deactivated successfully.', 'buddypress' )
+ : __( 'There was a problem deactivating that notice.', 'buddypress' );
+ break;
+
+ // Activate
+ case 'activate' :
+ $success = $notice->activate();
+ $feedback = true === $success
+ ? __( 'Notice activated successfully.', 'buddypress' )
+ : __( 'There was a problem activating that notice.', 'buddypress' );
+ break;
+
+ // Delete
+ case 'delete' :
+ $success = $notice->delete();
+ $feedback = true === $success
+ ? __( 'Notice deleted successfully.', 'buddypress' )
+ : __( 'There was a problem deleting that notice.', 'buddypress' );
+ break;
+ }
+
+ // Feedback
+ if ( ! empty( $feedback ) ) {
+
+ // Determine message type
+ $type = ( true === $success )
+ ? 'success'
+ : 'error';
+
+ // Add feedback message
+ bp_core_add_message( $feedback, $type );
+ }
+
+ // Redirect
+ $member_notices = trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() );
+ $redirect_to = trailingslashit( $member_notices . 'notices' );
+
+ bp_core_redirect( $redirect_to );
+}
+add_action( 'bp_actions', 'bp_messages_action_edit_notice' );
+
+/**
</ins><span class="cx" style="display: block; padding: 0 10px"> * Process a request to view a single message thread.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function messages_action_conversation() {
</span></span></pre></div>
<a id="trunksrcbpmessagesbpmessagesscreensphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-messages/bp-messages-screens.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-messages/bp-messages-screens.php 2015-06-15 21:01:31 UTC (rev 9946)
+++ trunk/src/bp-messages/bp-messages-screens.php 2015-06-15 23:54:42 UTC (rev 9947)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -16,8 +16,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Load the Messages > Inbox screen.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *
+ * @since BuddyPress (1.0.0)
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function messages_screen_inbox() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( bp_action_variables() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> bp_do_404();
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -42,8 +45,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Load the Messages > Sent screen.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *
+ * @since BuddyPress (1.0.0)
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function messages_screen_sentbox() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( bp_action_variables() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> bp_do_404();
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -68,6 +74,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Load the Messages > Compose screen.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *
+ * @since BuddyPress (1.0.0)
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function messages_screen_compose() {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -79,55 +87,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Remove any saved message data from a previous session.
</span><span class="cx" style="display: block; padding: 0 10px"> messages_remove_callback_values();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Check if the message form has been submitted
- if ( isset( $_POST['send'] ) ) {
-
- // Check the nonce
- check_admin_referer( 'messages_send_message' );
-
- // Check we have what we need
- if ( empty( $_POST['subject'] ) || empty( $_POST['content'] ) ) {
- bp_core_add_message( __( 'There was an error sending that message. Please try again.', 'buddypress' ), 'error' );
- } else {
- // If this is a notice, send it
- if ( isset( $_POST['send-notice'] ) ) {
- if ( messages_send_notice( $_POST['subject'], $_POST['content'] ) ) {
- bp_core_add_message( __( 'Notice sent successfully!', 'buddypress' ) );
- bp_core_redirect( bp_loggedin_user_domain() . bp_get_messages_slug() . '/inbox/' );
- } else {
- bp_core_add_message( __( 'There was an error sending that notice. Please try again.', 'buddypress' ), 'error' );
- }
- } else {
- // Filter recipients into the format we need - array( 'username/userid', 'username/userid' )
- $autocomplete_recipients = explode( ',', $_POST['send-to-input'] );
- $typed_recipients = explode( ' ', $_POST['send_to_usernames'] );
- $recipients = array_merge( (array) $autocomplete_recipients, (array) $typed_recipients );
-
- /**
- * Filters the array of recipients to receive the composed message.
- *
- * @since BuddyPress (1.2.10)
- *
- * @param array $recipients Array of recipients to receive message.
- */
- $recipients = apply_filters( 'bp_messages_recipients', $recipients );
- $thread_id = messages_new_message( array(
- 'recipients' => $recipients,
- 'subject' => $_POST['subject'],
- 'content' => $_POST['content']
- ) );
-
- // Send the message
- if ( ! empty( $thread_id ) ) {
- bp_core_add_message( __( 'Message sent successfully!', 'buddypress' ) );
- bp_core_redirect( bp_loggedin_user_domain() . bp_get_messages_slug() . '/view/' . $thread_id . '/' );
- } else {
- bp_core_add_message( __( 'There was an error sending that message. Please try again.', 'buddypress' ), 'error' );
- }
- }
- }
- }
-
</del><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Fires right before the loading of the Messages compose screen template file.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -148,18 +107,20 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Load an individual conversation screen.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since BuddyPress (1.0.0)
+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @return bool|null False on failure.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function messages_screen_conversation() {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Bail if not viewing a single message
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( !bp_is_messages_component() || !bp_is_current_action( 'view' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! bp_is_messages_component() || ! bp_is_current_action( 'view' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $thread_id = (int) bp_action_variable( 0 );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( empty( $thread_id ) || !messages_is_valid_thread( $thread_id ) || ( !messages_check_thread_access( $thread_id ) && !bp_current_user_can( 'bp_moderate' ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( empty( $thread_id ) || ! messages_is_valid_thread( $thread_id ) || ( ! messages_check_thread_access( $thread_id ) && ! bp_current_user_can( 'bp_moderate' ) ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> bp_core_redirect( trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -190,38 +151,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Load the Messages > Notices screen.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since BuddyPress (1.0.0)
+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @return false|null False on failure.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function messages_screen_notices() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- global $notice_id;
</del><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $notice_id = (int) bp_action_variable( 1 );
-
- if ( !empty( $notice_id ) && is_numeric( $notice_id ) ) {
- $notice = new BP_Messages_Notice( $notice_id );
-
- if ( bp_is_action_variable( 'deactivate', 0 ) ) {
- if ( !$notice->deactivate() ) {
- bp_core_add_message( __('There was a problem deactivating that notice.', 'buddypress'), 'error' );
- } else {
- bp_core_add_message( __('Notice deactivated.', 'buddypress') );
- }
- } elseif ( bp_is_action_variable( 'activate', 0 ) ) {
- if ( !$notice->activate() ) {
- bp_core_add_message( __('There was a problem activating that notice.', 'buddypress'), 'error' );
- } else {
- bp_core_add_message( __('Notice activated.', 'buddypress') );
- }
- } elseif ( bp_is_action_variable( 'delete' ) ) {
- if ( !$notice->delete() ) {
- bp_core_add_message( __('There was a problem deleting that notice.', 'buddypress'), 'buddypress' );
- } else {
- bp_core_add_message( __('Notice deleted.', 'buddypress') );
- }
- }
- bp_core_redirect( trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() . '/notices' ) );
- }
-
</del><span class="cx" style="display: block; padding: 0 10px"> if ( bp_action_variables() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> bp_do_404();
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -246,8 +181,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Render the markup for the Messages section of Settings > Notifications.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *
+ * @since BuddyPress (1.0.0)
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function messages_screen_notification_settings() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( bp_action_variables() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> bp_do_404();
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span></span></pre>
</div>
</div>
</body>
</html>