Commit bf7becfe authored by Jacob Rockowitz's avatar Jacob Rockowitz Committed by Damien McKenna
Browse files

Issue #3074603 by jrockowitz, thejimbirch, cindytwilliams, DamienMcKenna: Add...

Issue #3074603 by jrockowitz, thejimbirch, cindytwilliams, DamienMcKenna: Add og:video:duration tag.
parent 3be61e3c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
Metatag 8.x-1.x-dev, xxxx-xx-xx
-------------------------------
#3074603 by jrockowitz, thejimbirch, cindytwilliams, DamienMcKenna: Add
  og:video:duration tag.


Metatag 8.x-1.10, 2019-08-29
+3 −0
Original line number Diff line number Diff line
@@ -86,6 +86,9 @@ metatag.metatag_tag.og_url:
metatag.metatag_tag.og_video:
  type: label
  label: 'Open Graph: Video URL'
metatag.metatag_tag.og_video_duration:
  type: label
  label: 'Open Graph: Video duration'
metatag.metatag_tag.og_video_height:
  type: label
  label: 'Open Graph: Video height'
+24 −0
Original line number Diff line number Diff line
<?php

namespace Drupal\metatag_open_graph\Plugin\metatag\Tag;

use Drupal\metatag\Plugin\metatag\Tag\MetaPropertyBase;

/**
 * Provides a plugin for the 'og:video:duration' meta tag.
 *
 * @MetatagTag(
 *   id = "og_video_duration",
 *   label = @Translation("Video duration (seconds)"),
 *   description = @Translation("The length of the video in seconds"),
 *   name = "og:video:duration",
 *   group = "open_graph",
 *   weight = 15,
 *   type = "integer",
 *   secure = FALSE,
 *   multiple = FALSE
 * )
 */
class OgVideoDuration extends MetaPropertyBase {
  // Nothing here yet. Just a placeholder class for a plugin.
}
+1 −0
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ class MetatagOpenGraphTagsTest extends MetatagTagsTestBase {
    'og_video_secure_url',
    'og_video_type',
    'og_video_width',
    'og_video_duration',
  ];

  /**
+2 −0
Original line number Diff line number Diff line
@@ -337,6 +337,8 @@ class MetatagD7Entities extends ProcessPluginBase {
      'og:updated_time' => 'og_updated_time',
      'og:url' => 'og_url',
      // @todo '' => 'og_video',
      // https://www.drupal.org/project/metatag/issues/3089445
      // @todo '' => 'og_video_duration',
      'og:video:height' => 'og_video_height',
      'og:video:secure_url' => 'og_video_secure_url',
      'og:video:type' => 'og_video_type',