bbp_get_form_topic_content()

Return the value of topic content field

Description

Return

(string) Value of topic content field

Source

File: bp-forums/topics/template.php

3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
function bbp_get_form_topic_content() {
 
    // Get _POST data
    if ( bbp_is_post_request() && isset( $_POST['bbp_topic_content'] ) ) {
        $topic_content = stripslashes( $_POST['bbp_topic_content'] );
 
    // Get edit data
    } elseif ( bbp_is_topic_edit() ) {
        $topic_content = bbp_get_global_post_field( 'post_content', 'raw' );
 
    // No data
    } else {
        $topic_content = '';
    }
 
    return apply_filters( 'bbp_get_form_topic_content', $topic_content );
}

Changelog

Changelog
Version Description
bbPress (r2976) 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.