Should 3rd Parties Use $wp_scripts/$wp_styles->add_data?

This function adds data to scripts/styles that have been enqueued during the WordPress load. Not really. It adds data to scripts/styles that’ve been registered. The data key that is set by wp_localize_script is ultimately overwritten by the call to $wp_scripts->add_data, whereas if you call wp_localize_script twice for the same script, the string will be properly … Read more