Make WordPress Core

Opened 4 years ago

#50040 new defect (bug)

Localize the jQuery datepicker when enqueued in the footer

Reported by: jadpm's profile jadpm Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: I18N Keywords:
Focuses: Cc:

Description

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.

Change History (0)

Note: See TracTickets for help on using tickets.