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
function qhr_menu_block_tweaks_menu_block_tree_alter(&$tree, &$config) { | |
foreach ($tree as $key => $item) { | |
if (isset($item['below'])) { | |
foreach($item['below'] as $id => $below) { | |
if (isset($below['link']['link_path']) && $below['link']['link_path'] === '<view>') { | |
$below['link']['hidden'] = true; | |
$tree[$key]['below'][$id] = $below; | |
} | |
} | |
} |
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 | |
function states_submit($form, &$form_state) { | |
$i = 0; | |
while(isset($form_state['values']['states_' . $i])) { | |
variable_set('state_' . $i, $form_state['values']['states_' . $i]); | |
$i++; | |
} | |
} |
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 | |
/** | |
* @file | |
* The router.php for clean-urls when use PHP 5.4.0 built in webserver. | |
* | |
* Usage: | |
* | |
* php -S localhost:3000 .htrouter.php | |
* | |
*/ |