function supersized_overlay in Supersized 8
Same name and namespace in other branches
- 7 supersized.module \supersized_overlay()
Return available overlay patterns.
2 calls to supersized_overlay()
- supersized_overlay_options in ./
supersized.module - Return available overlay patterns.
- theme_supersized_overlay in ./
supersized.module - Theme fuction for overlay.
File
- ./
supersized.module, line 886 - Supersized module file.
Code
function supersized_overlay($overlay_key = NULL) {
// Defaut overlay options.
$file_path = drupal_get_path('module', 'supersized') . '/images';
$overlay = array(
'style_01' => array(
'name' => t('Style 1'),
'file' => 'overlay_01.png',
'file path' => $file_path,
),
'style_02' => array(
'name' => t('Style 2'),
'file' => 'overlay_02.png',
'file path' => $file_path,
),
'style_03' => array(
'name' => t('Style 3'),
'file' => 'overlay_03.png',
'file path' => $file_path,
),
'style_04' => array(
'name' => t('Style 4'),
'file' => 'overlay_04.png',
'file path' => $file_path,
),
'style_05' => array(
'name' => t('Style 5'),
'file' => 'overlay_05.png',
'file path' => $file_path,
),
'style_06' => array(
'name' => t('Style 6'),
'file' => 'overlay_06.png',
'file path' => $file_path,
),
'style_07' => array(
'name' => t('Style 7'),
'file' => 'overlay_07.png',
'file path' => $file_path,
),
'style_08' => array(
'name' => t('Style 8'),
'file' => 'overlay_08.png',
'file path' => $file_path,
),
'style_09' => array(
'name' => t('Style 9'),
'file' => 'overlay_09.png',
'file path' => $file_path,
),
'style_10' => array(
'name' => t('Style 10'),
'file' => 'overlay_10.png',
'file path' => $file_path,
),
'style_11' => array(
'name' => t('Style 11'),
'file' => 'overlay_11.png',
'file path' => $file_path,
),
'style_12' => array(
'name' => t('Style 12'),
'file' => 'overlay_12.png',
'file path' => $file_path,
),
'style_13' => array(
'name' => t('Style 13'),
'file' => 'overlay_13.png',
'file path' => $file_path,
),
'style_14' => array(
'name' => t('Style 14'),
'file' => 'overlay_14.png',
'file path' => $file_path,
),
);
// Additional overlay options by other modules.
$overlay_additions = module_invoke_all('supersized_overlay');
foreach ($overlay_additions as $k => $addition) {
$overlay[$k] = $addition;
}
// Return specify overlay info.
if ($overlay_key !== NULL) {
return $overlay[$overlay_key];
}
return $overlay;
}