function answers_update_7200 in Answers 7.3
Same name and namespace in other branches
- 7.2 answers.install \answers_update_7200()
Add 'field_question_locked_p' to the question content type.
File
- ./
answers.install, line 62
Code
function answers_update_7200() {
$fields = answers_field_default_fields();
if (!field_info_field('field_question_locked_p')) {
$field = $fields['node-question-field_question_locked_p']['field_config'];
field_create_field($field);
}
if (!field_info_instance('node', 'field_question_locked_p', 'question')) {
$instance = $fields['node-question-field_question_locked_p']['field_instance'];
field_create_instance($instance);
}
return array();
}