YouTube Embed - Version 1.3

Version Description

  • Added transparency option so that videos won't cover up layers

=

Download this release

Release Info

Developer dartiss
Plugin Icon 128x128 YouTube Embed
Version 1.3
Comparing to
See all releases

Code changes from version 1.2 to 1.3

Files changed (2) hide show
  1. readme.txt +8 -2
  2. youtube-embed.php +4 -3
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: dartiss
3
  Donate link: http://tinyurl.com/bdc4uu
4
  Tags: YouTube, XHTML, Video, Embed, Playlist, Thumbnail
5
  Requires at least: 2.0
6
- Tested up to: 3.0
7
- Stable tag: 1.2
8
 
9
  YouTube Embed is a powerful, but simple to use, method of embedding YouTube videos in your WordPress theme.
10
 
@@ -158,6 +158,9 @@ Feel free to report any problems, or suggestions for enhancements, to me either
158
  = 1.2 =
159
  * Minor changes to the XHTML code to prevent warnings from certain validators
160
 
 
 
 
161
  == Upgrade Notice ==
162
 
163
  = 1.0 =
@@ -169,6 +172,9 @@ Feel free to report any problems, or suggestions for enhancements, to me either
169
  = 1.2 =
170
  * Update to ensure no warnings are reported by XHTML validators
171
 
 
 
 
172
  == Parameters ==
173
 
174
  The following parameters can be specified for any embedded YouTube video. Some of these will also work with playlists but, due to a lack of YouTube documentation on the subject, I'm unable to say which they are.
3
  Donate link: http://tinyurl.com/bdc4uu
4
  Tags: YouTube, XHTML, Video, Embed, Playlist, Thumbnail
5
  Requires at least: 2.0
6
+ Tested up to: 3.0.1
7
+ Stable tag: 1.3
8
 
9
  YouTube Embed is a powerful, but simple to use, method of embedding YouTube videos in your WordPress theme.
10
 
158
  = 1.2 =
159
  * Minor changes to the XHTML code to prevent warnings from certain validators
160
 
161
+ = 1.3 =
162
+ * Added transparency option so that videos won't cover up layers
163
+
164
  == Upgrade Notice ==
165
 
166
  = 1.0 =
172
  = 1.2 =
173
  * Update to ensure no warnings are reported by XHTML validators
174
 
175
+ = 1.3 =
176
+ * Update if you find that the videos are covering up layers
177
+
178
  == Parameters ==
179
 
180
  The following parameters can be specified for any embedded YouTube video. Some of these will also work with playlists but, due to a lack of YouTube documentation on the subject, I'm unable to say which they are.
youtube-embed.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: YouTube Embed
4
  Plugin URI: http://www.artiss.co.uk/youtube-embed
5
  Description: Embed YouTube Videos in WordPress
6
- Version: 1.2
7
  Author: David Artiss
8
  Author URI: http://www.artiss.co.uk
9
  */
@@ -83,7 +83,7 @@ function youtube_short_url($id) {return "http://youtu.be/".$id;}
83
 
84
  // Generate XHTML compatible YouTube embed code
85
  function generate_youtube_code($id,$type,$width,$height,$fullscreen,$related,$autoplay,$loop,$egm,$border,$color1,$color2,$start,$hd,$search,$info,$annotation,$cc,$style,$widget="") {
86
- $version=1.2;
87
  // Ensure an ID is passed
88
  if (($id=="")&&(strtolower($widget)!="yes")) {
89
  return youtube_embed_error("No video/playlist ID has been supplied");
@@ -128,8 +128,9 @@ function generate_youtube_code($id,$type,$width,$height,$fullscreen,$related,$au
128
  // Write out code
129
  $result="<!-- YouTube Embed v".$version." | http://www.artiss.co.uk/youtube-embed -->\n";
130
  if ($style!="") {$result.="<div style=\"".$style."\">\n";}
131
- $result.="<object type=\"application/x-shockwave-flash\" data=\"http://www.youtube.com/".$type."/".$id.$paras."\" width=\"".$width."\" height=\"".$height."\">\n";
132
  $result.="<param name=\"movie\" value=\"http://www.youtube.com/".$type."/".$id.$paras."\" />\n";
 
133
  if ($fullscreen==1) {$result.="<param name=\"allowFullScreen\" value=\"true\" />\n";}
134
  $result.="</object>\n";
135
  if ($style!="") {$result.="</div>\n";}
3
  Plugin Name: YouTube Embed
4
  Plugin URI: http://www.artiss.co.uk/youtube-embed
5
  Description: Embed YouTube Videos in WordPress
6
+ Version: 1.3
7
  Author: David Artiss
8
  Author URI: http://www.artiss.co.uk
9
  */
83
 
84
  // Generate XHTML compatible YouTube embed code
85
  function generate_youtube_code($id,$type,$width,$height,$fullscreen,$related,$autoplay,$loop,$egm,$border,$color1,$color2,$start,$hd,$search,$info,$annotation,$cc,$style,$widget="") {
86
+ $version=1.3;
87
  // Ensure an ID is passed
88
  if (($id=="")&&(strtolower($widget)!="yes")) {
89
  return youtube_embed_error("No video/playlist ID has been supplied");
128
  // Write out code
129
  $result="<!-- YouTube Embed v".$version." | http://www.artiss.co.uk/youtube-embed -->\n";
130
  if ($style!="") {$result.="<div style=\"".$style."\">\n";}
131
+ $result.="<object type=\"application/x-shockwave-flash\" data=\"http://www.youtube.com/".$type."/".$id.$paras."\" width=\"".$width."\" height=\"".$height."\" wmode=\"transparent\">\n";
132
  $result.="<param name=\"movie\" value=\"http://www.youtube.com/".$type."/".$id.$paras."\" />\n";
133
+ $result.="<param name=\"wmode\" value=\"transparent\" />\n";
134
  if ($fullscreen==1) {$result.="<param name=\"allowFullScreen\" value=\"true\" />\n";}
135
  $result.="</object>\n";
136
  if ($style!="") {$result.="</div>\n";}