When loading a page on the frontend using Xdebug & Webgrind, with the Twenty Twenty-Three theme and no plugins activated, the biggest performance bottleneck currently (on the PHP side) is `WP_Theme_JSON::merge()`. Analysing the data a bit more, it became evident that `WP_Theme_JSON::get_default_slugs()` is the part of that method which takes most of the resources and time. Further analysis of the method revealed that `array_map()` was the call that slowed it down. This commit replaces the `array_map()` call with a simple `foreach` loop, improving page load speed significantly. Follow-up to [52275], [52364]. Props aristath. Fixes #56745. Built from https://develop.svn.wordpress.org/trunk@54398 git-svn-id: http://core.svn.wordpress.org/trunk@53957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
101 KiB
101 KiB