BuddyDev

Search

Replies

  • Participant
    Level: Initiated
    Posts: 1
    Scappe on #50783

    Yo this is a message to the me of yesterday and to anybody else who is looking for a way to disable the delete message function; add this stuff into your functions.php:

    function prevent_bp_message_deletion( $wp ) {
    if ( isset( $_GET[‘_wpnonce’] ) && strpos( $_SERVER[‘REQUEST_URI’], ‘/messages/sentbox/delete/’ ) !== false ) {
    wp_redirect( bp_loggedin_user_domain() . ‘messages/sentbox/’ );
    exit;
    }
    }
    add_action( ‘wp’, ‘prevent_bp_message_deletion’, 1 );