On this page
apply_filters( 'pre_handle_404', bool $preempt, WP_Query $wp_query )
Filters whether to short-circuit default header status handling.
Description
Returning a non-false value from the filter will short-circuit the handling and return early.
Parameters
$preemptbool-
Whether to short-circuit default header status handling. Default false.
$wp_queryWP_Query-
WordPress Query object.
Source
File: wp-includes/class-wp.php. View all references
if ( false !== apply_filters( 'pre_handle_404', false, $wp_query ) ) {
Related
Used By
| Used By | Description |
|---|---|
| WP::handle_404() wp-includes/class-wp.php | Set the Headers for 404, if nothing is found for requested URL. |
Changelog
| Version | Description |
|---|---|
| 4.5.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/pre_handle_404