I have a shortcode [tips] in which at the end I'm doing:
wp_enqueue_script( "tips", plugins_url( "/tips/js/tips.js", PATH ), array("jquery"), TIPS_VERSION, true );
wp_localize_script( "tips", "objTips", $objTips );
If there are multiple [tips] shortcodes on the same Page I'd like to pass one objTips
object with the $objTips
data from all the shortcodes from that Page.
Right now it's outputting var objTips = {...}
twice (or more), so JavaScript file tips.js only recognizes the last one. I'd like it to be something like var objTips = [{...},{...},{...},...];