Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Performance: reuse block metadata in `WP_Theme_JSON::get_valid_block_…
…style_variations()` In `WP_Theme_JSON::get_valid_block_style_variations()`, the method was calling `self::get_blocks_metadata()` even though the metadata was already retrieved in the parent function. This update reuses the existing block metadata instead of calling it again. A new optional parameter, `$blocks_metadata`, has been added to the function, allowing it to use pre-fetched metadata when available, improving efficiency. Fewer `self::get_blocks_metadata()` calls mean faster processing, especially in themes with many blocks. Props mukesh27, ramonopoly, aaronrobertshaw, flixos90. Fixes #62291. git-svn-id: https://develop.svn.wordpress.org/trunk@59359 602fd350-edb4-49c9-b593-d223f7449a82
- Loading branch information