apply_filters( 'pre_handle_404', bool $preempt, WP_Query $wp_query )
- Since
- 4.5.0
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.
Fired at · 1
wp-includes/class-wp.php:735WP::handle_404()
Source
View on Trac ↗View on GitHub ↗
729 *730 * @since 4.5.0731 *732 * @param bool $preempt Whether to short-circuit default header status handling. Default false.733 * @param WP_Query $wp_query WordPress Query object.734 */735 if ( false !== apply_filters( 'pre_handle_404', false, $wp_query ) ) {736 return;737 }738 739 740 if ( is_404() ) {741 return;
History
Introduced in 4.5.0. Unchanged from 6.7.7 through 7.1.0.
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.8.8 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.