Ticket #5945: bp-messages-functions-5945.diff
| File bp-messages-functions-5945.diff, 1.9 KB (added by , 11 years ago) |
|---|
-
src/bp-messages/bp-messages-functions.php
155 155 return false; 156 156 } 157 157 158 // Allow additional actions when a message is sent successfully 158 /** 159 * Fires after a message has been successfully sent. 160 * 161 * @since BuddyPress (1.1.0) 162 * 163 * @param BP_Messages_Message $message Message object. Passed by reference. 164 */ 159 165 do_action_ref_array( 'messages_message_sent', array( &$message ) ); 160 166 161 167 // Return the thread ID … … 182 188 $notice->is_active = 1; 183 189 $notice->save(); // send it. 184 190 191 /** 192 * Fires after a notice has been successfully sent. 193 * 194 * @since BuddyPress (1.0.0) 195 * 196 * @param string $subject Subject of the notice. 197 * @param string $message Content of the notice. 198 */ 185 199 do_action_ref_array( 'messages_send_notice', array( $subject, $message ) ); 186 200 187 201 return true; … … 195 209 * @return bool True on success, false on failure. 196 210 */ 197 211 function messages_delete_thread( $thread_ids ) { 212 213 /** 214 * Fires before specified thread IDs have been deleted. 215 * 216 * @since BuddyPress (1.5.0) 217 * 218 * @param int|array Thread ID or array of thread IDs that were deleted. 219 */ 198 220 do_action( 'messages_before_delete_thread', $thread_ids ); 199 221 200 222 if ( is_array( $thread_ids ) ) { … … 209 231 return false; 210 232 } 211 233 234 /** 235 * Fires after specified thread IDs have been deleted. 236 * 237 * @since BuddyPress (1.0.0) 238 * 239 * @param int|array Thread ID or array of thread IDs that were deleted. 240 */ 212 241 do_action( 'messages_delete_thread', $thread_ids ); 213 242 214 243 return true; … … 217 246 return false; 218 247 } 219 248 249 /** This action is documented in bp-messages/bp-messages-functions.php */ 220 250 do_action( 'messages_delete_thread', $thread_ids ); 221 251 222 252 return true;