Joe McGill 77dcb1771a Themes: Improve the performance of _get_block_templates_paths.
This avoids redundant recursive lookups for block template paths in the same base directory by implementing a static cache. It also replaces an potentially expensive `file_exists` call in favor of doing recursive iteration of files inside a try/catch block. 

Props thekt12, spacedmonkey, flixos90, mukesh27, joemcgill.
Fixes #58196.


git-svn-id: https://develop.svn.wordpress.org/trunk@57215 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-20 20:00:04 +00:00
..