You are here

function osmplayer_theme in MediaFront 7

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

Implements hook_theme()

File

players/osmplayer/osmplayer.module, line 156

Code

function osmplayer_theme() {
  $templates = osmplayer_get_templates();
  $themes = array();
  $path = osmplayer_get_path() . '/templates';
  foreach ($templates as $template) {
    $template_path = $path . '/' . $template;
    $themes['osmplayer_' . $template] = array(
      'template' => 'osmplayer_' . $template,
      'variables' => array(
        'params' => NULL,
        'templates' => NULL,
      ),
      'path' => $template_path,
      'preprocess functions' => array(
        'template_preprocess_osmplayer',
      ),
    );

    // Add all of our player components, if they exist...
    osmplayer_add_theme($themes, $template, 'titlebar', $template_path);
    osmplayer_add_theme($themes, $template, 'menu', $template_path);
    osmplayer_add_theme($themes, $template, 'controlbar', $template_path);
    osmplayer_add_theme($themes, $template, 'node', $template_path);
    osmplayer_add_theme($themes, $template, 'teaser', $template_path);
    osmplayer_add_theme($themes, $template, 'playlist', $template_path);
    osmplayer_add_theme($themes, $template, 'scrollbar', $template_path);
    osmplayer_add_theme($themes, $template, 'pager', $template_path);
  }
  return $themes;
}