Main menu

Drupal 7: Determine whether current theme is the admin theme

Published by dnovikov on Wed, 03/06/2013 - 16:05

If you want to check whether currently used theme is an admin one, use the following code snippet:

global $theme_key;

if (
$theme_key == variable_get('admin_theme', '')) {


Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.