Support » Plugin: Better WordPress Minify » Suggestion: How to find your script's handle

  • Like others, I was a little confused by the instruction “Type in one script handle (NOT filename) per line.” But I did find a suggestion here (which I improved slightly) about how to find your script’s handle.

    Add this code to your site’s functions.php file:

    function wpa54064_inspect_scripts() {
        global $wp_scripts;
        foreach( $wp_scripts->queue as $handle ) :
            echo $handle,' ';
        endforeach;
    }
    add_action( 'wp_print_scripts', 'wpa54064_inspect_scripts' );

    Then reload a relevant page of your site, and you’ll see a list of script handles across the top of your page. Copy the correct one and use it in the Minifying Scripts Options section as needed.

    (Maybe the plugin author could make this post sticky.)

    http://wordpress.org/plugins/bwp-minify/

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Suggestion: How to find your script's handle’ is closed to new replies.