Better WordPress Minify
[resolved] Wont ignore jQuery or jQeryUI (5 posts)

  1. wallyO
    Posted 2 years ago #

    I want to be able to exclude jquery.js and jquery.ui.core.min.js from BWP Minify.

    Adding the handles,
    to the "Scripts to be ignored (not minified)" setting has no effect.

    I have previously been using Use Google Libraries plugin as well as BWP Minify for managing js and css. This has worked well with the script links for
    http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js and
    http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js being output into the header above BWP Minify's js links.
    This was with BWP Minify set to process js automatically.

    Now, if I enable Use Google Libraries plugin the ajax.googleapis.com strings are included in the BWP Minify file string.

    A second part of the problem is this link being generated as well.
    <script type='text/javascript' src='http://domain.com?ver=1.10.2'></script>
    It appears to be the same as described (with work around) here.


  2. Li-An
    Posted 2 years ago #

    I'm interested too :-)

  3. JibsouX
    Posted 2 years ago #

    hellow you can :

    1 : add the fix
    modification in the file : includes/class-bwp-minify.php

    then 2 : test to exclude with the handle.

    if it doesn't work you can test to add it manualy in function.php like that to exclude jquery :

    add_filter('bwp_minify_style_ignore', 'ignore_jquery');
    function ignore_jquery($ignore){
    $ignore = array('jquery');return $ignore;

    and to minified separately jquery :

    add_filter('bwp_minify_script_direct', 'direct_jquery');
    function direct_jquery($direct){
    $direct = array('jquery');return $direct;

    For more detail check : Hook References here : http://betterwp.net/wordpress-plugins/bwp-minify/

  4. Hal
    Posted 2 years ago #

    To ignore jquery, tell bwp to ignore 'jquery-core' (works for 3.7.1). Otherwise its not ignored.

  5. James Revillini
    Posted 1 year ago #

    Thanks, Hal. This info is pretty difficult to find. Would be nice to have this in the FAQ, as many people are going to have scripts that depend on jQuery being loaded in the head.

    ***** to you, my friend.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Better WordPress Minify
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic