mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-06 17:29:05 +00: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