bbp_get_topic_tag_names( int $topic_id, string $sep = ', ' )

Get topic tags for a specific topic ID


Description Description


Parameters Parameters

$topic_id

(Required)

$sep

(Optional)

Default value: ', '


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/topics/functions.php

function bbp_get_topic_tag_names( $topic_id = 0, $sep = ', ' ) {
	$topic_tags = bbp_get_topic_tags( $topic_id );
	$pluck      = wp_list_pluck( $topic_tags, 'name' );
	$terms      = ! empty( $pluck )
		? implode( $sep, $pluck )
		: '';

	// Filter & return
	return apply_filters( 'bbp_get_topic_tag_names', $terms, $topic_id, $sep );
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.