Created
January 12, 2012 17:17
-
-
Save pixelwhip/1601828 to your computer and use it in GitHub Desktop.
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
/** | |
* Implements hook_block_view_alter(). | |
*/ | |
function ex_user_block_view_masquerade_masquerade_alter(&$data, $block) { | |
// Allow the block to be hidden using a conf variable. | |
if (!variable_get('ex_user_show_masquerade_block', 1)) { | |
$data = array(); | |
return; | |
} | |
// Change the masquerade block title and content to reflect the masquerading state. | |
if (isset($_SESSION['masquerading'])) { | |
$data['subject'] = t('Masquerading'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment