Skip to:
Content

BuddyPress.org

Ticket #5945: bp-messages-functions-5945.diff

File bp-messages-functions-5945.diff, 1.9 KB (added by tw2113, 6 years ago)
  • src/bp-messages/bp-messages-functions.php

     
    155155                return false;
    156156        }
    157157
    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         */
    159165        do_action_ref_array( 'messages_message_sent', array( &$message ) );
    160166
    161167        // Return the thread ID
     
    182188                $notice->is_active = 1;
    183189                $notice->save(); // send it.
    184190
     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                 */
    185199                do_action_ref_array( 'messages_send_notice', array( $subject, $message ) );
    186200
    187201                return true;
     
    195209 * @return bool True on success, false on failure.
    196210 */
    197211function 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         */
    198220        do_action( 'messages_before_delete_thread', $thread_ids );
    199221
    200222        if ( is_array( $thread_ids ) ) {
     
    209231                        return false;
    210232                }
    211233
     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                 */
    212241                do_action( 'messages_delete_thread', $thread_ids );
    213242
    214243                return true;
     
    217246                        return false;
    218247                }
    219248
     249                /** This action is documented in bp-messages/bp-messages-functions.php */
    220250                do_action( 'messages_delete_thread', $thread_ids );
    221251
    222252                return true;