WordPress.org

Make WordPress Core

Changeset 20132


Ignore:
Timestamp:
03/07/12 00:24:23 (2 years ago)
Author:
nacin
Message:

Fetch the raw 'Template' header in the WP_Theme constructor. By passing sanitization routines (which are unnecessary for this header), we prevent a persistent themes cache from sanitizing the headers of every theme until/unless they actually need a real header like Name. Note that if WP_Theme was instantiated through get_themes(), this will have no effect, as get_themes() does ask for Name for the keys to return. see #20103.

File:
1 edited

Legend:

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

    r20126 r20132  
    200200 
    201201        // (If template is set from cache, we know it's good.) 
    202         if ( ! $this->template && ! ( $this->template = $this->get('Template') ) ) { 
     202        if ( ! $this->template && ! ( $this->template = $this->headers['Template'] ) ) { 
    203203            if ( file_exists( $this->theme_root . '/' . $this->stylesheet . '/index.php' ) ) { 
    204204                $this->template = $this->stylesheet; 
Note: See TracChangeset for help on using the changeset viewer.