Created
July 12, 2014 11:12
-
-
Save yannickoo/9bc874916dd989fb2293 to your computer and use it in GitHub Desktop.
Allows switching theme via $_GET parameter.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_custom_theme(). | |
*/ | |
function mymodule_products_custom_theme() { | |
$themes = list_themes(); | |
if (isset($_GET['theme']) && $_GET['theme'] && isset($themes[$_GET['theme']]) && $themes[$_GET['theme']]->status) { | |
return $_GET['theme']; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment