function galleryformatter_galleryformatter_styles in Gallery formatter 6
Same name and namespace in other branches
- 7 galleryformatter.module \galleryformatter_galleryformatter_styles()
Implementation of hook_galleryformatter_styles().
This hook allows other modules to create additional tab styles for the galleryformatter 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 a css file for a gallery formatter style. Each value should be the name of the style.
File
- ./
galleryformatter.module, line 190
Code
function galleryformatter_galleryformatter_styles() {
$gallerystyles_directory = drupal_get_path('module', 'galleryformatter') . '/gallerystyles';
$files = file_scan_directory($gallerystyles_directory, '\\.css$');
$gallerystyles = array();
foreach ($files as $file) {
// Skip RTL files.
if (!strpos($file->name, '-rtl')) {
$gallerystyles[$file->filename] = drupal_ucfirst($file->name);
}
}
return $gallerystyles;
}