[buddypress-trac] [BuddyPress Trac] #7527: add an action "bp_messages_thread_created"
buddypress-trac
noreply at wordpress.org
Sun May 21 23:26:47 UTC 2017
#7527: add an action "bp_messages_thread_created"
-----------------------------+-----------------------------
Reporter: 7asobate | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Core | Version:
Severity: normal | Keywords:
-----------------------------+-----------------------------
add the action "bp_messages_thread_created" to the
"bp_messages_action_create_message" function in buddypress/bp-messages/bp-
messages-actions.php on line 101
{{{#!php
// Attempt to send the message.
$send = messages_new_message( array(
'recipients' => $recipients,
'subject' => $_POST['subject'],
'content' => $_POST['content'],
'error_type' => 'wp_error'
) );
// Send the message and redirect to it.
if ( true === is_int( $send ) ) {
$success = true;
$feedback = __( 'Message successfully
sent.', 'buddypress' );
$view = trailingslashit(
$member_messages . 'view' );
$redirect_to = trailingslashit( $view .
$send );
do_action('bp_messages_thread_created',
$send);
// Message could not be sent.
} else {
$success = false;
$feedback = $send->get_error_message();
}
}
}
}}}
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7527>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list