function drupal_theme_access
7.x theme.inc | drupal_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.
6 calls to drupal_theme_access()
- drupal_theme_initialize in drupal-7.x/
includes/ theme.inc - Initializes the theme system by loading the theme.
- menu_get_custom_theme in drupal-7.x/
includes/ menu.inc - Gets the custom theme for the current page, if there is one.
- system_themes_page in drupal-7.x/
modules/ system/ system.admin.inc - Menu callback; displays a listing of all themes.
- ThemeTestCase::testListThemes in drupal-7.x/
modules/ simpletest/ tests/ theme.test - Test the list_themes() function.
- _block_themes_access in drupal-7.x/
modules/ block/ block.module - Menu item access callback - only admin or enabled themes can be accessed.
1 string reference to 'drupal_theme_access'
- menu_get_custom_theme in drupal-7.x/
includes/ menu.inc - Gets the custom theme for the current page, if there is one.
File
- drupal-7.x/
includes/ theme.inc, line 47 - The theme system, which controls the output of Drupal.
Code
function drupal_theme_access($theme) {
if (is_object($theme)) {
return _drupal_theme_access($theme);
}
else {
$themes = list_themes();
return isset($themes[$theme]) && _drupal_theme_access($themes[$theme]);
}
}