Skip to:
Content
Pages
Categories
Search
Top
Bottom

Private Message Redirect

  • Hi….ive created a second instance of the compose form for a private message, which is used form a specific custom post type to send information to the post author. of course, when the message is sent, the user is directed back to the message view, and the standard, your message has been sent text. I found where this is coming from, in bp-messages.php,
    ` // Send the message
    if ( $thread_id = messages_new_message( array( ‘recipients’ => $recipients, ‘subject’ => $_POST, ‘content’ => $_POST ) ) ) {
    bp_core_add_message( __( ‘Message sent successfully!’, ‘buddypress’ ) );
    bp_core_redirect( $bp->loggedin_user->domain . $bp->messages->slug . ‘/view/’ . $thread_id . ‘/’ );
    } else {
    bp_core_add_message( __( ‘There was an error sending that message, please try again’, ‘buddypress’ ), ‘error’ );
    }
    }
    }
    }`

    So im wondering if anybody has any thoughts on how, or if, i could test to see if the form was being submitted from my custom post type, and if so, redirect to a different thank you page instead. Ive tried several things, none of which worked, and only broke my form. thanks!

  • The topic ‘Private Message Redirect’ is closed to new replies.
Skip to toolbar