bbp_remove_topic_from_all_subscriptions( int $topic_id )

Remove a deleted topic from all user subscriptions


Description Description


Parameters Parameters

$topic_id

(Required) Get the topic id to remove


Top ↑

Source Source

File: includes/topics/functions.php

function bbp_remove_topic_from_all_subscriptions( $topic_id = 0 ) {

	// Subscriptions are not active
	if ( ! bbp_is_subscriptions_active() ) {
		return;
	}

	// Bail if no topic
	$topic_id = bbp_get_topic_id( $topic_id );
	if ( empty( $topic_id ) ) {
		return;
	}

	// Remove all users
	return bbp_remove_object_from_all_users( $topic_id, '_bbp_subscription', 'post' );
}

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.