function new_faq_install in Frequently Asked Questions 7.2
Implements hook_install().
Inserts the FAQ module's schema in the SQL database. @todo rewrite it for 7.x-2.x
File
- ./
faq.install, line 84 - FAQ module install file.
Code
function new_faq_install() {
variable_set('node_type_faq', array(
'status',
));
$t = get_t();
// Ensure the FAQ node type is available.
node_types_rebuild();
$types = node_type_get_types();
node_add_body_field($types['faq']);
// Change the default label on the body field.
$body_instance = field_info_instance('node', 'body', 'faq');
$body_instance['label'] = $t('Answer');
field_update_instance($body_instance);
}