bbp_get_forum_subscription_link( $args = array() )

Get the forum subscription link

Description

A custom wrapper for bbp_get_user_subscribe_link()

Source

File: bp-forums/forums/template.php

	function bbp_get_forum_subscription_link( $args = array() ) {

		// No link
		$retval = false;

		// Parse the arguments
		$r = bbp_parse_args( $args, array(
			'forum_id'    => 0,
			'user_id'     => 0,
			'before'      => '',
			'after'       => '',
			'subscribe'   => __( 'Subscribe',   'buddyboss' ),
			'unsubscribe' => __( 'Unsubscribe', 'buddyboss' )
		), 'get_forum_subscribe_link' );

		// No link for categories until we support subscription hierarchy
		// @see http://bbpress.trac.wordpress.org/ticket/2475
		if ( ! bbp_is_forum_category() ) {
			$retval = bbp_get_user_subscribe_link( $r );
		}

		return apply_filters( 'bbp_get_forum_subscribe_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.