Skip to content

Instantly share code, notes, and snippets.

@wizidot
Created March 21, 2011 14:29
Show Gist options
  • Save wizidot/879524 to your computer and use it in GitHub Desktop.
Save wizidot/879524 to your computer and use it in GitHub Desktop.
hook library
inside MYMODULE.info :
/**
* Implements hook_library().
*/
function MYMODULE_library(){
$libraries=array();
// UI checkbox
$libraries['ui.checkbox'] = array(
'title' => 'jQuery UI: Checkbox',
'website' => 'http://view.jqueryui.com/formcontrols/tests/visual/checkbox/checkbox.html',
'version' => '1.8.7',
'js' => array(
'/misc/ui/jquery.ui.checkbox.js' => array(),
),
'css' => array(
'/misc/ui/jquery.ui.checkbox.css' => array(),
),
'dependencies' => array(
array('system', 'ui.widget'),
)
);
return $libraries;
}
function MYMODULE_preprocess_page(&$variables) {
drupal_add_library('system','ui.checkbox');
dpm(drupal_get_library('system'));
}
The array returned by dpm show that ui.checkbox is FALSE. Why ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment