bbp_update_forum_id( int $post_id, int $forum_id )
Update the forum meta ID of a post
Description Description
Parameters Parameters
- $post_id
-
(Required) The post to update
- $forum_id
-
(Required) The forum
Source Source
File: includes/core/functions.php
function bbp_update_forum_id( $post_id = 0, $forum_id = 0 ) {
// Allow the forum ID to be updated 'just in time' before save
$forum_id = (int) apply_filters( 'bbp_update_forum_id', $forum_id, $post_id );
// Update the post meta forum ID
update_post_meta( $post_id, '_bbp_forum_id', $forum_id );
return $forum_id;
}
Changelog Changelog
| Version | Description |
|---|---|
| 2.0.0 | Introduced. |