summaryrefslogtreecommitdiffstats
path: root/wp-includes/class-wp-theme.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:57:26 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:57:26 +0000
commit30883c26bdceb9eaf32c8d4a1b0c1bce223b5226 (patch)
tree39a02e2aeb21ab5b7923c6f5757d66d55b708912 /wp-includes/class-wp-theme.php
parentAdding upstream version 6.4.3+dfsg1. (diff)
downloadwordpress-30883c26bdceb9eaf32c8d4a1b0c1bce223b5226.tar.xz
wordpress-30883c26bdceb9eaf32c8d4a1b0c1bce223b5226.zip
Adding upstream version 6.5+dfsg1.upstream/6.5+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wp-includes/class-wp-theme.php')
-rw-r--r--wp-includes/class-wp-theme.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/wp-includes/class-wp-theme.php b/wp-includes/class-wp-theme.php
index 09905be..e6eeb8c 100644
--- a/wp-includes/class-wp-theme.php
+++ b/wp-includes/class-wp-theme.php
@@ -507,7 +507,7 @@ final class WP_Theme implements ArrayAccess {
}
return;
}
- // Set the parent. Pass the current instance so we can do the crazy checks above and assess errors.
+ // Set the parent. Pass the current instance so we can do the checks above and assess errors.
$this->parent = new WP_Theme( $this->template, isset( $theme_root_template ) ? $theme_root_template : $this->theme_root, $this );
}
@@ -1263,7 +1263,7 @@ final class WP_Theme implements ArrayAccess {
return false;
}
- foreach ( array( 'png', 'gif', 'jpg', 'jpeg', 'webp' ) as $ext ) {
+ foreach ( array( 'png', 'gif', 'jpg', 'jpeg', 'webp', 'avif' ) as $ext ) {
if ( file_exists( $this->get_stylesheet_directory() . "/screenshot.$ext" ) ) {
$this->cache_add( 'screenshot', 'screenshot.' . $ext );
if ( 'relative' === $uri ) {
@@ -1974,7 +1974,7 @@ final class WP_Theme implements ArrayAccess {
if ( ! $this->exists() ) {
return false;
}
- $pattern_data = wp_cache_get( 'wp_theme_patterns_' . $this->stylesheet );
+ $pattern_data = wp_cache_get( 'wp_theme_patterns_' . $this->stylesheet, 'theme_files' );
if ( is_array( $pattern_data ) && $pattern_data['version'] === $this->get( 'Version' ) ) {
return $pattern_data['patterns'];
}
@@ -1993,7 +1993,7 @@ final class WP_Theme implements ArrayAccess {
'version' => $this->get( 'Version' ),
'patterns' => $patterns,
);
- wp_cache_set( 'wp_theme_patterns_' . $this->stylesheet, $pattern_data );
+ wp_cache_set( 'wp_theme_patterns_' . $this->stylesheet, $pattern_data, 'theme_files' );
}
/**
@@ -2002,7 +2002,7 @@ final class WP_Theme implements ArrayAccess {
* @since 6.4.0
*/
public function delete_pattern_cache() {
- wp_cache_delete( 'wp_theme_patterns_' . $this->stylesheet );
+ wp_cache_delete( 'wp_theme_patterns_' . $this->stylesheet, 'theme_files' );
}
/**