You are here

function osmplayer_theme in MediaFront 6.2

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

Implementation of hook_theme()

File

players/osmplayer/osmplayer.module, line 146

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,
      'arguments' => 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, 'nodevoter', $template_path);
    osmplayer_add_theme($themes, $template, 'teaser', $template_path);
    osmplayer_add_theme($themes, $template, 'teaservoter', $template_path);
    osmplayer_add_theme($themes, $template, 'playlist', $template_path);
    osmplayer_add_theme($themes, $template, 'scrollbar', $template_path);
    osmplayer_add_theme($themes, $template, 'links', $template_path);
    osmplayer_add_theme($themes, $template, 'pager', $template_path);
  }
  return $themes;
}