Table of Contents
- Pick the URLs to load scripts from depending on the jquerycdn setting
- pick the correct URLs
This event is signalled by getCdnUrls() in inc/confutils.php when the jQuery script URLs are selected, handlers can use it to use a different CDN or to add their own script files in addition.
$data is an array with two arrays:
$data = array( 'versions' => array( 'JQ_VERSION' => '3.1.1', // jquery 'JQUI_VERSION' => '1.12.1', // jquery-ui 'JQM_VERSION' => '3.0.0' // jquery-migrate ), 'src' => array( ) );
version array contains the currently configured jquery versions from
src array is empty in the
BEFORE event and will contain all script URLs to be loaded in the
AFTER event. The
src array may be modified by plugins.
BEFORE event could prevent the default handling and use a different CDN for the given jQuery versions. It could also modify the versions loaded (but only when using a CDN – locally we only have one version available).
AFTER event could add additional scripts to be loaded.
- Code related to this event used in any DokuWiki's files, plugins and templates