xwp / wp-dependency-minification

Dependency Minification plugin for WordPress
http://wordpress.org/plugins/dependency-minification/
52 stars 10 forks source link

Dependency Minification

Automatically concatenates and minifies any scripts and stylesheets enqueued using the standard dependency system.

Contributors: x-team, westonruter, fjarrett, kucrut, shadyvb, alex-ye, c3mdigital, lkraav
Tags: performance, dependencies, minify, concatenate, compress, js, javascript, scripts, css, styles, stylesheets, gzip, yslow, pagespeed, caching
Requires at least: 3.5
Tested up to: 3.8
Stable tag: trunk (master)
License: GPLv2 or later

Description

This plugin takes all scripts and stylesheets that have been added via wp_enqueue_script and wp_enqueue_style and automatically concatenates and minifies them into logical groups. For example, scripts in the footer get grouped together and styles with the same media (e.g. print) get minified together. Minification is done via WP-Cron in order to prevent race conditions and to ensure that the minification process does not slow down page responses.

This is a reincarnation and rewrite of the Optimize Scripts plugin, which this plugin now supersedes.

Features:

Development of this plugin is done on GitHub. Pull requests welcome. Please see issues reported there before going to the plugin forum.

If you are using Nginx with the default Varying Vagrant Vagrants config, you'll want to remove css|js from this rule in nginx-wp-common.conf (or remove the rule altogether):

# Handle all static assets by serving the file directly. Add directives 
# to send expires headers and turn off 404 error logging.
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
    expires 24h;
    log_not_found off;
}

Build Status

Changelog

0.9.8

0.9.7

Improve how the plugin guesses the sources' absolute paths (#34). Props alex-ye.

0.9.6

Improve network activation and deactivation (#37). Props kucrut.

0.9.5

Fix wp_localize_script data lost in minification (#28). Props lkraav.

0.9.4

Issue warning if pretty permalinks are not enabled (#16). Props shadyvb.

0.9.3

Prevent default built-in scripts from breaking minification groups (#9). Props shadyvb.

0.9.2

Show alert if WP_DEBUG is disabling dependency minification (#12). Props c3mdigital.

0.9.1

Add a settings link to the list of plugin action links (#13). Props fjarrett.

0.9 beta

First Release