xwp / wp-dependency-minification

Dependency Minification plugin for WordPress
http://wordpress.org/plugins/dependency-minification/
52 stars 10 forks source link

Add option to disable functionality unless query string is present #32

Open westonruter opened 11 years ago

westonruter commented 11 years ago

For debugging purposes, users often post to the forum with bug reports, but they have to disable the plugin so that their site is no longer broken. They should be able to leave the plugin activated, but enable an option which disables the plugin on the frontend unless a manually-supplied query string is provided, e.g. '?dependency-minification-activated=1'

This could also be done in code via a mu-plugin, for example:

add_filter( 'dependency_minification_disabled', 
    isset( $_GET['dependency_minification_enabled'] ) 
    ? '__return_false' 
    : '__return_true' 
);

Relates to #27 /cc @shadyvb