function cloud_zoom_get_rel_string in Cloud Zoom 8
Same name and namespace in other branches
- 7 cloud_zoom.module \cloud_zoom_get_rel_string()
Build rel string.
This is used to prepare the HTML Cloud zoom is expecting.
2 calls to cloud_zoom_get_rel_string()
- theme_cloud_zoom_image in ./
cloud_zoom.module - Theme handler for the cloud_zoom (no gallery)
- theme_cloud_zoom_image_gallery in ./
cloud_zoom.module - Theme handler for the cloud_zoom effect with gallery
File
- ./
cloud_zoom.module, line 507 - This module integrates the Cloud Zoom JQuery library from: http://www.professorcloud.com/mainsite/cloud-zoom.htm
Code
function cloud_zoom_get_rel_string($variables) {
$output = array();
$cloud_zoom_settings = cloud_zoom_settings_info();
foreach ($cloud_zoom_settings as $key => $setting) {
if ($setting['id']) {
$value = $setting['form_type'] == 'checkbox' ? $variables[$key] ? 'true' : 'false' : (!empty($setting['add_quote']) ? '\'' : '') . $variables[$key] . (!empty($setting['add_quote']) ? '\'' : '');
$output[] = $setting['id'] . ':' . $value;
}
}
$output = implode(', ', $output);
return $output;
}