[wp-trac] [WordPress Trac] #29261: Enqueue script in Widget

WordPress Trac noreply at wordpress.org
Tue Aug 19 07:46:12 UTC 2014


#29261: Enqueue script in Widget
--------------------------+-----------------------------
 Reporter:  zishanj       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Widgets       |    Version:  3.9.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 I am trying to use wp_enqueue_script inside function widget of the Widget
 class. But it seems like when I print html it doesn't use the javascript
 functions which I enqueue before. This enqueue script works well if I use
 for shortcode inside shortcode and later print html. Is this a bug or
 there is any workaround for using enqueue inside widget function that will
 properly handle my html also?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29261>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list