bbp_get_topic_lock_description( int $topic_id )

Return the topic lock description


Description Description


Parameters Parameters

$topic_id

(Optional) Topic id


Top ↑

Source Source

File: includes/topics/template.php

	function bbp_get_topic_lock_description( $topic_id = 0 ) {

		// Check if topic is edit locked
		$topic_id = bbp_get_topic_id( $topic_id );
		$user_id  = bbp_check_post_lock( $topic_id );
		$person   = empty( $user_id )
			? esc_html__( 'Nobody', 'bbpress' )
			: bbp_get_user_profile_link( $user_id );

		// Get the text
		$text = sprintf( esc_html__( '%1$s is currently editing this topic.', 'bbpress' ), $person );

		// Filter & return
		return apply_filters( 'bbp_get_topic_lock_description', $text, $user_id, $topic_id );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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