Created
July 15, 2009 09:33
-
-
Save perifer/147607 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
<?php | |
/** | |
* Override theme_block() to disable rendering of blocks. | |
*/ | |
function YOURTHEME_blocks($region) { | |
$output = ''; | |
// Right region and on the node form. | |
$node_form = ($region == 'right' && arg(0) == 'node' && (arg(1) == 'add' || arg(2) == 'edit')); | |
if (!$node_form) { | |
if ($list = block_list($region)) { | |
foreach ($list as $key => $block) { | |
// $key == <i>module</i>_<i>delta</i> | |
$output .= theme('block', $block); | |
} | |
} | |
// Add any content assigned to this region through drupal_set_content() calls. | |
$output .= drupal_get_content($region); | |
} | |
return $output; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment