Last active
November 2, 2019 04:00
-
-
Save robdecker/5784592 to your computer and use it in GitHub Desktop.
[Add active contexts to body classes] Insert into THEME_preprocess_page() #d6
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
// List active contexts from "context" module. | |
$contexts = context_active_contexts(); | |
foreach ($contexts as $context) { | |
$vars['body_classes'] .= ' context_' . $context->name; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment