bbp_get_topic_favorite_link( $args = array() )

Get the forum favorite link

Description

A custom wrapper for bbp_get_user_favorite_link()

Source

File: bp-forums/topics/template.php

	function bbp_get_topic_favorite_link( $args = array() ) {

		// No link
		$retval = false;

		// Parse the arguments
		$r = bbp_parse_args( $args, array(
			'user_id'   => 0,
			'topic_id'  => 0,
			'before'    => '',
			'after'     => '',
			'favorite'  => __( 'Favorite',   'buddyboss' ),
			'favorited' => __( 'Unfavorite', 'buddyboss' )
		), 'get_forum_favorite_link' );

		// Get the link
		$retval = bbp_get_user_favorites_link( $r );

		return apply_filters( 'bbp_get_topic_favorite_link', $retval, $r );
	}

Changelog

Changelog
Version Description
bbPress (r5156) 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.