Commit e7d4b5de authored by Miguel Guerreiro's avatar Miguel Guerreiro Committed by Damien McKenna
Browse files

Issue #3077773 by gueguerreiro, cindytwilliams, DamienMcKenna: Add new meta...

Issue #3077773 by gueguerreiro, cindytwilliams, DamienMcKenna: Add new meta tags: rel=prev / rel=next.
parent 32758e7e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -10,6 +10,8 @@ Metatag 8.x-1.x-dev, xxxx-xx-xx
  name of the favicons submodule.
#3077780 by thejimbirch, volkswagenchick, DamienMcKenna: Add new meta tag:
  Google's new "handheld" link alternate URL.
#3077773 by gueguerreiro, cindytwilliams, DamienMcKenna: Add new meta tags:
  rel=prev / rel=next.


Metatag 8.x-1.10, 2019-08-29
+6 −0
Original line number Diff line number Diff line
@@ -26,9 +26,15 @@ metatag.metatag_tag.keywords:
metatag.metatag_tag.news_keywords:
  type: label
  label: 'Google News Keywords'
metatag.metatag_tag.next:
  type: label
  label: 'Next page URL'
metatag.metatag_tag.original_source:
  type: label
  label: 'Original source'
metatag.metatag_tag.prev:
  type: label
  label: 'Previous page URL'
metatag.metatag_tag.rating:
  type: label
  label: 'Rating'
+22 −0
Original line number Diff line number Diff line
<?php

namespace Drupal\metatag\Plugin\metatag\Tag;

/**
 * Provides a plugin for the 'next' meta tag.
 *
 * @MetatagTag(
 *   id = "next",
 *   label = @Translation("Next page URL"),
 *   description = @Translation("Used for paginated content by providing URL with rel='next' link."),
 *   name = "next",
 *   group = "advanced",
 *   weight = 2,
 *   type = "uri",
 *   secure = FALSE,
 *   multiple = FALSE
 * )
 */
class Next extends LinkRelBase {
  // Nothing here yet. Just a placeholder class for a plugin.
}
+22 −0
Original line number Diff line number Diff line
<?php

namespace Drupal\metatag\Plugin\metatag\Tag;

/**
 * Provides a plugin for the 'prev' meta tag.
 *
 * @MetatagTag(
 *   id = "prev",
 *   label = @Translation("Previous page URL"),
 *   description = @Translation("Used for paginated content by providing URL with rel='prev' link."),
 *   name = "prev",
 *   group = "advanced",
 *   weight = 2,
 *   type = "uri",
 *   secure = FALSE,
 *   multiple = FALSE
 * )
 */
class Prev extends LinkRelBase {
  // Nothing here yet. Just a placeholder class for a plugin.
}
+2 −4
Original line number Diff line number Diff line
@@ -101,13 +101,11 @@ class MetatagD7Entities extends ProcessPluginBase {
      'image_src' => 'image_src',
      'keywords' => 'keywords',
      'news_keywords' => 'news_keywords',
      // @todo https://www.drupal.org/project/metatag/issues/3077773
      // 'next' => '',
      'next' => 'next',
      'original-source' => 'original_source',
      // @todo https://www.drupal.org/project/metatag/issues/3077772
      // 'pragma' => '',
      // @todo https://www.drupal.org/project/metatag/issues/3077773
      // 'prev' => '',
      'prev' => 'prev',
      'rating' => 'rating',
      'referrer' => 'referrer',
      // @todo https://www.drupal.org/project/metatag/issues/3077774
Loading