metatag_google_cse.metatag.inc 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. /**
  3. * @file
  4. * Metatag integration for the Metatag:Google CSE.
  5. */
  6. /**
  7. * Implements hook_metatag_info().
  8. */
  9. function metatag_google_cse_metatag_info() {
  10. $info['groups']['google_cse'] = array(
  11. 'label' => t('Google Custom Search Engine (CSE)'),
  12. 'description' => t("Meta tags used to control the mobile browser experience. Some of these meta tags have been replaced by newer mobile browsers. These meta tags usually only need to be set globally, rather than per-page."),
  13. 'form' => array(
  14. '#weight' => 80,
  15. ),
  16. );
  17. $weight = 80;
  18. // Default values for each meta tag.
  19. $tag_info_defaults = array(
  20. 'class' => 'DrupalTextMetaTag',
  21. 'group' => 'google_cse',
  22. 'element' => array(
  23. '#theme' => 'metatag_google_cse',
  24. ),
  25. );
  26. $info['tags']['thumbnail'] = array(
  27. 'label' => t('Thumbnail'),
  28. 'description' => t('Use a url of a valid image.'),
  29. 'image' => TRUE,
  30. 'weight' => ++$weight,
  31. ) + $tag_info_defaults;
  32. $info['tags']['department'] = array(
  33. 'label' => t('Department'),
  34. 'description' => t('Department tag.'),
  35. 'weight' => ++$weight,
  36. ) + $tag_info_defaults;
  37. $info['tags']['audience'] = array(
  38. 'label' => t('Content audience'),
  39. 'description' => t('The content audience, e.g. "all".'),
  40. 'weight' => ++$weight,
  41. ) + $tag_info_defaults;
  42. $info['tags']['doc_status'] = array(
  43. 'label' => t('Document status'),
  44. 'description' => t('The document status, e.g. "draft".'),
  45. 'weight' => ++$weight,
  46. ) + $tag_info_defaults;
  47. $info['tags']['google_rating'] = array(
  48. 'label' => t('Results sorting'),
  49. 'description' => t('Works only with numeric values.'),
  50. 'weight' => ++$weight,
  51. ) + $tag_info_defaults;
  52. return $info;
  53. }