cms_blog.install in Glazed CMS Blog 7
Same filename and directory in other branches
Install, update and uninstall functions for the CMS Blog module.
File
cms_blog.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the CMS Blog module.
*/
/**
* Implements hook_install().
*/
function cms_blog_install() {
// Enable some standard blocks.
$default_theme = variable_get('theme_default', 'bartik');
$blocks = array(
array(
'cache' => '-1',
'delta' => 'cms_blog-blog_authors',
'module' => 'views',
'pages' => "blog\nblog/*\ntags/*",
'region' => 'sidebar_second',
'status' => '1',
'theme' => $default_theme,
'visibility' => '1',
'weight' => '0',
),
array(
'cache' => -'1',
'delta' => '2',
'module' => 'tagclouds',
'pages' => "blog\nblog/*\ntags/*",
'region' => 'sidebar_second',
'status' => '1',
'theme' => $default_theme,
'visibility' => '1',
'weight' => '1',
),
array(
'cache' => '-1',
'delta' => 'cms_blog_cat-blog_categories',
'module' => 'views',
'pages' => "blog\nblog/*\ntags/*",
'region' => 'sidebar_second',
'status' => '1',
'theme' => $default_theme,
'visibility' => '1',
'weight' => '2',
),
);
foreach ($blocks as $block) {
db_merge('block')
->key(array(
'module' => $block['module'],
'delta' => $block['delta'],
'theme' => $default_theme,
))
->fields($block)
->execute();
}
module_enable(array(
'comment',
));
}
Functions
Name | Description |
---|---|
cms_blog_install | Implements hook_install(). |