bbp_is_reply_published( int $reply_id )
Is the reply not spam or deleted?
Description Description
Parameters Parameters
- $reply_id
-
(Optional) Topic id
Return Return
(bool) True if published, false if not.
Source Source
File: includes/replies/template.php
function bbp_is_reply_published( $reply_id = 0 ) { $reply_id = bbp_get_reply_id( $reply_id ); $topic_id = bbp_get_reply_topic_id( $reply_id ); $status = bbp_get_public_status_id(); $topic_status = bbp_is_topic_published( $topic_id ); $reply_status = ( bbp_get_reply_status( $reply_id ) === $status ); $retval = ( $reply_status && $topic_status ); // Filter & return return (bool) apply_filters( 'bbp_is_reply_published', (bool) $retval, $reply_id ); }
Changelog Changelog
Version | Description |
---|---|
2.6.0 | bbPress (r6922) Returns false if topic is also not published |
2.0.0 | Introduced. |