mirror of
git://develop.git.wordpress.org/
synced 2025-04-10 15:13:49 +02:00
Prevent `wp_localize_script()` (via `WP_Scripts::localize()`) throwing warnings in PHP 8 when the translation data is passed as a string. This maintains backward compatibility with earlier versions of PHP. Introduce a `_doing_it_wrong()` notice to `WP_Scripts::localize()` if the translation data is not passed as an array. Props jrf, peterwilsoncc, SergeyBiryukov. Fixes #52534. git-svn-id: https://develop.svn.wordpress.org/trunk@50408 602fd350-edb4-49c9-b593-d223f7449a82