BBP_Forums_Group_Extension::remove_forum( type $forum_args = array() )
Removing a group forum or category (including root for group)
Description
Parameters
- $forum_args
-
(Optional)
Default value: array()
Return
(if) no forum_id is available
Source
File: bp-forums/groups.php
public function remove_forum( $forum_args = array() ) {
// Bail if no forum_id was passed
if ( empty( $forum_args['forum_id'] ) )
return;
// Validate forum_id
$forum_id = bbp_get_forum_id( $forum_args['forum_id'] );
$group_id = !empty( $forum_args['group_id'] ) ? $forum_args['group_id'] : bp_get_current_group_id();
bbp_remove_forum_id_from_group( $group_id, $forum_id );
bbp_remove_group_id_from_forum( $forum_id, $group_id );
}
Changelog
| Version | Description |
|---|---|
| bbPress (r3653) | 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.