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

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

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.