Changeset 13503 for trunk/src/bp-messages/actions/compose.php
- Timestamp:
- 06/18/2023 04:11:04 AM (2 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-messages/actions/compose.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-messages/actions/compose.php
r13442 r13503 44 44 45 45 // Setup the link to the logged-in user's messages. 46 $message_slug = bp_get_messages_slug(); 47 $custom_message_slug = bp_rewrites_get_slug( 'members', 'member_' . $message_slug, $message_slug ); 48 $path_chunks = array( 49 'single_item_component' => $custom_message_slug, 50 ); 46 $path_chunks = array( bp_get_messages_slug() ); 51 47 52 48 // Site-wide notice. … … 55 51 // Attempt to save the notice and redirect to notices. 56 52 if ( messages_send_notice( $_POST['subject'], $_POST['content'] ) ) { 57 $success = true;58 $feedback = __( 'Notice successfully created.', 'buddypress' );59 $path_chunks[ 'single_item_action'] = bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_notices', 'notices' );60 $redirect_to = bp_loggedin_user_url( $path_chunks);53 $success = true; 54 $feedback = __( 'Notice successfully created.', 'buddypress' ); 55 $path_chunks[] = 'notices'; 56 $redirect_to = bp_loggedin_user_url( bp_members_get_path_chunks( $path_chunks ) ); 61 57 62 58 // Notice could not be sent. … … 93 89 // Send the message and redirect to it. 94 90 if ( true === is_int( $send ) ) { 95 $success = true;96 $feedback = __( 'Message successfully sent.', 'buddypress' );97 $path_chunks[ 'single_item_action'] = bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_view', 'view' );98 $path_chunks[ 'single_item_action_variables'] = array( $send );99 $redirect_to = bp_loggedin_user_url( $path_chunks);91 $success = true; 92 $feedback = __( 'Message successfully sent.', 'buddypress' ); 93 $path_chunks[] = 'view'; 94 $path_chunks[] = array( $send ); 95 $redirect_to = bp_loggedin_user_url( bp_members_get_path_chunks( $path_chunks ) ); 100 96 101 97 // Message could not be sent.
Note: See TracChangeset
for help on using the changeset viewer.