WordPress.org

Making WordPress.org

Opened 6 weeks ago

Last modified 6 weeks ago

#5687 new defect

WP.org Base Theme: Register navigation JS for use in child themes

Reported by: ryelle Owned by:
Milestone: Priority: normal
Component: WordPress.org Site Keywords:
Cc:

Description (last modified by ryelle)

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)

5687.diff (1.6 KB) - added by ryelle 6 weeks ago.

Download all attachments as: .zip

Change History (2)

@ryelle
6 weeks ago

#1 @ryelle
6 weeks ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.