function yoast_seo_entity_type_enable in Real-time SEO for Drupal 7
Enable support for a specific entity type.
Parameters
string $entity_type: The entity's type.
string $bundle: The entity's bundle.
File
- ./
yoast_seo.module, line 960 - Primary hook implementations for Yoast SEO for Drupal module.
Code
function yoast_seo_entity_type_enable($entity_type, $bundle = NULL) {
// The bundle was defined.
if (isset($bundle)) {
variable_set('yoast_seo_enable_' . $entity_type . '__' . $bundle, TRUE);
}
// Always enable the entity type, because otherwise there's no point in
// enabling the bundle.
variable_set('yoast_seo_enable_' . $entity_type, TRUE);
// Clear the static cache so that the entity type / bundle will work.
drupal_static_reset('yoast_seo_entity_supports_yoast_seo');
}