bbp_close_forum( int $forum_id )

Closes a forum

Description

Parameters

$forum_id

(Required) forum id

Return

(mixed) False or WP_Error on failure, forum id on success

Source

File: bp-forums/forums/functions.php

705
706
707
708
709
710
711
712
713
714
715
716
function bbp_close_forum( $forum_id = 0 ) {
 
    $forum_id = bbp_get_forum_id( $forum_id );
 
    do_action( 'bbp_close_forum'$forum_id );
 
    update_post_meta( $forum_id, '_bbp_status', 'closed' );
 
    do_action( 'bbp_closed_forum', $forum_id );
 
    return $forum_id;
}

Changelog

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