function social_topic_update_8906 in Open Social 10.2.x
Same name and namespace in other branches
- 10.3.x modules/social_features/social_topic/social_topic.install \social_topic_update_8906()
- 10.0.x modules/social_features/social_topic/social_topic.install \social_topic_update_8906()
- 10.1.x modules/social_features/social_topic/social_topic.install \social_topic_update_8906()
Remove group_topic_description fieldgroup from topic content type.
File
- modules/
social_features/ social_topic/ social_topic.install, line 289 - Install, update and uninstall functions for the social_topic module.
Code
function social_topic_update_8906() {
// There can be possibility that someone might have added fields in
// fieldgroup we are removing. So, we want to skip removal if there are any
// children present in fieldgroup.
$group = field_group_load_field_group('group_topic_description', 'node', 'topic', 'form', 'default');
if ($group && empty($group->children)) {
field_group_delete_field_group($group);
}
}