pre_handle_404

pre_handle_404

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('pre_handle_404') is found 1 times:

  • /wp-includes/class-wp.php line 730
    726
    727
    728
    729
    730
    731
    732
    733
    734
    735
    736
    *
     * @param bool     $preempt  Whether to short-circuit default header status handling. Default false.
     * @param WP_Query $wp_query WordPress Query object.
     */
    if ( false !== apply_filters( 'pre_handle_404', false, $wp_query ) ) {
        return;
    }
     
    // If we've already issued a 404, bail.
    if ( is_404() ) {
        return;

See this hook used in plugins: