mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-10 18:37:58 +01:00
Call get_(template|stylesheet)_directory_uri() only once in process_default_headers. props mitchoyoshitaka, fixes #17353.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6c81d023bb
commit
ba9ae611eb
@ -241,9 +241,11 @@ class Custom_Image_Header {
|
||||
return;
|
||||
|
||||
$this->default_headers = $_wp_default_headers;
|
||||
$template_directory_uri = get_template_directory_uri();
|
||||
$stylesheet_directory_uri = get_stylesheet_directory_uri();
|
||||
foreach ( array_keys($this->default_headers) as $header ) {
|
||||
$this->default_headers[$header]['url'] = sprintf( $this->default_headers[$header]['url'], get_template_directory_uri(), get_stylesheet_directory_uri() );
|
||||
$this->default_headers[$header]['thumbnail_url'] = sprintf( $this->default_headers[$header]['thumbnail_url'], get_template_directory_uri(), get_stylesheet_directory_uri() );
|
||||
$this->default_headers[$header]['url'] = sprintf( $this->default_headers[$header]['url'], $template_directory_uri, $stylesheet_directory_uri );
|
||||
$this->default_headers[$header]['thumbnail_url'] = sprintf( $this->default_headers[$header]['thumbnail_url'], $template_directory_uri, $stylesheet_directory_uri );
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user