function jquery_update_make_library_hook_to_file_name_segment_map_for_effects in jQuery Update 7.3
Same name and namespace in other branches
- 7.2 jquery_update.module \jquery_update_make_library_hook_to_file_name_segment_map_for_effects()
Create a mapping from system.module library hooks to file name segments.
Parameters
array $map Optional. If given, append to it.:
Return value
array The keys are library hooks and the values are each arrays of 2 file name segments as values. The first file name segment can be used to reach Drupal core's jQuery UI effect files, and the second file name segment can be used to construct a path to the equivalent replacement jQuery UI effect file provided by jquery_update.module.
1 call to jquery_update_make_library_hook_to_file_name_segment_map_for_effects()
- jquery_update_jqueryui_replace in ./
jquery_update.module - Update jQuery UI to the CDN or local path.
File
- ./
jquery_update.module, line 564 - Updates Drupal to use the latest version of jQuery.
Code
function jquery_update_make_library_hook_to_file_name_segment_map_for_effects($map = array()) {
$effect_names = array(
'blind',
'bounce',
'clip',
'drop',
'explode',
'fade',
'fold',
'highlight',
'pulsate',
'scale',
'shake',
'slide',
'transfer',
);
foreach ($effect_names as $effect_name) {
$library_hook = 'effects.' . $effect_name;
$file_name_segment_core = $library_hook;
// Yes, for the effect files, this is indeed identical.
$file_name_segment_updated = 'ui.effect-' . $effect_name;
$map[$library_hook] = array(
$file_name_segment_core,
$file_name_segment_updated,
);
}
return $map;
}