Make WordPress Core

Ticket #10930: classes.patch

File classes.patch, 515 bytes (added by joostdevalk, 15 years ago)

Patch

  • wp-includes/classes.php

     
    470470                        status_header( 404 );
    471471                        nocache_headers();
    472472                } elseif ( !is_404() ) {
    473                         status_header( 200 );
     473                        if ( $wp_query->is_singular && count($wp_query->posts) == 0 ) {
     474                                $wp_query->set_404();
     475                                status_header( 404 );
     476                                nocache_headers();
     477                        } else {
     478                                status_header( 200 );   
     479                        }
    474480                }
    475481        }
    476482