WP JS

Allows developers to compress (GZIP & JSMIN) JavaScript files as well as concatenate them into one single file.

Author:Halmat Ferello (profile at wordpress.org)
WordPress version required:2.5.1
WordPress version tested:2.6.2
Plugin version:2.0.6
Added to WordPress repository:18-06-2008
Last updated:08-03-2009
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:0
Rated by:0
Plugin URI:http://www.halmatferello.com/lab/wp-js/
Total downloads:13 463
Active installs:80+
plugin download
Click to start download

This plugin will GZIP and JSMIN your JavaScript files as well as allowing the ability to put JavaScript files into a single file at the client’s end. Cache expiry time can also be set in the admin page.

NEW:
* SECURITY PATCH – please update the plugin. (Thanks to Dario Caregnato)
* Will now work with Child Themes (Thanks to Wupperpirat)

Now in version 2.0 you can add JavaScript files to a specific page or post and putting all of them into one file.

Version 2.0

  • Ability to add JavaScript files to specific page/post
  • Improved security
  • Reduced URL outputted

Example

<script src="<?php wp_js('path/to/js/file.js'); ?>" type="text/javascript"></script>

OR you can also concatenate the JavaScript files (comma separated)

<script src="<?php wp_js('path/to/js/file.js, path/to/js/file2.js, path/to/js/file3.js'); ?>" type="text/javascript"></script>

Visit the WP JS site for more information: http://www.halmatferello.com/lab/wp-js/

Try the CSS version of the this plugin: https://wordpress.org/extend/plugins/wp-css/