Title: Reminder: Many Javascript Libraries Are Included in Core
Author: Ipstenu (Mika Epstein)
Published: February 17, 2016
Last modified: February 16, 2016

---

 [  ](https://profiles.wordpress.org/ipstenu/) [Ipstenu (Mika Epstein)](https://profiles.wordpress.org/ipstenu/)
12:44 pm _on_ February 17, 2016     
Tags: [libraries ( 2 )](https://make.wordpress.org/plugins/tag/libraries/),
[reminder ( 30 )](https://make.wordpress.org/plugins/tag/reminder/)   

# Reminder: Many Javascript Libraries Are Included in Core

WordPress includes jQuery with coreCore Core is the set of software required to 
run WordPress. The Core Development Team builds WordPress.. Most everyone knows 
this. But did you also know WordPress includes a great deal of other libraries for
your use.

You should take the time to check [the documentation on wp_enqueue_script()](https://developer.wordpress.org/reference/functions/wp_enqueue_script/).

But that list actually isn’t complete! For a complete list of registered files inspect`
$GLOBALS[‘wp_scripts’]` in the admin UIUI UI is an acronym for User Interface - 
the layout of the page the user interacts with. Think ‘how are they doing that’ 
and less about what they are doing.. Registered scripts might change per requested
page. You can also check out the massive amounts of files in wp-includes to see 
even more.

My point, though, is that 90% of the time, you don’t need ‘your own’ version of 
something. We have it.

Even datepicker folks (`jquery-ui-datepicker`).

Check if core works. If you call it right, most of the time it will.

[#libraries](https://make.wordpress.org/plugins/tag/libraries/), [#reminder](https://make.wordpress.org/plugins/tag/reminder/)

### Share this:

 * [  Threads ](https://make.wordpress.org/plugins/2016/02/17/reminder-javascript-libraries/?share=threads)
 * [  Mastodon ](https://make.wordpress.org/plugins/2016/02/17/reminder-javascript-libraries/?share=mastodon)
 * [  Bluesky ](https://make.wordpress.org/plugins/2016/02/17/reminder-javascript-libraries/?share=bluesky)
 * [  X ](https://make.wordpress.org/plugins/2016/02/17/reminder-javascript-libraries/?share=x)
 * [  Facebook ](https://make.wordpress.org/plugins/2016/02/17/reminder-javascript-libraries/?share=facebook)
 * [  LinkedIn ](https://make.wordpress.org/plugins/2016/02/17/reminder-javascript-libraries/?share=linkedin)

 1.  ![](https://secure.gravatar.com/avatar/024316af8fa284f9ca54dbb695a52e27ebf9f848a5bbf8b590446c642641b258?
     s=32&d=mm&r=g)
 2.   [Arnan de Gans](https://profiles.wordpress.org/adegans/)  12:48 pm _on_ February
     17, 2016
 3.  And stop f*cking using googleapi hosted scripts if it’s included in WordPress 
     already… Geez.
 4.  [@WordPress](https://profiles.wordpress.org/WordPress/) devs – You should include/
     optionalize to include (similar to language packs) a bunch of common fonts too
     so we can stop using the ridiculous google fonts, too 🙂 That would be a major
     yay!
      Perhaps a scrape function to pull files from remote to local or whatever.
 5.  ![](https://secure.gravatar.com/avatar/81eca39d669a1a7e80934482324451aebd4794adf6b438617cd5bd4f9162eaf4?
     s=32&d=mm&r=g)
 6.   [Jacob N. Breetvelt](https://profiles.wordpress.org/opajaap/)  12:50 pm _on_ 
     February 17, 2016
 7.  I, as pluginPlugin A plugin is a piece of software containing a group of functions
     that can be added to a WordPress website. They can extend functionality or add
     new features to your WordPress websites. WordPress plugins are written in the 
     PHP programming language and integrate seamlessly with WordPress. These can be
     free in the WordPress.org Plugin Directory [https://wordpress.org/plugins/](https://wordpress.org/plugins/)
     or can be cost-based plugin from a third-party. developer, very much agree with
     this. Especially google api jquery libraries don’t work ( at all ).
 8.  ![](https://secure.gravatar.com/avatar/af6cb02f92815fa3d3c86aa63a507360b5130a075f13666748575e63b34edfe1?
     s=32&d=mm&r=g)
 9.   [Marcus](https://profiles.wordpress.org/netweblogic/)  1:37 pm _on_ February 
     17, 2016
 10. moreover, it makes your life easier using the scripts shipped with WP since you
     don’t need to worry about keeping those updated
 11. ![](https://secure.gravatar.com/avatar/234c638526c874a3d88307b12a5f903af8c800f2a24708d4da38f9c5387c54f7?
     s=32&d=mm&r=g)
 12.  [jeffmcneill](https://profiles.wordpress.org/jeffmcneill/)  2:31 pm _on_ February
     17, 2016
 13. What (if any) javascripts are loaded by default? If it is zero then all the loading
     is done by themes and plugins? Trying to get a plain vanilla theme that isn’t 
     chock-a-blockBlock Block is the abstract term used to describe units of markup
     that, composed together, form the content or layout of a webpage using the WordPress
     editor. The idea combines concepts of what in the past may have achieved with 
     shortcodes, custom HTML, and embed discovery into a single consistent API and 
     user experience. with js is very difficult!
 14.  * ![](https://secure.gravatar.com/avatar/27180c82524020e7339e2b30818b6d8ab004c54f730f12b1434b1e365be0e175?
        s=32&d=mm&r=g)
      *  [Ipstenu (Mika Epstein)](https://profiles.wordpress.org/ipstenu/)  5:25 pm
        _on_ February 17, 2016
      * You’ll have to check the individual pages. On a naked WP site with a default
        theme, I have jquery, jquery-coreCore Core is the set of software required 
        to run WordPress. The Core Development Team builds WordPress., and jquery-migrate
      * But. That’s where the beauty of the enqueues and their dependancies array comes
        in! If you say “I need jquery” then WP knows to only call it once 🙂 So you
        can enqueue your script, say it needs jquery core, and boom! Everyone wins.
 15. ![](https://secure.gravatar.com/avatar/ba026393708dd6ff553a40a9673dee6654c66067aaecae432ee95ddf9dcbf184?
     s=32&d=mm&r=g)
 16.  [Paul Menard](https://profiles.wordpress.org/pmenard/)  3:12 pm _on_ February
     17, 2016
 17. Speaking of the date picker and the jQuery UIUI UI is an acronym for User Interface-
     the layout of the page the user interacts with. Think ‘how are they doing that’
     and less about what they are doing. suite. When will coreCore Core is the set 
     of software required to run WordPress. The Core Development Team builds WordPress.
     include some default styling/theming for jQuery UI functionality for use within
     the Dashboard? At least for some standardized items like the date picker, accordions,
     etc. Not asking for the front-end.
 18.  * ![](https://secure.gravatar.com/avatar/5783a2d9b93f04f6d0a1ddabddcfd71f15136d7eaea7a87f9962d3f93f780224?
        s=32&d=mm&r=g)
      *  [Ian Dunn](https://profiles.wordpress.org/iandunn/)  4:07 pm _on_ February
        17, 2016
      * The ticket for including jQuery UIUI UI is an acronym for User Interface - 
        the layout of the page the user interacts with. Think ‘how are they doing that’
        and less about what they are doing. CSSCSS CSS is an acronym for cascading 
        style sheets. This is what controls the design or look and feel of a site. 
        in CoreCore Core is the set of software required to run WordPress. The Core
        Development Team builds WordPress. is [https://core.trac.wordpress.org/ticket/18909](https://core.trac.wordpress.org/ticket/18909)
      * In the meantime, there are some nice MP6 datepicker skins at [https://github.com/x-team/wp-jquery-ui-datepicker-skins](https://github.com/x-team/wp-jquery-ui-datepicker-skins)
         - ![](https://secure.gravatar.com/avatar/7494440b8266712d0056e4d6168491f9db747ab7588cd74f3057473b3201d559?
           s=32&d=mm&r=g)
         -  [Scott Kingsley Clark](https://profiles.wordpress.org/sc0ttkclark/)  6:
           05 pm _on_ February 26, 2016
         - That ticket moving forward would make me soooo happy!
 19. ![](https://secure.gravatar.com/avatar/763d6dcc1f54568cd88e00169f373ce26f7e022e67d1a25484bae726dd273c54?
     s=32&d=mm&r=g)
 20.  [IntellyWP](https://profiles.wordpress.org/intellywp/)  4:05 pm _on_ February
     17, 2016
 21. And also… please load your library only when you are seeing your pluginPlugin 
     A plugin is a piece of software containing a group of functions that can be added
     to a WordPress website. They can extend functionality or add new features to your
     WordPress websites. WordPress plugins are written in the PHP programming language
     and integrate seamlessly with WordPress. These can be free in the WordPress.org
     Plugin Directory [https://wordpress.org/plugins/](https://wordpress.org/plugins/)
     or can be cost-based plugin from a third-party. pages and not always!
      And also…
     please display your notice only inside your plugin pages!
 22. For this reason, we introduced in our latest plugin, at the beginning, some code
     check to remove other unnecessary plugins javascriptJavaScript JavaScript or JS
     is an object-oriented computer programming language commonly used to create interactive
     effects within web browsers. WordPress makes extensive use of JS for a better 
     user experience. While PHP is executed on the server, JS executes within a user’s
     browser.
      [https://www.javascript.com](https://www.javascript.com/) library or
     css or displayed notice 🙁
 23.  * ![](https://secure.gravatar.com/avatar/1ed94af4a73102f21ffd49acfcc51e4034d54c8fec244054b393ab0b4554f587?
        s=32&d=mm&r=g)
      *  [Joachim Jensen - Intox Studio](https://profiles.wordpress.org/intoxstudio/)
        11:00 pm _on_ February 17, 2016
      * I agree with loading scripts only when needed.
         I cannot believe that this 
        is not standard practice by all developers, but everytime I see it (and I mostly
        see it because of code conflicts) I try to contact the developer. I’d say the
        response rate is about 50%.
      * Also, please register scripts by the actual library name. In the example from
        [@ipstenu](https://profiles.wordpress.org/ipstenu/), use “jquery-ui-datepicker”,
        _not_ “mytheme-cool-datepicker”.
         - ![](https://secure.gravatar.com/avatar/27180c82524020e7339e2b30818b6d8ab004c54f730f12b1434b1e365be0e175?
           s=32&d=mm&r=g)
         -  [Ipstenu (Mika Epstein)](https://profiles.wordpress.org/ipstenu/)  11:01
           pm _on_ February 17, 2016
         - FWIW: We don’t enforce it with developers since about half the time it would
           require a lot of deep diving into how a pluginPlugin A plugin is a piece
           of software containing a group of functions that can be added to a WordPress
           website. They can extend functionality or add new features to your WordPress
           websites. WordPress plugins are written in the PHP programming language 
           and integrate seamlessly with WordPress. These can be free in the WordPress.
           org Plugin Directory [https://wordpress.org/plugins/](https://wordpress.org/plugins/)
           or can be cost-based plugin from a third-party. is made and why. I personally
           recommend only loading what has to be loaded when it must be loaded, but
           then again I’m also pretty snarky about not including demo folders in plugins.
            * ![](https://secure.gravatar.com/avatar/1ed94af4a73102f21ffd49acfcc51e4034d54c8fec244054b393ab0b4554f587?
              s=32&d=mm&r=g)
            *  [Joachim Jensen - Intox Studio](https://profiles.wordpress.org/intoxstudio/)
              11:50 pm _on_ February 17, 2016
            * I understand, and enforcing such thing could also lead to false positives,
              e.g. if a pluginPlugin A plugin is a piece of software containing a group
              of functions that can be added to a WordPress website. They can extend
              functionality or add new features to your WordPress websites. WordPress
              plugins are written in the PHP programming language and integrate seamlessly
              with WordPress. These can be free in the WordPress.org Plugin Directory
              [https://wordpress.org/plugins/](https://wordpress.org/plugins/) or can
              be cost-based plugin from a third-party. really needed a script on each(
              admin) page. I think it would be more useful if it was written as a “
              best practice” somewhere in docs (if it isn’t already).
            * By the way, I noticed that if you try to register two different versions
              of the same script, the first one registered is used, not the latest 
              version.
               I know versioning is there mainly for cache reasons, but if
              wp_register_script is used correctly, wouldn’t it make sense to take 
              it into consideration and always use latest version registered? Perhaps
              there already is a discussion for it somewhere?
 24. ![](https://secure.gravatar.com/avatar/e94f3356b975fa6aa2f731991d83f9a959b63a34e0eeca117415765f3a9e0e8c?
     s=32&d=mm&r=g)
 25.  [A WP Life](https://profiles.wordpress.org/awordpresslife/)  5:35 pm _on_ February
     17, 2016
 26. Yehh! I found it. It’s very useful for every pluginPlugin A plugin is a piece 
     of software containing a group of functions that can be added to a WordPress website.
     They can extend functionality or add new features to your WordPress websites. 
     WordPress plugins are written in the PHP programming language and integrate seamlessly
     with WordPress. These can be free in the WordPress.org Plugin Directory [https://wordpress.org/plugins/](https://wordpress.org/plugins/)
     or can be cost-based plugin from a third-party. & theme developers.

Comments are closed.

# Post navigation

[← On the Topic of Selling Your Plugins…](https://make.wordpress.org/plugins/2016/02/12/on-the-topic-of-selling-your-plugins/)

[Re-thinking “Tags” in the Plugin Directory →](https://make.wordpress.org/plugins/2016/02/25/re-thinking-tags-in-the-plugin-directory/)