Table of Contents
CONFUTIL_CDN_SELECT
- Description:
- Pick the URLs to load scripts from depending on the jquerycdn setting
- DefaultAction:
- pick the correct URLs
- Preventable:
- yes
- Added:
- 2017-02-03
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.
Passed Data
$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( ) );
The version
array contains the currently configured jquery versions from lib/scripts/jquery/versions
. The 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.
A 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).
An AFTER
event could add additional scripts to be loaded.
See also
- Code related to this event used in any DokuWiki's files, plugins and templates