[wp-hackers] Adding Additional Attributes in Script Tag for 3rd party JS
andrew.bartel at gmail.com
Mon Aug 26 23:38:56 UTC 2013
Thanks for the quick response and thorough explanation Otto.
On Mon, Aug 26, 2013 at 3:36 PM, Otto <otto at ottodestruct.com> wrote:
> On Mon, Aug 26, 2013 at 5:11 PM, Andrew Bartel <andrew.bartel at gmail.com>
> > What's the best way to get those included when using the
> > wp_enqueue_script() function?
> There is no way to do this short of overriding the WP_Scripts class
> entirely to allow for extra attributes.
> Even then, it's not possible to override WP_Scripts properly because
> it's explicitly declared as a new class without a check or override in
> a few admin places (load-scripts, customize, etc).
> So basically, print it out yourself in the relevant *_head or
> *_print_scripts action. No good way to enqueue it.
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers