1 color.module | _color_preview_theme() |
Returns the name of the theme currently being previewed.
Return value
string: The name of the theme currently being previewed, or an empty string if the logged in user does not have access to administer themes.
File
- core/
modules/ color/ color.module, line 480 - Allows users to change the color scheme of themes.
Code
function _color_preview_theme() {
if (user_access('administer themes')) {
if (isset($_GET['preview'])) {
$themes = list_themes();
if (in_array($_GET['preview'], array_keys($themes))) {
return $_GET['preview'];
}
}
}
return '';
}