bbp_update_topic_id( int $post_id, $topic_id )
Update a posts topic meta ID
Description
Parameters
- $post_id
-
(Required) The post to update
- $forum_id
-
(Required) The forum
Source
File: bp-forums/core/functions.php
98 99 100 101 102 103 104 105 | function bbp_update_topic_id( $post_id , $topic_id ) { // Allow the topic ID to be updated 'just in time' before save $topic_id = apply_filters( 'bbp_update_topic_id' , $topic_id , $post_id ); // Update the post meta topic ID update_post_meta( $post_id , '_bbp_topic_id' , (int) $topic_id ); } |
Changelog
Version | Description |
---|---|
bbPress (r3181) | 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.