Changeset 57215 for trunk/src/wp-includes/block-template-utils.php
- Timestamp:
- 12/20/2023 08:00:04 PM (2 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/block-template-utils.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-template-utils.php
r57118 r57215 225 225 */ 226 226 function _get_block_templates_paths( $base_directory ) { 227 static $template_path_list = array(); 228 if ( isset( $template_path_list[ $base_directory ] ) ) { 229 return $template_path_list[ $base_directory ]; 230 } 227 231 $path_list = array(); 228 if ( file_exists( $base_directory ) ){232 try { 229 233 $nested_files = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( $base_directory ) ); 230 234 $nested_html_files = new RegexIterator( $nested_files, '/^.+\.html$/i', RecursiveRegexIterator::GET_MATCH ); … … 232 236 $path_list[] = $path; 233 237 } 234 } 238 } catch ( Exception $e ) { 239 // Do nothing. 240 } 241 $template_path_list[ $base_directory ] = $path_list; 235 242 return $path_list; 236 243 }
Note: See TracChangeset
for help on using the changeset viewer.