bbp_is_topic_anonymous( int $topic_id )
Is the posted by an anonymous user?
Description Description
Parameters Parameters
- $topic_id
-
(Optional) Topic id
Return Return
(bool) True if the post is by an anonymous user, false if not.
Source Source
File: includes/topics/template.php
function bbp_is_topic_anonymous( $topic_id = 0 ) { $topic_id = bbp_get_topic_id( $topic_id ); $retval = false; if ( ! bbp_get_topic_author_id( $topic_id ) ) { $retval = true; } elseif ( get_post_meta( $topic_id, '_bbp_anonymous_name', true ) ) { $retval = true; } elseif ( get_post_meta( $topic_id, '_bbp_anonymous_email', true ) ) { $retval = true; } // Filter & return return (bool) apply_filters( 'bbp_is_topic_anonymous', $retval, $topic_id ); }
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |