function wp_blog_install in WP Blog - a WordPress-style blogging module. 7
Implements hook_install().
File
- ./
wp_blog.install, line 57 - Install functions for the WP Blog module.
Code
function wp_blog_install() {
// Include the module-file to load the constants.
require_once dirname(__FILE__) . '/wp_blog.module';
$t = get_t();
// Add the body field to the WP Blog content type.
node_types_rebuild();
$types = node_type_get_types();
node_add_body_field($types[WP_BLOG_DEFAULT_CTYPE], $t('Body'));
// Add a taxonomy vocabulary.
_wp_blog_create_vocabulary();
// Configure pathauto with the appropriate path structure:
// /blog/yyyy/mm/dd/node-title.
variable_set('pathauto_node_wp_blog_pattern', WP_BLOG_DEFAULT_NODE_PATH);
}