function nivo_slider_update_7001 in Nivo Slider 7
Add a default transition to each slide where applicable.
File
- ./
nivo_slider.install, line 73 - Install, update and uninstall functions for the Nivo Slider module.
Code
function nivo_slider_update_7001() {
// Get the current slider settings
$slider = variable_get('nivo_slider_banner_settings', array());
// Add a default transition to each existing slide
foreach ($slider as &$slide) {
if (!isset($slide['image_transition'])) {
$slide['image_transition'] = '';
}
}
// Save the updated settings
variable_set('nivo_slider_banner_settings', $slider);
return t('Added a default transition to each slide where applicable.');
}