bbp_is_reply_anonymous( int $reply_id )

Is the reply by an anonymous user?

Description

Parameters

$reply_id

(Optional) Reply id

Return

(bool) True if the post is by an anonymous user, false if not.

Source

File: bp-forums/replies/template.php

function bbp_is_reply_anonymous( $reply_id = 0 ) {
	$reply_id = bbp_get_reply_id( $reply_id );
	$retval   = false;

	if ( !bbp_get_reply_author_id( $reply_id ) )
		$retval = true;

	elseif ( get_post_meta( $reply_id, '_bbp_anonymous_name', true ) )
		$retval = true;

	elseif ( get_post_meta( $reply_id, '_bbp_anonymous_email', true ) )
		$retval = true;

	return (bool) apply_filters( 'bbp_is_reply_anonymous', $retval, $reply_id );
}

Changelog

Changelog
Version Description
bbPress (r2753) Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.