diff --git a/wp-includes/class-wp-theme.php b/wp-includes/class-wp-theme.php
index 171d8b6..8a3b021 100644
|
a
|
b
|
final class WP_Theme implements ArrayAccess { |
| 984 | 984 | * being absolute paths. |
| 985 | 985 | */ |
| 986 | 986 | public function get_files( $type = null, $depth = 0, $search_parent = false ) { |
| 987 | | // get and cache all theme files to start with. |
| 988 | | $label = sanitize_key( 'files_' . $this->cache_hash . '-' . $this->get( 'Version' ) ); |
| 989 | | $transient_key = substr( $label, 0, 29 ) . md5( $label ); |
| | 987 | $all_files = (array) self::scandir( $this->get_stylesheet_directory(), null, -1 ); |
| 990 | 988 | |
| 991 | | $all_files = get_transient( $transient_key ); |
| 992 | | if ( false === $all_files ) { |
| 993 | | $all_files = (array) self::scandir( $this->get_stylesheet_directory(), null, -1 ); |
| 994 | | |
| 995 | | if ( $search_parent && $this->parent() ) { |
| 996 | | $all_files += (array) self::scandir( $this->get_template_directory(), null, -1 ); |
| 997 | | } |
| 998 | | |
| 999 | | set_transient( $transient_key, $all_files, HOUR_IN_SECONDS ); |
| | 989 | if ( $search_parent && $this->parent() ) { |
| | 990 | $all_files += (array) self::scandir( $this->get_template_directory(), null, -1 ); |
| 1000 | 991 | } |
| 1001 | 992 | |
| 1002 | 993 | // Filter $all_files by $type & $depth. |