bbp_set_404( WP_Query $query = null )
Sets the 404 status.
Description Description
Used primarily with topics/replies inside hidden forums.
Parameters Parameters
- $query
-
(Optional) The query being checked
Default value: null
Return Return
(bool) Always returns true
Source Source
File: includes/common/functions.php
function bbp_set_404( $query = null ) { // Global fallback if ( empty( $query ) ) { $query = bbp_get_wp_query(); } // Setup environment $query->set_404(); // Setup request status_header( 404 ); nocache_headers(); }
Changelog Changelog
Version | Description |
---|---|
2.6.0 | bbPress (r6583) Use status_header() & nocache_headers() |
2.0.0 | Introduced. |