Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Implements hook_libraries_info().
- *
- */
- function MYMODULE_libraries_info() {
- // Define 'simple' as the machine name of library
- // which will be stored in sites/all/libraries/simple
- $libraries['simple'] = array(
- // This gets passed to the $options array in libraries_get_version()
- 'version arguments' => array(
- 'file' => 'simple.js',
- 'pattern' => '/Version (d+)/',
- 'lines' => 5,
- ),
- // Alternatively, MYMODULE_version_callback could be defined.
- // this function returns TRUE/FALSE if it finds a valid version of the library
- //'version callback' => 'MYMODULE_version_callback',
- // Defines the PHP,JS,CSS files to load for the library
- 'files' => array(
- 'js' => array('simple.js'), //this can be a path to the file location like array('lib/simple.js')
- ),
- );
- return $libraries;
- }
- //Load the 'simple' library
- libraries_load('simple');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement