bbp_is_reply_public( int $reply_id )

Is the reply publicly viewable?


Description Description

See bbp_get_public_reply_statuses() for public statuses.


Parameters Parameters

$reply_id

(Optional) Reply id


Top ↑

Return Return

(bool) True if public, false if not.


Top ↑

Source Source

File: includes/replies/template.php

function bbp_is_reply_public( $reply_id = 0 ) {
	$reply_id  = bbp_get_reply_id( $reply_id );
	$status    = bbp_get_reply_status( $reply_id );
	$public    = bbp_get_public_reply_statuses();
	$is_public = in_array( $status, $public, true );

	// Filter & return
	return (bool) apply_filters( 'bbp_is_reply_public', $is_public, $reply_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.