The previous implementation of checking whether the `args` parameter is an array of arrays used `array_filter()`, which would always loop the full array, even though we are only interested in finding one (the first) non-array to display a `_doing_it_wrong()` message. This commit aims to improve readability and performance of this check by using a `foreach` loop instead, leaving it as soon as the first non-array argument is found. Follow-up to [54339]. Props TobiasBg, audrasjb, costdev, SergeyBiryukov. Fixes #56804. Built from https://develop.svn.wordpress.org/trunk@54518 git-svn-id: http://core.svn.wordpress.org/trunk@54073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
94 KiB
94 KiB