From a48a695ba72bc1a85bb72e65dc202e9b5b504a68 Mon Sep 17 00:00:00 2001 From: nacin Date: Wed, 29 Feb 2012 20:46:41 +0000 Subject: [PATCH] Use correct variable; return correct value for get_screenshot() when value is uncached. see #20103. git-svn-id: http://svn.automattic.com/wordpress/trunk@20045 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-theme.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/class-wp-theme.php b/wp-includes/class-wp-theme.php index 9ea18eb6b..4df884b07 100644 --- a/wp-includes/class-wp-theme.php +++ b/wp-includes/class-wp-theme.php @@ -458,7 +458,7 @@ final class WP_Theme implements ArrayAccess { if ( ! isset( $this->headers_sanitized ) ) { $this->headers_sanitized = $this->cache_get( 'headers' ); if ( ! is_array( $this->headers_sanitized ) ) - $headers = array(); + $this->headers_sanitized = array(); } if ( isset( $this->headers_sanitized[ $header ] ) ) @@ -807,9 +807,9 @@ final class WP_Theme implements ArrayAccess { foreach ( array( 'png', 'gif', 'jpg', 'jpeg' ) as $ext ) { if ( file_exists( $this->get_stylesheet_directory() . "/screenshot.$ext" ) ) { $this->cache_add( 'screenshot', 'screenshot.' . $ext ); - if ( 'absolute' == $uri ) - return $this->get_stylesheet_directory_uri() . '/' . 'screenshot.' . $ext; - return 'screenshot.' . $ext; + if ( 'relative' == $uri ) + return 'screenshot.' . $ext; + return $this->get_stylesheet_directory_uri() . '/' . 'screenshot.' . $ext; } }