mirror of
git://develop.git.wordpress.org/
synced 2025-02-28 02:22:25 +01:00
Use correct variable; return correct value for get_screenshot() when value is uncached. see #20103.
git-svn-id: https://develop.svn.wordpress.org/trunk@20045 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f6299042c0
commit
5bab3555d7
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user