Since 5.7, a notice is being generated:
WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
This is caused by line 109 of acf-restrict-color-picker.php:
wp_localize_script('acf_restrict_color_picker_js', 'acfRCPOptions', json_encode($color_palettes));
- The topic ‘PHP Notice because of wp_localize_script’ is closed to new replies.