metatag_app_links.metatag.inc 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <?php
  2. /**
  3. * @file
  4. * Metatag integration for the Metatag:App Links module.
  5. */
  6. /**
  7. * Implements hook_metatag_info().
  8. */
  9. function metatag_app_links_metatag_info() {
  10. $info['groups']['app_links'] = array(
  11. 'label' => t('App Links'),
  12. 'description' => t('Meta tags used to expose App Links for app deep linking. See <a href="@url">applinks.org</a> for details and documentation.', array('@url' => 'http://applinks.org')),
  13. 'form' => array(
  14. '#weight' => 90,
  15. ),
  16. );
  17. // Default values for each meta tag.
  18. $defaults = array(
  19. 'description' => '',
  20. 'class' => 'DrupalTextMetaTag',
  21. 'group' => 'app_links',
  22. 'element' => array(
  23. '#theme' => 'metatag_property',
  24. ),
  25. );
  26. // Stack these codes after most others.
  27. $weight = 80;
  28. $info['tags']['al:android:package'] = array(
  29. 'label' => t('Android App Package ID'),
  30. 'description' => t('A fully-qualified package name for intent generation. <strong>This attribute is required by the App Links specification.</strong>'),
  31. 'weight' => ++$weight,
  32. ) + $defaults;
  33. $info['tags']['al:android:url'] = array(
  34. 'label' => t('Android App URL scheme'),
  35. 'description' => t('A custom scheme for the Android app.'),
  36. ) + $defaults;
  37. $info['tags']['al:android:class'] = array(
  38. 'label' => t('Android App Activity Class'),
  39. 'description' => t('A fully-qualified Activity class name for intent generation.'),
  40. ) + $defaults;
  41. $info['tags']['al:android:app_name'] = array(
  42. 'label' => t('Android App Name'),
  43. 'description' => t('The name of the app (suitable for display)'),
  44. ) + $defaults;
  45. $info['tags']['al:ios:url'] = array(
  46. 'label' => t('iOS App URL scheme'),
  47. 'description' => t('A custom scheme for the iOS app. <strong>This attribute is required by the App Links specification.</strong>'),
  48. ) + $defaults;
  49. $info['tags']['al:ios:app_store_id'] = array(
  50. 'label' => t('iOS App Store ID'),
  51. 'description' => t('The app ID for the App Store.'),
  52. 'devel_generate' => array(
  53. 'type' => 'integer',
  54. ),
  55. ) + $defaults;
  56. $info['tags']['al:ios:app_name'] = array(
  57. 'label' => t('iOS App Name'),
  58. 'description' => t('The name of the app (suitable for display)'),
  59. ) + $defaults;
  60. $info['tags']['al:ipad:url'] = array(
  61. 'label' => t('iPad App URL scheme'),
  62. 'description' => t('A custom scheme for the iPad app. <strong>This attribute is required by the App Links specification.</strong>'),
  63. ) + $defaults;
  64. $info['tags']['al:ipad:app_store_id'] = array(
  65. 'label' => t('iPad App Store ID'),
  66. 'description' => t('The app ID for the App Store.'),
  67. 'devel_generate' => array(
  68. 'type' => 'integer',
  69. ),
  70. ) + $defaults;
  71. $info['tags']['al:ipad:app_name'] = array(
  72. 'label' => t('iPad App Name'),
  73. 'description' => t('The name of the app (suitable for display)'),
  74. ) + $defaults;
  75. $info['tags']['al:iphone:url'] = array(
  76. 'label' => t('iPhone App URL'),
  77. 'description' => t('A custom scheme for the iPhone app. <strong>This attribute is required by the App Links specification.</strong>'),
  78. ) + $defaults;
  79. $info['tags']['al:iphone:app_store_id'] = array(
  80. 'label' => t('iPhone App Store ID'),
  81. 'description' => t('The app ID for the App Store.'),
  82. 'devel_generate' => array(
  83. 'type' => 'integer',
  84. ),
  85. ) + $defaults;
  86. $info['tags']['al:iphone:app_name'] = array(
  87. 'label' => t('iPhone App Name'),
  88. 'description' => t('The name of the app (suitable for display)'),
  89. ) + $defaults;
  90. $info['tags']['al:windows_phone:url'] = array(
  91. 'label' => t('Windows Phone App URL scheme'),
  92. 'description' => t('A custom scheme for the Windows Phone app. <strong>This attribute is required by the App Links specification.</strong>'),
  93. ) + $defaults;
  94. $info['tags']['al:windows_phone:app_id'] = array(
  95. 'label' => t('Windows Phone App GUID'),
  96. 'description' => t('The app ID (a GUID) for app store.'),
  97. ) + $defaults;
  98. $info['tags']['al:windows_phone:app_name'] = array(
  99. 'label' => t('Windows Phone App Name'),
  100. 'description' => t('The name of the app (suitable for display)'),
  101. ) + $defaults;
  102. $info['tags']['al:windows:url'] = array(
  103. 'label' => t('Windows App URL scheme'),
  104. 'description' => t('A custom scheme for the Windows app. <strong>This attribute is required by the App Links specification.</strong>'),
  105. ) + $defaults;
  106. $info['tags']['al:windows:app_id'] = array(
  107. 'label' => t('Windows App GUID'),
  108. 'description' => t('The app ID (a GUID) for app store.'),
  109. ) + $defaults;
  110. $info['tags']['al:windows:app_name'] = array(
  111. 'label' => t('Windows App Name'),
  112. 'description' => t('The name of the app (suitable for display)'),
  113. ) + $defaults;
  114. $info['tags']['al:windows_universal:url'] = array(
  115. 'label' => t('Windows Universal App URL scheme'),
  116. 'description' => t('A custom scheme for the Windows Universal app. <strong>This attribute is required by the App Links specification.</strong>'),
  117. ) + $defaults;
  118. $info['tags']['al:windows_universal:app_id'] = array(
  119. 'label' => t('Windows Universal App GUID'),
  120. 'description' => t('The app ID (a GUID) for app store.'),
  121. ) + $defaults;
  122. $info['tags']['al:windows_universal:app_name'] = array(
  123. 'label' => t('Windows Universal App Name'),
  124. 'description' => t('The name of the app (suitable for display)'),
  125. ) + $defaults;
  126. $info['tags']['al:web:url'] = array(
  127. 'label' => t('Web URL'),
  128. 'description' => t('The web URL; defaults to the URL for the content that contains this tag.'),
  129. ) + $defaults;
  130. $info['tags']['al:web:should_fallback'] = array(
  131. 'label' => t('Should fallback'),
  132. 'description' => t('Indicates if the web URL should be used as a fallback; defaults to "true".'),
  133. ) + $defaults;
  134. return $info;
  135. }