1.20.x theme.inc backdrop_theme_access($theme)

Determines if a theme is available to use.

Parameters

$theme: Either the name of a theme or a full theme object.

Return value

Boolean TRUE if the theme is enabled or is the site administration theme;: FALSE otherwise.

File

includes/theme.inc, line 62
The theme system, which controls the output of Backdrop.

Code

function backdrop_theme_access($theme) {
  if (is_object($theme)) {
    return _backdrop_theme_access($theme);
  }
  else {
    $themes = list_themes();
    return isset($themes[$theme]) && _backdrop_theme_access($themes[$theme]);
  }
}