bbp_set_404

Sets the 404 status.

Description

bbp_set_404(); 

Used primarily with topics/replies inside hidden forums.


Usage

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

Defined (1)

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

/includes/common/functions.php  
  1. function bbp_set_404() { 
  2. global $wp_query; 
  3.  
  4. if ( ! isset( $wp_query ) ) { 
  5. _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.', bbpress ), '3.1' ); 
  6. return false; 
  7.  
  8. $wp_query->set_404();