Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for only CSS minification #56

Open
msigley opened this issue Jun 2, 2014 · 3 comments
Open

Add option for only CSS minification #56

msigley opened this issue Jun 2, 2014 · 3 comments

Comments

@msigley
Copy link

msigley commented Jun 2, 2014

Unfortunately JavaScript minification isn't fool proof it would be great if there was an option for only minifying CSS files. This would also decrease the CPU footprint on sites where JS minification is unnecessary.

@msigley
Copy link
Author

msigley commented Jun 2, 2014

For anyone else with this issue, commenting out this filter works well enough for now:

//add_filter( 'print_scripts_array', array( __CLASS__, 'filter_print_scripts_array' ) );

@westonruter
Copy link
Contributor

@msigley or, instead of commenting out that line in the plugin itself, you could add another plugin like:

add_action( 'plugins_loaded', function () { 
    remove_filter( 'print_scripts_array', array( 'Dependency_Minification', 'filter_print_scripts_array' ) ); 
}, 101 );

@msigley
Copy link
Author

msigley commented Jun 3, 2014

@westonruter Thanks for the tip. I'll stick with the comment for as its more CPU efficient, my website has alot of traffic. A settings page in the admin area with checkboxes for things like this would be great for 1.0. JS concatenation isn't allows desired or possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants