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:738WP::handle_404()
Source
View on Trac ↗View on GitHub ↗
732 *733 * @since 4.5.0734 *735 * @param bool $preempt Whether to short-circuit default header status handling. Default false.736 * @param WP_Query $wp_query WordPress Query object.737 */738 if ( false !== apply_filters( 'pre_handle_404', false, $wp_query ) ) {739 return;740 }741 742 743 if ( is_404() ) {744 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.9.7 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.