bbp_get_view_all

If current user can and is vewing all topics/replies.

Description

bbp_get_view_all( (string) $cap = 'moderate' ); 

Parameters (1)

0. $cap — Optional. (string) => 'moderate'
The cap.

Usage

  1. if ( !function_exists( 'bbp_get_view_all' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/common/functions.php'; 
  3.  
  4. // The cap. 
  5. $cap = 'moderate'; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bbp_get_view_all($cap); 
  9.  

Defined (1)

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

/includes/common/functions.php  
  1. function bbp_get_view_all( $cap = 'moderate' ) { 
  2. $retval = ( ( !empty( $_GET['view'] ) && ( 'all' === $_GET['view'] ) && current_user_can( $cap ) ) ); 
  3. return apply_filters( 'bbp_get_view_all', (bool) $retval );