Make WordPress Core

Changeset 36629

Timestamp:
02/23/2016 04:07:39 PM (8 years ago)
Author:
ocean90
Message:

In WP::handle_404() introduce a filter pre_handle_404 to short-circuit default header status handling.

This comes handy if you use WordPress without posts, means $wp_query contains no results.

Props prettyboymp, hakre, prettyboymp, Denis-de-Bernardy, ethitter, ocean90.
Fixes #10722.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp.php

    r36525 r36629  
    630630        global $wp_query;
    631631
     632
     633
     634
     635
     636
     637
     638
     639
     640
     641
     642
     643
     644
     645
     646
    632647        // If we've already issued a 404, bail.
    633648        if ( is_404() )
Note: See TracChangeset for help on using the changeset viewer.