drupal_theme_access

Versions
7
drupal_theme_access($theme)

Determines if a theme is available to use.

Parameters

$theme An object representing the theme to check.

Return value

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

▾ 4 functions call drupal_theme_access()

drupal_theme_initialize in includes/theme.inc
Initialize the theme system by loading the theme.
system_themes_page in modules/system/system.admin.inc
Menu callback; displays a listing of all themes.
_block_themes_access in modules/block/block.module
Menu item access callback - only admin or enabled themes can be accessed.
_system_themes_access in modules/system/system.module
Menu item access callback - only admin or enabled themes can be accessed.

Code

includes/theme.inc, line 48

<?php
function drupal_theme_access($theme) {
  $admin_theme = variable_get('admin_theme');
  return !empty($theme->status) || ($admin_theme && $theme->name == $admin_theme);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.