Changeset 1577492
- Timestamp:
- 01/18/2017 06:30:13 PM (9 years ago)
- Location:
- responsive-video-light/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
responsive-video-light.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
responsive-video-light/trunk/readme.txt
r1573615 r1577492 23 23 Example Usage: 24 24 25 For a YouTube video, you can specify either the full URL to the video or just the unique video ID, like this:25 For a YouTube video, you can specify either full URL to the video or just the unique video ID, or the YouTube sharing or embed URLs, like this: 26 26 27 27 [responsive_youtube http://www.youtube.com/watch?v=NbCr0UyoFJA ] 28 28 [responsive_youtube NbCr0UyoFJA] 29 [responsive_youtube https://youtu.be//NbCr0UyoFJA ] 30 [responsive_youtube https://www.youtube.com/embed/NbCr0UyoFJA ] 29 31 30 32 And if you want to specify whether or not you'd like the "related videos" to display, you can use the "rel" or "norel" parameters in the shortcode syntax, like this: … … 79 81 80 82 == Changelog == 83 84 = 1.5.2 = 85 * Add support for youtu.be sharing URL 86 * Can also use the embed URL, but of course not the whoe embed code. 87 88 = 1.5.1 = 89 * Remove final Twig vestige, update compatibility string 81 90 82 91 = 1.5.0 = -
responsive-video-light/trunk/responsive-video-light.php
r1573615 r1577492 221 221 if (preg_match('/^http[s]?:\/\/.*(v=([-0-9a-zA-Z_]*)).*$/', $attribute, $matches)) { 222 222 $video_id = $matches[2]; 223 } elseif (preg_match('/^http[s]?:\/\/youtu.be\/([-0-9a-zA-Z_]*)/', $attribute, $matches)) { 224 $video_id = $matches[1]; 225 } elseif (preg_match('/^http[s]?:\/\/www.youtube.com\/embed\/([-0-9a-zA-Z_]*)/', $attribute, $matches)) { 226 $video_id = $matches[1]; 223 227 } elseif (preg_match('/^[-0-9a-zA-Z_]*$/', $attribute)) { 224 228 $video_id = $attribute;
Note: See TracChangeset
for help on using the changeset viewer.