bbp_is_reply_anonymous

Is the reply by an anonymous user?.

Description

bbp_is_reply_anonymous( (int) $reply_id = 0 ); 

Parameters (1)

0. $reply_id — Optional. (int)
Reply id

Usage

  1. if ( !function_exists( 'bbp_is_reply_anonymous' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/replies/template.php'; 
  3.  
  4. // Optional. Reply id 
  5. $reply_id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bbp_is_reply_anonymous($reply_id); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/replies/template.php  
  1. function bbp_is_reply_anonymous( $reply_id = 0 ) { 
  2. $reply_id = bbp_get_reply_id( $reply_id ); 
  3. $retval = false; 
  4.  
  5. if ( !bbp_get_reply_author_id( $reply_id ) ) 
  6. $retval = true; 
  7.  
  8. elseif ( get_post_meta( $reply_id, '_bbp_anonymous_name', true ) ) 
  9. $retval = true; 
  10.  
  11. elseif ( get_post_meta( $reply_id, '_bbp_anonymous_email', true ) ) 
  12. $retval = true; 
  13.  
  14. return (bool) apply_filters( 'bbp_is_reply_anonymous', $retval, $reply_id );