bbp_update_topic_id( int $post_id, int $topic_id )

Update the topic meta ID of a post


Description Description


Parameters Parameters

$post_id

(Required) The post to update

$topic_id

(Required) The topic


Top ↑

Source Source

File: includes/core/functions.php

function bbp_update_topic_id( $post_id = 0, $topic_id = 0 ) {

	// Allow the topic ID to be updated 'just in time' before save
	$topic_id = (int) apply_filters( 'bbp_update_topic_id', $topic_id, $post_id );

	// Update the post meta topic ID
	update_post_meta( $post_id, '_bbp_topic_id', $topic_id );

	return $topic_id;
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.