[wp-hackers] Adding Additional Attributes in Script Tag for 3rd party JS
andrew.bartel at gmail.com
Mon Aug 26 22:11:11 UTC 2013
I asked this question on WPSE:
added a bounty if anyone's interested at taking a crack).
I encountered this trying to add the dropbox dropin chooser app to a plugin
I'm writing. Their directions are to include <script type=
"dropboxjs" data-app-key="MY_APP_KEY"></script>' in the page.
I'm curious as to what the best practice is to pass additional attributes
to script tags so that the final output includes the attributes in the tag
itself. Including them with wp_localize_script() didn't seem to get them
registered by dropbox.
What's the best way to get those included when using the
wp_enqueue_script() function? Or is there an alternate function? Properly
hooked of course.
More information about the wp-hackers