-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #277: Add bee commands for theme_debug.
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
/** | ||
* @file | ||
* Command(s) for working with themes. | ||
*/ | ||
|
||
/** | ||
* Implements hook_bee_command(). | ||
*/ | ||
function theme_bee_command() { | ||
return array( | ||
'theme-enable-debug' => array( | ||
'description' => bt('Enable theme debugging.'), | ||
'callback' => 'theme_bee_enable_debug_callback', | ||
'group' => 'themes', | ||
'aliases' => array('ted'), | ||
'bootstrap' => BEE_BOOTSTRAP_FULL, | ||
'examples' => array( | ||
'bee theme-enable-debug' => bt('Enable theme debugging.'), | ||
), | ||
), | ||
'theme-disable-debug' => array( | ||
'description' => bt('Disable theme debugging.'), | ||
'callback' => 'theme_bee_disable_debug_callback', | ||
'group' => 'themes', | ||
'aliases' => array('tdd'), | ||
'bootstrap' => BEE_BOOTSTRAP_FULL, | ||
'examples' => array( | ||
'bee theme-disable-debug' => bt('Disable theme debugging.'), | ||
), | ||
), | ||
); | ||
} | ||
|
||
/** | ||
* Command callback: Enable theme debugging. | ||
*/ | ||
function theme_bee_enable_debug_callback($arguments, $options) { | ||
config_set('system.core', 'theme_debug', 1); | ||
|
||
bee_message(bt('Theme debugging has been turned on.'), 'success'); | ||
} | ||
|
||
/** | ||
* Command callback: Enable theme debugging. | ||
*/ | ||
function theme_bee_disable_debug_callback($arguments, $options) { | ||
config_set('system.core', 'theme_debug', 0); | ||
|
||
bee_message(bt('Theme debugging has been turned off.'), 'success'); | ||
} |