You should use this tutorial if you still notice some Javascript and CSS files not being processed by WP Minify after activating the plugin.
Problem
WP Minify only sees scripts and styles enqueued via the wp_enqueue_script() and wp_enqueue_style() function. So if your theme or plugin does not use these functions for printing Javascript or CSS references, then WP Minify will not include them into the Minifying process.
How to Enqueue Scripts
To enqueue a Javascript file use the following PHP contruct:
function my_load_js() { wp_enqueue_script('my_handle_name', 'http://example.com/path/to/file.js'); } add_action('init','my_load_js');
To enqueue a Javascript file that is required to be loaded after another Javascript file, you can specify the dependent script’s handle as the third parameter. The following example will load second_file.js after first_file.js:
function my_load_js() { wp_enqueue_script('my_handle_name_first', 'http://example.com/path/to/first_file.js'); wp_enqueue_script('my_handle_name_second', 'http://example.com/path/to/second_file.js', 'my_handle_name_first'); } add_action('init','my_load_js');
More information on wp_enqueue_script() on WordPress Codex.
How to Enqueue Styles
Use the same construct as the previous section except with the wp_enqueue_style() function instead.
Final Words
I have always been a believer of wp_enqueue_script() and wp_enqueue_style() functions. If your plugin is not using these functions yet, please upgrade it so that it can take advantage the WP Minify engine! If you do not own the plugin, please nudge your plugin author towards this article and request that they upgrade their plugin!
This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.