Editor: Optimize wp_get_block_css_selector to remove array_merge calls for better performance.

Some block themes like TT3 use `wp_get_block_css_selector` to determine a CSS selector based on block type and other parameters.  However, recent performance profiling indicated a bottleneck in `wp_get_block_css_selector`, particularly sections that utilize `array_merge`.  By slightly refactoring these sections, `array_merge` calls can be avoided which increases performance.

Props mukesh27, joemcgill, daxelrod, tabrisrp.
Fixes #59178.
Built from https://develop.svn.wordpress.org/trunk@56457


git-svn-id: http://core.svn.wordpress.org/trunk@55969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
davidbaumwald
2023-08-24 19:59:17 +00:00
parent 099ec7eec8
commit 8bd5d74be2
2 changed files with 3 additions and 3 deletions

View File

@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.4-alpha-56456';
$wp_version = '6.4-alpha-56457';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.