You are here

function _galleryformatter_get_style_css in Gallery formatter 7

Same name and namespace in other branches
  1. 6 galleryformatter.module \_galleryformatter_get_style_css()

Helper function to get the css file for given style.

1 call to _galleryformatter_get_style_css()
galleryformatter_add_css in ./galleryformatter.module
Fetch the necessary CSS files for the gallery styles.

File

./galleryformatter.module, line 396

Code

function _galleryformatter_get_style_css($style = 'nostyle') {
  static $gallerystyles;
  if ($style != 'nostyle') {
    if (!isset($gallerystyles)) {
      $gallerystyles = module_invoke_all('galleryformatter_styles');
    }
    foreach ($gallerystyles as $css_file => $gallerystyle) {
      if ($style == strtolower($gallerystyle)) {
        return $css_file;
      }
    }
  }
  return 'nostyle';
}