Make WordPress Core

Ticket #12343: register_default_headers.diff

File register_default_headers.diff, 485 bytes (added by jorbin, 15 years ago)

Allow child themes / plugins to add to the list of default headers and preserve the existing default headers

  • wp-includes/theme.php

     
    13571357function register_default_headers( $headers ) {
    13581358        global $_wp_default_headers;
    13591359
    1360         $_wp_default_headers = $headers;
     1360        if ( is_array($_wp_default_headers) )
     1361                $_wp_default_headers = array_merge($_wp_default_headers, $headers);
     1362        else
     1363                $_wp_default_headers = $headers;
    13611364}
    13621365
    13631366/**