kasparsd / minit

A WordPress plugin to combine CSS and Javascript files.
GNU General Public License v2.0
286 stars 46 forks source link

Simple way to exclude certain JS/CSS files? #79

Closed mhote closed 8 years ago

mhote commented 8 years ago

Hi, for us 'amateur' programmers here, is there a simple way to edit this plugin or exclude certain CSS files, which aren't working properly when combined (which is working very well by the way!)

Eg. For example if trying to exclude, the below, how we would do that? https://domain.com/cdn-cgi/nexp/dok3v=165.js

thanks

kasparsd commented 8 years ago

Check out the example here:

add_filter( 'minit-exclude-js', 'minit_exclude_scripts' );

function minit_exclude_scripts( $exclude ) {
    $exclude[] = 'the-handle-of-the-script'; // the first argument of wp_enqueue_script()

    return $exclude;
}