[wp-trac] [WordPress Trac] #21975: Twenty Twelve: Register navigation.js before enqueue script?
WordPress Trac
wp-trac at lists.automattic.com
Sun Sep 23 16:02:03 UTC 2012
#21975: Twenty Twelve: Register navigation.js before enqueue script?
-----------------------------+---------------------------
Reporter: MattV | Type: enhancement
Status: new | Priority: normal
Milestone: Awaiting Review | Component: Bundled Theme
Version: 3.4.2 | Severity: normal
Keywords: 2nd-opinion |
-----------------------------+---------------------------
The navigation script in Twenty Twelve theme is not registered before it´s
enqueued. If a user wants to replace or remove this script in a child
theme, he/she can´t deregister it.
Would it be better to replace line 107 in functions.php:
{{{
wp_enqueue_script( 'twentytwelve-navigation', get_template_directory_uri()
. '/js/navigation.js', array(), '20120824', true );
}}}
With this?
{{{
wp_register_script( 'twentytwelve-navigation',
get_template_directory_uri() . '/js/navigation.js', array(), '20120824',
true );
wp_enqueue_script( 'twentytwelve-navigation' );
}}}
Thanks!
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21975>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list