[wp-trac] [WordPress Trac] #47342: Get version of WordPress's jQuery

WordPress Trac noreply at wordpress.org
Wed May 22 12:28:54 UTC 2019


#47342: Get version of WordPress's jQuery
---------------------------+------------------------------
 Reporter:  mizzinc        |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Script Loader  |     Version:  5.2.1
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:
---------------------------+------------------------------
Changes (by SergeyBiryukov):

 * component:  General => Script Loader


Old description:

> When accessing:
>
> $ver = $GLOBALS['wp_scripts']->registered['jquery']->ver;
>
> Instead of returning just a number it now adds '-wp'.
>
> Which then of course is causing a 404 when attempting to register the
> script 'https://ajax.googleapis.com/ajax/libs/jquery/' . $ver .
> '/jquery.min.js'

New description:

 When accessing:
 {{{
 $ver = $GLOBALS['wp_scripts']->registered['jquery']->ver;
 }}}
 Instead of returning just a number it now adds '-wp'.

 Which then of course is causing a 404 when attempting to register the
 script 'https://ajax.googleapis.com/ajax/libs/jquery/' . $ver .
 '/jquery.min.js'

--

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47342#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list