function metatag_opengraph_requirements in Metatag 7
Implements hook_requirements().
File
- metatag_opengraph/
metatag_opengraph.install, line 11 - Installation and update scripts for Metatag:OpenGraph.
Code
function metatag_opengraph_requirements($phase) {
$requirements = array();
// Ensure translations don't break during installation.
$t = get_t();
if ($phase == 'runtime') {
if (module_exists('rdf')) {
// Work out the release of D7 that is currently running.
list($major, $minor) = explode('.', VERSION);
// Strip off any suffixes on the version string, e.g. "17-dev".
if (strpos('-', $minor)) {
list($minor, $suffix) = explode('-', $minor);
}
if ($minor < 33) {
$requirements['metatag_og_rdf'] = array(
'severity' => 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;
}