bp_get_the_thread_message_sender_id()

Return the ID for message sender within a single thread.

Description

Return

(int)

Source

File: bp-messages/bp-messages-template.php

1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
function bp_get_the_thread_message_sender_id() {
    global $thread_template;
 
    $user_id = ! empty( $thread_template->message->sender_id )
        ? $thread_template->message->sender_id
        : 0;
 
    /**
     * Filters the ID for message sender within a single thread.
     *
     * @since BuddyPress 2.1.0
     *
     * @param int $user_id ID of the message sender.
     */
    return (int) apply_filters( 'bp_get_the_thread_message_sender_id', (int) $user_id );
}

Changelog

Changelog
Version Description
BuddyPress 2.1.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.