Skip to content
Snippets Groups Projects
Commit 2f14b737 authored by Kevin Paxman's avatar Kevin Paxman Committed by Lily Yan
Browse files

EXPHR: provide the media item title to the theming

parent 205b92e1
No related branches found
No related tags found
1 merge request!259ISTWCMS-7251: provide the media item title to the theming
...@@ -63,6 +63,9 @@ class UwCblRemoteVideoEventSubscriber extends UwCblBase implements EventSubscrib ...@@ -63,6 +63,9 @@ class UwCblRemoteVideoEventSubscriber extends UwCblBase implements EventSubscrib
// Set the remote video URL. // Set the remote video URL.
$remote_video['view']['url'] = $media->field_media_oembed_video->value; $remote_video['view']['url'] = $media->field_media_oembed_video->value;
// Set the remote video title.
$remote_video['view']['title'] = $media->label();
// Check for YouTube. // Check for YouTube.
if (preg_match('/^https?:\/\/(?:(?:www\.)?youtube(?:-nocookie)?\.com\/(?:watch\?(?:\S+&)?v=|embed\/|.+#.+\/)|youtu\.be\/)(?:[\w\-]{11})(?:[#&?]\S*)?$/', $remote_video['view']['url'])) { if (preg_match('/^https?:\/\/(?:(?:www\.)?youtube(?:-nocookie)?\.com\/(?:watch\?(?:\S+&)?v=|embed\/|.+#.+\/)|youtu\.be\/)(?:[\w\-]{11})(?:[#&?]\S*)?$/', $remote_video['view']['url'])) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment