[wp-trac] [WordPress Trac] #24770: Function "do_items" calls "do_item" with an unexpected parameter

WordPress Trac noreply at wordpress.org
Sun Jul 21 23:35:33 UTC 2013


#24770: Function "do_items" calls "do_item" with an unexpected parameter
---------------------------------------------------+----------------------
 Reporter:  riccardo.raneri                        |       Owner:
     Type:  defect (bug)                           |      Status:  closed
 Priority:  normal                                 |   Milestone:
Component:  General                                |     Version:  2.8
 Severity:  normal                                 |  Resolution:  invalid
 Keywords:  needs-patch 2nd-opinion needs-testing  |
---------------------------------------------------+----------------------

Comment (by azaozz):

 How exactly does this fail for you? Your example code works here. Can see
 all scripts in the HTML source.

 Some notes:
 - Don't need to enqueue `jquery-ui-core`, it is a dependency of `jquery-
 ui-datepicker` so it's enqueued automatically.
 - Can enqueue `jquery-ui-datepicker` separately or make `jquery-ui-i18n-
 it` depend on it. Then it will be handled automatically too.
 - Always a good idea to add scripts in the footer (set the last arg to
 true).
 - No need of `wp_register_style()` followed by `wp_enqueue_style()`. These
 work the same way as for scripts.

 So the example can be reduced to:
 {{{
   wp_enqueue_script( 'jquery-ui-i18n-it',
 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/i18n/jquery.ui
 .datepicker-it.min.js', array('jquery-ui-datepicker'), '1.2.3', true );
   wp_enqueue_style( 'jquery-ui',
 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-
 ui.css' );
 }}}

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24770#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list