function popups_popups_skins in Popups API (Ajax Dialogs) 6.2
Implementation of hook_popups_skins.
This hook allows other modules to create additional custom skins for the popups module.
Return value
array An array of key => value pairs suitable for inclusion as the #options in a select or radios form element. Each key must be the location of at least a css file for a popups skin. Optionally can have a js index as well. Each value should be the name of the skin.
File
- ./
popups.module, line 378 - This module provides a hook_popups for links to be opened in an Ajax Popup Modal Dialog.
Code
function popups_popups_skins() {
$skins = array();
$skins_directory = drupal_get_path('module', 'popups') . '/skins';
$files = file_scan_directory($skins_directory, '\\.css$');
foreach ($files as $file) {
$name = drupal_ucfirst($file->name);
$skins[$name]['css'] = $file->filename;
$js = substr_replace($file->filename, '.js', -4);
if (file_exists($js)) {
$skins[$name]['js'] = $js;
}
}
return $skins;
}