Opened 2 years ago
Last modified 2 years ago
#5687 new defect (bug)
WP.org Base Theme: Register navigation JS for use in child themes
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | WordPress.org Site | Keywords: | |
Cc: |
Description (last modified by )
As of r6068, the navigation.js file has been commented out of the wporg
parent theme, which means the child themes need to re-enqueue it from scratch (and if it's changed, the versions need to be bumped across all instances).
Instead, we could use wp_register_script
in the parent theme to set up the file & information, and let child themes opt in to using it with wp_enqueue_script( 'wporg-navigation' )
.
Example of a child theme re-enqueuing the file: https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/functions.php#L121
Attachments (1)
Note: See
TracTickets for help on using
tickets.