Created
February 26, 2014 23:22
-
-
Save steinmb/9240951 to your computer and use it in GitHub Desktop.
hook_update_N() example moving blocks
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 | |
/** | |
* Move system user-menu block from header to region-top. | |
*/ | |
function elmcip_setup_update_7004() { | |
$num_updated = db_update('block') | |
->fields(array( | |
'region' => 'header_top', | |
'status' => 1, | |
'weight' => 1, | |
)) | |
->condition('delta', 'user-menu') | |
->condition('theme', 'elmcip') | |
->execute(); | |
print "Moved and enabled $num_updated block(s) to region header-top \n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment