messages_action_delete_message ()
处理删除消息的请求。
描述
返回
(保龄球);如果执行失败将返回False。
源
文件:bp-messages /行动/ delete.php
函数messages_action_delete_message() {if (!Bp_is_messages_component () || bp_is_current_action('notice ') || !Bp_is_action_variable ('delete', 0)){返回false;} $thread_id = bp_action_variable(1);If (!$thread_id || !is_numeric($thread_id) || !messages_check_thread_access($thread_id)) {bp_core_redirect(trailingslashit(bp_displayed_user_domain());bp_get_messages_slug()。“/”。bp_current_action ()));} else {if (!Check_admin_referer ('messages_delete_thread')){返回false; } // Delete message. if ( !messages_delete_thread( $thread_id ) ) { bp_core_add_message( __('There was an error deleting that message.', 'buddyboss'), 'error' ); } else { bp_core_add_message( __('Message deleted.', 'buddyboss') ); } bp_core_redirect( trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() ) ); } }