[wp-trac] [WordPress Trac] #16699: wp_enqueue_script prints current WordPress version not script version

WordPress Trac wp-trac at lists.automattic.com
Mon Feb 28 13:52:57 UTC 2011


#16699: wp_enqueue_script prints current WordPress version not script version
--------------------------+-----------------------------
 Reporter:  rfair404      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  minor         |   Keywords:
--------------------------+-----------------------------
 When using wp_enqueue_script and wp_register_script the resulting html
 output in the header looks like this.

 {{{
 <script type="text/javascript" src="http://192.168.1.133/wp-
 content/themes/pnap/lib/flash/player-
 files/jwplayer.js?ver=3.2-bleeding"></script>
 }}}
 Notice that the version is 3.2-bleeding which is the the script version,
 but the wordpress version.

 here is the register and enqueue scripts...


 {{{
 add_action('init', 'pnap_flash_register_swfobject');
 function pnap_flash_register_swfobject() {
 wp_register_script('jwplayer', PNAP_FLA_URL.'/player-files/jwplayer.js');
 }
 add_action('wp_print_scripts', 'pnap_flash_enqueue_swfobject');
 function pnap_flash_enqueue_swfobject() {
 wp_enqueue_script('jwplayer');
 }
 }}}


 The good news is that this does not seem to cause any problems at the time
 being.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16699>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list