Felix Arntz 23a646a25a Editor: Improve performance of WP_Theme_JSON class by reducing usage of expensive array functions.
In many scenarios array functions are more expensive than using simpler `for` or `foreach` loops.

This changeset results in roughly 4% faster `wp_head` execution time for both block themes and classic themes. While this may seem like a small win, it is a worthwhile enhancement and only one part of several other little performance tweaks which are being worked on to improve performance of `theme.json` parsing further.

Props aristath, desrosj, jrf, spacedmonkey.
Fixes #56974.
See #57067.


git-svn-id: https://develop.svn.wordpress.org/trunk@54804 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-11 01:48:05 +00:00
..