Ticket #42573: 42573.patch
File 42573.patch, 999 bytes (added by , 7 years ago) |
---|
-
src/wp-includes/class-wp-theme.php
988 988 $label = sanitize_key( 'files_' . $this->cache_hash . '-' . $this->get( 'Version' ) ); 989 989 $transient_key = substr( $label, 0, 29 ) . md5( $label ); 990 990 991 $all_files = get_transient( $transient_key ); 991 $all_files = false; 992 993 if( ! WP_DEBUG ) { 994 $all_files = get_transient( $transient_key ); 995 } 996 992 997 if ( false === $all_files ) { 993 998 $all_files = (array) self::scandir( $this->get_stylesheet_directory(), null, -1 ); 994 999 … … 996 1001 $all_files += (array) self::scandir( $this->get_template_directory(), null, -1 ); 997 1002 } 998 1003 999 set_transient( $transient_key, $all_files, HOUR_IN_SECONDS ); 1004 if( ! WP_DEBUG ) { 1005 set_transient( $transient_key, $all_files, HOUR_IN_SECONDS ); 1006 } 1000 1007 } 1001 1008 1002 1009 // Filter $all_files by $type & $depth.