mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-25 21:54:28 +00:00
Register all core blocks in a new function called `register_core_block_style_handles`. This mirrors the function `wp_default_styles` where all core styles are registered in one place. This improves block registration performance, as it avoids expensive file lookups, like realpath in `register_block_style_handle`. The new function `register_core_block_style_handles` uses `glob` to get all css files in the blocks directory. This glob is cached in a transient to save lookups on subsequent requests. The function `register_block_style_handle` now checks to see if the style handle is already registered before trying to register it again. Props mukesh27, westonruter, flixos90, joemcgill, spacedmonkey. Fixes #58528. git-svn-id: https://develop.svn.wordpress.org/trunk@56044 602fd350-edb4-49c9-b593-d223f7449a82