metatag_dc.module 768 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * @file
  4. * Metatag integration for the metatag_dc module.
  5. */
  6. /**
  7. * Implements hook_ctools_plugin_api().
  8. */
  9. function metatag_dc_ctools_plugin_api($owner, $api) {
  10. if ($owner == 'metatag' && $api == 'metatag') {
  11. return array('version' => 1);
  12. }
  13. }
  14. /**
  15. * Implements hook_theme().
  16. */
  17. function metatag_dc_theme() {
  18. $info['metatag_dc'] = array(
  19. 'render element' => 'element',
  20. );
  21. return $info;
  22. }
  23. /**
  24. * Theme callback for a Dublin Core meta tag.
  25. */
  26. function theme_metatag_dc($variables) {
  27. $element = &$variables['element'];
  28. $args = array(
  29. '#name' => 'name',
  30. '#schema' => 'schema',
  31. '#value' => 'content',
  32. );
  33. element_set_attributes($element, $args);
  34. unset($element['#value']);
  35. return theme('html_tag', $variables);
  36. }