metatag_verification.metatag.inc 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /**
  3. * @file
  4. * Metatag integration for the Metatag: Verification module.
  5. */
  6. /**
  7. * Implements hook_metatag_info().
  8. */
  9. function metatag_verification_metatag_info() {
  10. $info['groups']['verification'] = array(
  11. 'label' => t('Site verification'),
  12. 'description' => t('These meta tags are used to confirm site ownership with search engines and other services.'),
  13. 'form' => array(
  14. '#weight' => 110,
  15. ),
  16. );
  17. // Stack the verification codes after most others.
  18. $weight = 100;
  19. // Defaults used for all meta tags.
  20. $defaults = array(
  21. 'class' => 'DrupalTextMetaTag',
  22. 'context' => array('global'),
  23. 'group' => 'verification',
  24. );
  25. $info['tags']['google-site-verification'] = array(
  26. 'label' => t('Google'),
  27. 'description' => t('A string provided by <a href="https://www.google.com/">Google</a>.'),
  28. 'weight' => ++$weight,
  29. ) + $defaults;
  30. $info['tags']['p:domain_verify'] = array(
  31. 'label' => t('Pinterest'),
  32. 'description' => t('A string provided by <a href="@pinterest">Pinterest</a>, full details are available from the <a href="@verify_url">Pinterest online help</a>.', array('@pinterest' => 'https://www.pinterest.com/', '@verify_url' => 'https://help.pinterest.com/en/articles/verify-your-website')),
  33. 'weight' => ++$weight,
  34. ) + $defaults;
  35. $info['tags']['msvalidate.01'] = array(
  36. 'label' => t('Bing'),
  37. 'description' => t('A string provided by <a href="@bing">Bing</a>, full details are available from the <a href="@verify_url">Bing online help</a>.', array('@bing' => 'http://www.bing.com/', '@verify_url' => 'http://www.bing.com/webmaster/help/how-to-verify-ownership-of-your-site-afcfefc6')),
  38. 'weight' => ++$weight,
  39. ) + $defaults;
  40. $info['tags']['yandex-verification'] = array(
  41. 'label' => t('Yandex'),
  42. 'description' => t('A string provided by <a href="@yandex">Yandex</a>, full details are available from the <a href="@verify_url">Yandex online help</a>.', array('@yandex' => 'http://www.yandex.com/', '@verify_url' => 'http://api.yandex.com/webmaster/doc/dg/reference/hosts-type.xml')),
  43. 'weight' => ++$weight,
  44. ) + $defaults;
  45. return $info;
  46. }