bbp_is_user_favorite( int $user_id, int $topic_id )

Check if a topic is in user’s favorites or not


Description Description


Parameters Parameters

$user_id

(Optional) User id

$topic_id

(Optional) Topic id


Top ↑

Return Return

(bool) True if the topic is in user's favorites, otherwise false


Top ↑

Source Source

File: includes/users/engagements.php

function bbp_is_user_favorite( $user_id = 0, $topic_id = 0 ) {
	$retval = bbp_is_object_of_user( $topic_id, $user_id, '_bbp_favorite' );

	// Filter & return
	return (bool) apply_filters( 'bbp_is_user_favorite', $retval, $user_id, $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.