WordPress.org

Make WordPress Core

Changeset 18505


Ignore:
Timestamp:
08/04/11 12:40:15 (3 years ago)
Author:
nacin
Message:

Call get_(template|stylesheet)_directory_uri() only once in process_default_headers. props mitchoyoshitaka, fixes #17353.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/custom-header.php

    r18346 r18505  
    242242 
    243243        $this->default_headers = $_wp_default_headers; 
     244        $template_directory_uri = get_template_directory_uri(); 
     245        $stylesheet_directory_uri = get_stylesheet_directory_uri(); 
    244246        foreach ( array_keys($this->default_headers) as $header ) { 
    245             $this->default_headers[$header]['url'] =  sprintf( $this->default_headers[$header]['url'], get_template_directory_uri(), get_stylesheet_directory_uri() ); 
    246             $this->default_headers[$header]['thumbnail_url'] =  sprintf( $this->default_headers[$header]['thumbnail_url'], get_template_directory_uri(), get_stylesheet_directory_uri() ); 
     247            $this->default_headers[$header]['url'] =  sprintf( $this->default_headers[$header]['url'], $template_directory_uri, $stylesheet_directory_uri ); 
     248            $this->default_headers[$header]['thumbnail_url'] =  sprintf( $this->default_headers[$header]['thumbnail_url'], $template_directory_uri, $stylesheet_directory_uri ); 
    247249        } 
    248250 
Note: See TracChangeset for help on using the changeset viewer.