public function OSMTemplate::getThemeRollerCSS in MediaFront 6
Same name and namespace in other branches
- 6.2 players/osmplayer/player/OSMTemplate.php \OSMTemplate::getThemeRollerCSS()
- 7 players/osmplayer/player/OSMTemplate.php \OSMTemplate::getThemeRollerCSS()
Returns the CSS file that is located within the current theme.
1 call to OSMTemplate::getThemeRollerCSS()
- DefaultTemplate::getSettings in players/
osmplayer/ player/ templates/ default/ template.php - Return's this templates settings. This function is used to tell the Open Standard Media Player class about your template.
File
- players/
osmplayer/ player/ OSMTemplate.php, line 131
Class
- OSMTemplate
- Copyright (c) 2010 Alethia Inc, http://www.alethia-inc.com Developed by Travis Tidwell | travist at alethia-inc.com
Code
public function getThemeRollerCSS() {
$theme_css = '';
if ($this->playerSettings['theme']) {
$theme_folder = 'jquery-ui/css/' . $this->playerSettings['theme'];
// Now search this folder for the CSS file...
$theme_path = dirname(__FILE__) . '/' . $theme_folder;
if (is_dir($theme_path)) {
if ($contents = opendir($theme_path)) {
while (($node = readdir($contents)) !== false) {
if (preg_match('/\\.css$/', $node)) {
$theme_css = $node;
break;
}
}
}
}
}
// Add the theme.
return $theme_css ? $theme_folder . '/' . $theme_css : '';
}