function views_jqfx_galleria_get_themes in Views jQFX Galleria 7
Scan Galleria theme folder and return theme list.
1 call to views_jqfx_galleria_get_themes()
- views_jqfx_galleria_views_jqfx_jqfx_type_form in ./
views_jqfx_galleria.views_jqfx.inc - Implements hook_views_jqfx_views_jqfx_type_form().
File
- ./
views_jqfx_galleria.module, line 30 - Integrating Galleria with Views jQFX.
Code
function views_jqfx_galleria_get_themes() {
// Path to galleria themes
$theme_path = libraries_get_path('galleria') . '/themes';
// List themes
$files = file_scan_directory($theme_path, '/.*/', array(
'recurse' => FALSE,
));
$themes = array();
if (is_array($files)) {
foreach ($files as $path => $file) {
if (is_dir($path) && file_exists($path . '/galleria.' . $file->filename . '.css')) {
$themes[] = $file->filename;
asort($themes);
}
}
}
return drupal_map_assoc($themes);
}