bbp_suppress_private_forum_meta

Replace forum meta details for users that cannot view them.

Description

(string) bbp_suppress_private_forum_meta( (string) $retval, (int) $forum_id ); 

Returns (string)

Parameters (2)

0. $retval (string)
The retval.
1. $forum_id (int)
The forum id.

Usage

  1. if ( !function_exists( 'bbp_suppress_private_forum_meta' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/forums/template.php'; 
  3.  
  4. // The retval. 
  5. $retval = ''; 
  6.  
  7. // The forum id. 
  8. $forum_id = -1; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bbp_suppress_private_forum_meta($retval, $forum_id); 
  12.  

Defined (1)

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

/includes/forums/template.php  
  1. function bbp_suppress_private_forum_meta( $retval, $forum_id ) { 
  2. if ( bbp_is_forum_private( $forum_id, false ) && !current_user_can( 'read_private_forums' ) ) 
  3. $retval = '-'; 
  4.  
  5. return apply_filters( 'bbp_suppress_private_forum_meta', $retval );