function drush_respondjs_post_pm_enable in Respond.js 7
Same name and namespace in other branches
- 8 drush/respondjs.drush.inc \drush_respondjs_post_pm_enable()
Implements drush_MODULE_post_COMMAND().
After the module is enabled, drush will download the respond.js library and remind the user that CSS aggregation must be enabled if it is not already.
File
- drush/
respondjs.drush.inc, line 102 - drush integration for respondjs.
Code
function drush_respondjs_post_pm_enable() {
$extensions = func_get_args();
// Deal with comma delimited extension list.
if (strpos($extensions[0], ',') !== FALSE) {
$extensions = explode(',', $extensions[0]);
}
if (in_array('respondjs', $extensions) && !drush_get_option('skip')) {
// First attempt to download the JS library.
if (respondjs_drush_respondjs_download()) {
// If the script is installed, check to see if CSS aggregation is enabled.
if (!variable_get('preprocess_css', 0)) {
// CSS aggregation is not enabled. Complain.
drush_log(dt('Respond.js module is functioning properly, but CSS aggregation is not yet enabled. You MUST enable CSS aggregation for respond.js to work properly.'), 'warning');
}
}
}
}