[wp-trac] [WordPress Trac] #50040: Localize the jQuery datepicker when enqueued in the footer

WordPress Trac noreply at wordpress.org
Thu Apr 30 13:46:24 UTC 2020


#50040: Localize the jQuery datepicker when enqueued in the footer
--------------------------+-----------------------------
 Reporter:  jadpm         |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  I18N          |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Since #29420 the jQuery datepicker script is getting localized every time
 it is enqueued. However, this only happens when it gets enqueued in the
 frontend header and in the admin header.

 Plugins and themes that require and enqueue the datepicker script in the
 footer do not get the localization loaded. Given that scripts can be
 enqueued on demand only when the page content requires them this is a
 penalty for proper resources management.

 A simple patch and solution would be to extend the new actions added in
 the #29420 changeset:
 https://core.trac.wordpress.org/changeset/37908
 so they get firec also on `wp_print_footer_scripts:9` and
 `admin_print_footer_scripts:9`.

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


More information about the wp-trac mailing list