You are here

function galleryformatter_galleryformatter_styles in Gallery formatter 7

Same name and namespace in other branches
  1. 6 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 424

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->uri] = drupal_ucfirst($file->name);
    }
  }
  return $gallerystyles;
}