function metatag_update_7038 in Metatag 7
Manually enable all core entity types to resolve issues from 1.5's changes.
File
- ./
metatag.install, line 2102 - Install, update, and uninstall functions for the metatag module.
Code
function metatag_update_7038() {
foreach (array(
'node',
'taxonomy_term',
'user',
) as $entity_type) {
// Enable the main entity type.
$variable_name = 'metatag_enable_' . $entity_type;
variable_set($variable_name, TRUE);
// Update each entity bundle too.
$entity_info = entity_get_info($entity_type);
if (!empty($entity_info['bundles'])) {
foreach ($entity_info['bundles'] as $bundle_name => $bundle_info) {
$variable_name = 'metatag_enable_' . $entity_type . '__' . $bundle_name;
variable_set($variable_name, TRUE);
}
}
}
}