You are here

function osmplayer_get_themes in MediaFront 7.2

Same name and namespace in other branches
  1. 6.2 players/osmplayer/osmplayer.module \osmplayer_get_themes()
  2. 6 players/osmplayer/osmplayer.module \osmplayer_get_themes()
  3. 7 players/osmplayer/osmplayer.module \osmplayer_get_themes()

Returns the themes available to the OSM Player.

Return value

string

1 call to osmplayer_get_themes()
osmplayer_osmplayer_info in players/osmplayer/osmplayer.module
Implementation of hook_osmplayer_player_info

File

players/osmplayer/osmplayer.module, line 889

Code

function osmplayer_get_themes($base_path) {
  $themes = array();
  $path = getcwd() . '/' . $base_path . '/*';
  foreach (glob($path, GLOB_ONLYDIR) as $dir) {
    $name = basename($dir);
    $theme_path = $base_path . '/' . $name;
    foreach (glob($dir . '/*.css') as $css) {
      $themes[$name] = array(
        'url' => $theme_path . '/' . basename($css),
        'options' => array(
          'type' => 'file',
          'group' => CSS_DEFAULT,
        ),
      );
      break;
    }
  }
  return $themes;
}