jquery_plugins

This pipeline makes it easy to add JavaScript code which will be inserted into every public and private page (which uses the tag #INSERT_HEAD).

It receives and returns an array that contains the paths (these paths will be completed by the function find_in_path()) of the files to be inserted:

$scripts = pipeline('jquery_plugins', array(
    'javascript/jquery.js',
    'javascript/jquery.form.js',
    'javascript/ajaxCallback.js'
));

Example

Add the script "jquery.cycle.js" to every page:

function pluginPrefix_jquery_plugins($scripts){
    $scripts[] = "javascript/jquery.cycle.js";
    return $scripts;
}

Author Gilles Vincent Published : Updated : 30/05/10

Translations : English, français