REQUIREMENT_WARNING, 'title' => 'Metatag:OpenGraph', 'value' => $t('RDF problems with Drupal core releases before v7.33'), 'description' => $t('The core RDF module in Drupal before v7.33 caused validation problems for Open Graph meta tags. The solution is to update to v7.33 or newer.'), ); } } } return $requirements; } /** * Implements hook_update_dependencies(). */ function metatag_opengraph_update_dependencies() { // OpenGraph update 7103 requires the complete Metatag schema, so lets wait // for Metatag update 7100 just to be sure. $dependencies['metatag_opengraph'][7103] = array( 'metatag' => 7100, ); return $dependencies; } /** * Implements hook_uninstall(). */ function metatag_opengraph_uninstall() { // Remove all of the maxlength variables. variable_del('metatag_maxlength_og:title'); variable_del('metatag_maxlength_og:description'); } /** * Implementations of hook_update_N(). */ /** * Enable the new Metatag:Facebook submodule. */ function metatag_opengraph_update_7100() { module_enable(array('metatag_facebook')); drupal_set_message(t('Enabled the new Metatag:Facebook submodule. If the Facebook meta tags are not being used then it is safe to disable.')); } /** * Leave a warning about the two og:type value changes. */ function metatag_opengraph_update_7101() { drupal_set_message(t('The "Movie" and "TV Show" values for the "Content type" open graph meta tag changed, if this site used those values they will need to be manually updated.')); } /** * The Open Graph Products meta tags are now in a new submodule. */ function metatag_opengraph_update_7102() { drupal_set_message(t('The Open Graph Products meta tags have been moved into the new "Metatag: Open Graph Products" submodule.')); } /** * Change og:video to og:video:url in all metatags. */ function metatag_opengraph_update_7103(&$sandbox) { module_load_include('install', 'metatag'); $old_tag = 'og:video'; $new_tag = 'og:video:url'; return metatag_update_replace_entity_tag($sandbox, $old_tag, $new_tag); } /** * Rename the 'og:video' meta tag to 'og:video:url' in the configs. */ function metatag_opengraph_update_7104() { module_load_include('install', 'metatag'); $old_tag = 'og:video'; $new_tag = 'og:video:url'; return metatag_update_replace_config_tag($old_tag, $new_tag); } /** * Clear the Metatag cache to pick up changes to og:video. */ function metatag_opengraph_update_7105() { cache_clear_all('*', 'cache_metatag', TRUE); return t('All Metatag caches cleared.'); } /** * Clear the Metatag cache to pick up changes to og:audio:secure_url. */ function metatag_opengraph_update_7106() { cache_clear_all('*', 'cache_metatag', TRUE); return t('All Metatag caches cleared.'); }