Created
October 4, 2013 21:44
-
-
Save MattReimer/6833291 to your computer and use it in GitHub Desktop.
Show contexts DEBUG helper
This file contains 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
//Little helper to show our contexts | |
global $user; | |
if ($user->uid == 1 && $contexts = context_active_contexts() ) { | |
$msg = "Active Contexts: "; | |
foreach ($contexts as $key => $context) { | |
$msg .= "<label class='label round context'>" . $context->name . "</label>"; | |
} | |
drupal_set_message( $msg, 'debug'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment