Created
March 21, 2011 14:29
-
-
Save wizidot/879524 to your computer and use it in GitHub Desktop.
hook library
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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