bp_current_action(), 'message_id' => bp_action_variable(), 'bulk' => (bool) bp_action_variable( 2 ), ) ); // Redirect back to previous screen. $redirect = wp_get_referer(); if ( ! $redirect ) { $redirect = bp_displayed_user_url( bp_members_get_path_chunks( array( bp_get_messages_slug() ) ) ); } bp_core_redirect( $redirect ); die(); } add_action( 'bp_actions', 'bp_messages_star_action_handler' );