function commerce_kickstart_update_7213 in Commerce Kickstart 7.2
Update the admin theme from "Shiny" to "Commerce Kickstart Admin Theme".
File
- ./
commerce_kickstart.install, line 1074 - Installation code for Commerce Kickstart.
Code
function commerce_kickstart_update_7213() {
if (variable_get('admin_theme', 'shiny') == 'shiny') {
// Enable the new theme.
theme_enable(array(
'commerce_kickstart_admin',
));
variable_set('admin_theme', 'commerce_kickstart_admin');
drupal_static_reset();
_block_rehash('commerce_kickstart_admin');
// Disable all blocks in the content region except "Main page content".
db_update('block')
->fields(array(
'region' => '-1',
))
->condition('theme', 'commerce_kickstart_admin')
->condition('region', 'content')
->condition(db_and()
->condition('module', 'system', '<>')
->condition('delta', 'main', '<>'))
->execute();
// Move help to the correct region.
db_update('block')
->fields(array(
'region' => 'help',
))
->condition('module', 'system')
->condition('delta', 'help')
->condition('theme', 'commerce_kickstart_admin')
->execute();
// Disable the old theme.
theme_disable(array(
'shiny',
));
}
}