diff --git a/metatags_quick.module b/metatags_quick.module
index daefc9bc894ec2c26a7369afdf45d18a69d8cd68..c6e9d507265502935c60218209feccb505946c10 100644
--- a/metatags_quick.module
+++ b/metatags_quick.module
@@ -71,6 +71,15 @@ function metatags_quick_permission() {
);
}
+/**
+ * Implements hook_views_api().
+ */
+function metatags_quick_views_api() {
+ return array(
+ 'api' => 3,
+ );
+}
+
/**
* Implements hook_entity_info().
*/
@@ -485,7 +494,7 @@ function _metatags_quick_add_head($item = FALSE) {
$content = preg_replace('/<\/a>, $head_element) {
- // If an existing key starts with 'drupal_add_html_head_link:[name]', unset it.
+ // If an existing key starts with 'drupal_add_html_head_link:[name]', unset it.
if (strpos($key, 'drupal_add_html_head_link:' . $item['name']) === 0) {
- $head_elements[$key]['#access'] = FALSE;
- }
+ $head_elements[$key]['#access'] = FALSE;
+ }
}
$attributes = array(
'rel' => $item['name'],
diff --git a/metatags_quick.views.inc b/metatags_quick.views.inc
new file mode 100644
index 0000000000000000000000000000000000000000..d6fb30cbd6419aa09894566760fbbebae41a7c81
--- /dev/null
+++ b/metatags_quick.views.inc
@@ -0,0 +1,25 @@
+display_handler instanceof views_plugin_display_page) && $view->display_handler->has_path() && ($view->get_path() == 'taxonomy/term/%')) {
+
+ $term = taxonomy_term_load($view->args[0]);
+ $fields = field_info_instances('taxonomy_term', $term->vocabulary_machine_name);
+
+ foreach ($fields as $name => $instance) {
+ $settings = field_get_display($instance, 'full', 'taxonomy_term');
+ // Check for fields which use this module for display, and render them.
+ if ($settings['module'] = 'metatags_quick') {
+ field_view_field('taxonomy_term', $term, $name, $settings);
+ }
+ }
+ }
+}