bbp_get_forum_permalink( int $forum_id, string $redirect_to = '' )

Return the link to the forum


Description Description


Parameters Parameters

$forum_id

(Optional) Forum id

$redirect_to

(Optional) Pass a redirect value for use with shortcodes and other fun things.

Default value: ''


Top ↑

Return Return

(string) Permanent link to forum


Top ↑

Source Source

File: includes/forums/template.php

	function bbp_get_forum_permalink( $forum_id = 0, $redirect_to = '' ) {
		$forum_id = bbp_get_forum_id( $forum_id );

		// Use the redirect address
		if ( ! empty( $redirect_to ) ) {
			$forum_permalink = esc_url_raw( $redirect_to );

		// Use the topic permalink
		} else {
			$forum_permalink = get_permalink( $forum_id );
		}

		// Filter & return
		return apply_filters( 'bbp_get_forum_permalink', $forum_permalink, $forum_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.