bp_get_the_thread_message_content()

Get the content of the current message in the loop.

Description

Return

(string)

Source

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

2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
function bp_get_the_thread_message_content() {
    global $thread_template;
 
    $content = $thread_template->message->message;
 
    // If user was deleted, mark content as deleted.
    if ( false === bp_core_get_core_userdata( bp_get_the_thread_message_sender_id() ) ) {
        $content = esc_html__( '[deleted]', 'buddyboss' );
    }
 
    /**
     * Filters the content of the current message in the loop.
     *
     * @since BuddyPress 1.1.0
     *
     * @param string $message The content of the current message in the loop.
     */
    return apply_filters( 'bp_get_the_thread_message_content', $content );
}

Changelog

Changelog
Version Description
BuddyPress 1.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.