WordPress.org

Make WordPress Core

Ticket #14348: 14348.diff

File 14348.diff, 464 bytes (added by mitchoyoshitaka, 5 years ago)

patch (version 2), added exit_on_http_head boolean filter

  • wp-includes/classes.php

     
    376376                foreach( (array) $headers as $name => $field_value ) 
    377377                        @header("{$name}: {$field_value}"); 
    378378 
     379                if ( $_SERVER['REQUEST_METHOD'] == 'HEAD' && apply_filters( 'exit_on_http_head', true ) ) 
     380                        $exit_required = true; 
     381 
    379382                if ($exit_required) 
    380383                        exit(); 
    381384