For debug purpose, I would need to call and display the name of the current theme for a user already logged in (in a specific php page).
How to do this ?

Comments

alan d.’s picture

General pattern of finding variables in a template:

<?php
echo '<pre>';
// List all
print_r(get_defined_vars());

// A bit cleaner, just the variable names
print_r(array_keys(get_defined_vars()));

// No theme in scope?
global $theme;
echo '<br/>'. $theme;

echo '</pre>';
?>

Alan Davison
zietbukuel’s picture

Thank you very much, I needed this :)

--
Juan Timaná