YouTube Embed - Version 1.4.1

Version Description

  • HD option is available with EmbedPlus - updated the admin and widget screen to reflect this

=

Download this release

Release Info

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

Code changes from version 1.4 to 1.4.1

readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://artiss.co.uk/donate
4
  Tags: YouTube, embed, XHTML, video, playlist, thumbnail, EmbedPlus, widget, shortcode
5
  Requires at least: 2.0
6
  Tested up to: 3.1
7
- Stable tag: 1.4
8
 
9
  YouTube Embed is a powerful, but simple to use, method of embedding YouTube videos in your WordPress theme.
10
 
@@ -164,6 +164,7 @@ The following parameters can be specified for any embedded YouTube video. Some o
164
  The following work with a standard video/playlist and an EmbedPlus video...
165
 
166
  * *embedplus* - yes or no, whether you wish to use EmbedPlus
 
167
  * *width* - the width of the video in pixels
168
  * *height* - the height of the video in pixels
169
  * *fullscreen* - yes or no, this adds a button to the video player, allowing the video to be shown fullscreen
@@ -171,10 +172,9 @@ The following work with a standard video/playlist and an EmbedPlus video...
171
 
172
  The following only work with the standard video/playlist embedding...
173
 
174
- * *border* - yes or show, this is whether you wish the border to be shown
175
- * *hd* - yes or no, this determines whether a video defaults to HD quality, if available
176
  * *color1* - this is 1 of 2 colors that can be used on the video player. It is in a hex RGB format, and should be 6 letters long.
177
  * *color2* - this is the second video player colour. Again, this is a hex RGB format.
 
178
  * *autoplay* - yes or no, this specifies whether the video automatically starts to play
179
  * *loop* - yes or no, this specifies whether the video loops back to the beginning once it completes
180
  * *cc* - yes or no, this turns on or off closed captions (subtitles)
@@ -209,6 +209,10 @@ Alternatively, please [contact me directly](http://www.artiss.co.uk/contact "Con
209
 
210
  **This plugin, and all support, is supplied for free, but [donations](http://artiss.co.uk/donate "Donate") are always welcome.**
211
 
 
 
 
 
212
  == Installation ==
213
 
214
  1. Upload the entire `youtube-embed` folder to your `wp-content/plugins/` directory.
@@ -260,6 +264,9 @@ It has been tested and been found valid from PHP 4 upwards.
260
  * Added functions and shortcodes for returning and outputting available transcripts
261
  * Tidied up code
262
 
 
 
 
263
  == Upgrade Notice ==
264
 
265
  = 1.0 =
@@ -278,4 +285,7 @@ It has been tested and been found valid from PHP 4 upwards.
278
  * Update if you wish to change the widget heading
279
 
280
  = 1.4 =
281
- * Update to add EmbedPlus, multi-widgets and transcript output capabilities
 
 
 
4
  Tags: YouTube, embed, XHTML, video, playlist, thumbnail, EmbedPlus, widget, shortcode
5
  Requires at least: 2.0
6
  Tested up to: 3.1
7
+ Stable tag: 1.4.1
8
 
9
  YouTube Embed is a powerful, but simple to use, method of embedding YouTube videos in your WordPress theme.
10
 
164
  The following work with a standard video/playlist and an EmbedPlus video...
165
 
166
  * *embedplus* - yes or no, whether you wish to use EmbedPlus
167
+ * *hd* - yes or no, this determines whether a video defaults to HD quality, if available
168
  * *width* - the width of the video in pixels
169
  * *height* - the height of the video in pixels
170
  * *fullscreen* - yes or no, this adds a button to the video player, allowing the video to be shown fullscreen
172
 
173
  The following only work with the standard video/playlist embedding...
174
 
 
 
175
  * *color1* - this is 1 of 2 colors that can be used on the video player. It is in a hex RGB format, and should be 6 letters long.
176
  * *color2* - this is the second video player colour. Again, this is a hex RGB format.
177
+ * *border* - yes or show, this is whether you wish the border to be shown
178
  * *autoplay* - yes or no, this specifies whether the video automatically starts to play
179
  * *loop* - yes or no, this specifies whether the video loops back to the beginning once it completes
180
  * *cc* - yes or no, this turns on or off closed captions (subtitles)
209
 
210
  **This plugin, and all support, is supplied for free, but [donations](http://artiss.co.uk/donate "Donate") are always welcome.**
211
 
212
+ == Reviews & Mentions ==
213
+
214
+ [New Technology Finds The Most Buzzed-About Parts Of Videos](http://www.socialtimes.com/2011/03/new-technology-finds-the-most-buzzed-about-parts-of-videos-interview/ "New Technology Finds The Most Buzzed-About Parts Of Videos") - SocialTimes.
215
+
216
  == Installation ==
217
 
218
  1. Upload the entire `youtube-embed` folder to your `wp-content/plugins/` directory.
264
  * Added functions and shortcodes for returning and outputting available transcripts
265
  * Tidied up code
266
 
267
+ = 1.4.1 =
268
+ * HD option is available with EmbedPlus - updated the admin and widget screen to reflect this
269
+
270
  == Upgrade Notice ==
271
 
272
  = 1.0 =
285
  * Update if you wish to change the widget heading
286
 
287
  = 1.4 =
288
+ * Update to add EmbedPlus, multi-widgets and transcript output capabilities
289
+
290
+ = 1.4.1 =
291
+ * Upgrade to make a small correction to the parameter lists
screenshot-1.png CHANGED
Binary file
youtube-embed-options.php CHANGED
@@ -52,6 +52,12 @@ if (!is_array($options)) {
52
  <option value="v"<?php if ($options['type']=="v") {echo " selected='selected'";} ?>><?php _e('Standard'); ?></option>
53
  <option value="m"<?php if ($options['type']=="m") {echo " selected='selected'";} ?>><?php _e('EmbedPlus'); ?></option>
54
  </select></td>
 
 
 
 
 
 
55
  </tr><tr>
56
 
57
  <th scope="row"><?php _e('Style Information'); ?></th>
@@ -78,19 +84,6 @@ if (!is_array($options)) {
78
  <th style="font-weight: bold" scope="row"><?php _e('Standard Video/Playlist Only'); ?></th>
79
  </tr><tr>
80
 
81
- <th scope="row"><?php _e('Show Border'); ?></th>
82
- <td><select name="youtube_embed_border">
83
- <option value="0"<?php if ($options['border']=="0") {echo " selected='selected'";} ?>><?php _e('No'); ?></option>
84
- <option value="1"<?php if ($options['border']=="1") {echo " selected='selected'";} ?>><?php _e('Yes'); ?></option>
85
- </select></td>
86
-
87
- <th scope="row"><?php _e('Default to HD Quality'); ?></th>
88
- <td colspan="2"><select name="youtube_embed_hd">
89
- <option value="0"<?php if ($options['hd']=="0") {echo " selected='selected'";} ?>><?php _e('No'); ?></option>
90
- <option value="1"<?php if ($options['hd']=="1") {echo " selected='selected'";} ?>><?php _e('Yes'); ?></option>
91
- </select> (if available)</td>
92
- </tr><tr>
93
-
94
  <th scope="row"><?php _e('Color 1'); ?></th>
95
  <td>#<input type="text" size="6" maxlength="6" name="youtube_embed_color1" value="<?php echo $options['color1']; ?>"/>&nbsp;<span style="padding-right: 16px; background-color: #<?php echo $options['color1']; ?>">&nbsp;</span></td>
96
 
@@ -98,57 +91,63 @@ if (!is_array($options)) {
98
  <td>#<input type="text" size="6" maxlength="6" name="youtube_embed_color2" value="<?php echo $options['color2']; ?>"/>&nbsp;<span style="padding-right: 16px; background-color: #<?php echo $options['color2'] ?>">&nbsp;</span></td>
99
  </tr><tr>
100
 
 
 
 
 
 
 
101
  <th scope="row"><?php _e('Autoplay'); ?></th>
102
  <td><select name="youtube_embed_autoplay">
103
  <option value="0"<?php if ($options['autoplay']=="0") {echo " selected='selected'";} ?>><?php _e('No'); ?></option>
104
  <option value="1"<?php if ($options['autoplay']=="1") {echo " selected='selected'";} ?>><?php _e('Yes'); ?></option>
105
  </select></td>
 
106
 
107
  <th scope="row"><?php _e('Loop Video'); ?></th>
108
  <td><select name="youtube_embed_loop">
109
  <option value="0"<?php if ($options['loop']=="0") {echo " selected='selected'";} ?>><?php _e('No'); ?></option>
110
  <option value="1"<?php if ($options['loop']=="1") {echo " selected='selected'";} ?>><?php _e('Yes'); ?></option>
111
  </select></td>
112
- </tr><tr>
113
 
114
  <th scope="row"><?php _e('Show Closed Captions'); ?></th>
115
  <td><select name="youtube_embed_cc">
116
  <option value="0"<?php if ($options['cc']=="0") {echo " selected='selected'";} ?>><?php _e('No'); ?></option>
117
  <option value="1"<?php if ($options['cc']=="1") {echo " selected='selected'";} ?>><?php _e('Yes'); ?></option>
118
  </select></td>
 
119
 
120
  <th scope="row"><?php _e('Show Annotations'); ?></th>
121
  <td><select name="youtube_embed_annotation">
122
  <option value="3"<?php if ($options['annotation']=="3") {echo " selected='selected'";} ?>><?php _e('No'); ?></option>
123
  <option value="1"<?php if ($options['annotation']=="1") {echo " selected='selected'";} ?>><?php _e('Yes'); ?></option>
124
  </select></td>
125
- </tr><tr>
126
 
127
  <th scope="row"><?php _e('Enable Enhanced Genie Menu'); ?></th>
128
  <td><select name="youtube_embed_egm">
129
  <option value="0"<?php if ($options['egm']=="0") {echo " selected='selected'";} ?>><?php _e('No'); ?></option>
130
  <option value="1"<?php if ($options['egm']=="1") {echo " selected='selected'";} ?>><?php _e('Yes'); ?></option>
131
  </select></td>
 
132
 
133
  <th scope="row"><?php _e('Show Related Videos'); ?></th>
134
  <td><select name="youtube_embed_related">
135
  <option value="0"<?php if ($options['related']=="0") {echo " selected='selected'";} ?>><?php _e('No'); ?></option>
136
  <option value="1"<?php if ($options['related']=="1") {echo " selected='selected'";} ?>><?php _e('Yes'); ?></option>
137
  </select></td>
138
- </tr><tr>
139
 
140
  <th scope="row"><?php _e('Show Video Information'); ?></th>
141
  <td><select name="youtube_embed_info">
142
  <option value="0"<?php if ($options['info']=="0") {echo " selected='selected'";} ?>><?php _e('No'); ?></option>
143
  <option value="1"<?php if ($options['info']=="1") {echo " selected='selected'";} ?>><?php _e('Yes'); ?></option>
144
  </select></td>
 
145
 
146
  <th scope="row"><?php _e('Show Search Box'); ?></th>
147
  <td><select name="youtube_embed_search">
148
  <option value="0"<?php if ($options['search']=="0") {echo " selected='selected'";} ?>><?php _e('No'); ?></option>
149
  <option value="1"<?php if ($options['search']=="1") {echo " selected='selected'";} ?>><?php _e('Yes'); ?></option>
150
  </select></td>
151
- </tr><tr>
152
 
153
  <th scope="row"><?php _e('Link back to YouTube'); ?></th>
154
  <td><select name="youtube_embed_link">
52
  <option value="v"<?php if ($options['type']=="v") {echo " selected='selected'";} ?>><?php _e('Standard'); ?></option>
53
  <option value="m"<?php if ($options['type']=="m") {echo " selected='selected'";} ?>><?php _e('EmbedPlus'); ?></option>
54
  </select></td>
55
+
56
+ <th scope="row"><?php _e('Default to HD Quality'); ?></th>
57
+ <td colspan="2"><select name="youtube_embed_hd">
58
+ <option value="0"<?php if ($options['hd']=="0") {echo " selected='selected'";} ?>><?php _e('No'); ?></option>
59
+ <option value="1"<?php if ($options['hd']=="1") {echo " selected='selected'";} ?>><?php _e('Yes'); ?></option>
60
+ </select> (if available)</td>
61
  </tr><tr>
62
 
63
  <th scope="row"><?php _e('Style Information'); ?></th>
84
  <th style="font-weight: bold" scope="row"><?php _e('Standard Video/Playlist Only'); ?></th>
85
  </tr><tr>
86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  <th scope="row"><?php _e('Color 1'); ?></th>
88
  <td>#<input type="text" size="6" maxlength="6" name="youtube_embed_color1" value="<?php echo $options['color1']; ?>"/>&nbsp;<span style="padding-right: 16px; background-color: #<?php echo $options['color1']; ?>">&nbsp;</span></td>
89
 
91
  <td>#<input type="text" size="6" maxlength="6" name="youtube_embed_color2" value="<?php echo $options['color2']; ?>"/>&nbsp;<span style="padding-right: 16px; background-color: #<?php echo $options['color2'] ?>">&nbsp;</span></td>
92
  </tr><tr>
93
 
94
+ <th scope="row"><?php _e('Show Border'); ?></th>
95
+ <td><select name="youtube_embed_border">
96
+ <option value="0"<?php if ($options['border']=="0") {echo " selected='selected'";} ?>><?php _e('No'); ?></option>
97
+ <option value="1"<?php if ($options['border']=="1") {echo " selected='selected'";} ?>><?php _e('Yes'); ?></option>
98
+ </select></td>
99
+
100
  <th scope="row"><?php _e('Autoplay'); ?></th>
101
  <td><select name="youtube_embed_autoplay">
102
  <option value="0"<?php if ($options['autoplay']=="0") {echo " selected='selected'";} ?>><?php _e('No'); ?></option>
103
  <option value="1"<?php if ($options['autoplay']=="1") {echo " selected='selected'";} ?>><?php _e('Yes'); ?></option>
104
  </select></td>
105
+ </tr><tr>
106
 
107
  <th scope="row"><?php _e('Loop Video'); ?></th>
108
  <td><select name="youtube_embed_loop">
109
  <option value="0"<?php if ($options['loop']=="0") {echo " selected='selected'";} ?>><?php _e('No'); ?></option>
110
  <option value="1"<?php if ($options['loop']=="1") {echo " selected='selected'";} ?>><?php _e('Yes'); ?></option>
111
  </select></td>
 
112
 
113
  <th scope="row"><?php _e('Show Closed Captions'); ?></th>
114
  <td><select name="youtube_embed_cc">
115
  <option value="0"<?php if ($options['cc']=="0") {echo " selected='selected'";} ?>><?php _e('No'); ?></option>
116
  <option value="1"<?php if ($options['cc']=="1") {echo " selected='selected'";} ?>><?php _e('Yes'); ?></option>
117
  </select></td>
118
+ </tr><tr>
119
 
120
  <th scope="row"><?php _e('Show Annotations'); ?></th>
121
  <td><select name="youtube_embed_annotation">
122
  <option value="3"<?php if ($options['annotation']=="3") {echo " selected='selected'";} ?>><?php _e('No'); ?></option>
123
  <option value="1"<?php if ($options['annotation']=="1") {echo " selected='selected'";} ?>><?php _e('Yes'); ?></option>
124
  </select></td>
 
125
 
126
  <th scope="row"><?php _e('Enable Enhanced Genie Menu'); ?></th>
127
  <td><select name="youtube_embed_egm">
128
  <option value="0"<?php if ($options['egm']=="0") {echo " selected='selected'";} ?>><?php _e('No'); ?></option>
129
  <option value="1"<?php if ($options['egm']=="1") {echo " selected='selected'";} ?>><?php _e('Yes'); ?></option>
130
  </select></td>
131
+ </tr><tr>
132
 
133
  <th scope="row"><?php _e('Show Related Videos'); ?></th>
134
  <td><select name="youtube_embed_related">
135
  <option value="0"<?php if ($options['related']=="0") {echo " selected='selected'";} ?>><?php _e('No'); ?></option>
136
  <option value="1"<?php if ($options['related']=="1") {echo " selected='selected'";} ?>><?php _e('Yes'); ?></option>
137
  </select></td>
 
138
 
139
  <th scope="row"><?php _e('Show Video Information'); ?></th>
140
  <td><select name="youtube_embed_info">
141
  <option value="0"<?php if ($options['info']=="0") {echo " selected='selected'";} ?>><?php _e('No'); ?></option>
142
  <option value="1"<?php if ($options['info']=="1") {echo " selected='selected'";} ?>><?php _e('Yes'); ?></option>
143
  </select></td>
144
+ </tr><tr>
145
 
146
  <th scope="row"><?php _e('Show Search Box'); ?></th>
147
  <td><select name="youtube_embed_search">
148
  <option value="0"<?php if ($options['search']=="0") {echo " selected='selected'";} ?>><?php _e('No'); ?></option>
149
  <option value="1"<?php if ($options['search']=="1") {echo " selected='selected'";} ?>><?php _e('Yes'); ?></option>
150
  </select></td>
 
151
 
152
  <th scope="row"><?php _e('Link back to YouTube'); ?></th>
153
  <td><select name="youtube_embed_link">
youtube-embed.php CHANGED
@@ -3,11 +3,11 @@
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.4
7
  Author: David Artiss
8
  Author URI: http://www.artiss.co.uk
9
  */
10
- define('youtube_embed_version','1.4');
11
 
12
  // Set up WordPress shortcodes and actions
13
  add_shortcode('youtube','youtube_video_sc');
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.4.1
7
  Author: David Artiss
8
  Author URI: http://www.artiss.co.uk
9
  */
10
+ define('youtube_embed_version','1.4.1');
11
 
12
  // Set up WordPress shortcodes and actions
13
  add_shortcode('youtube','youtube_video_sc');
youtube-widget-options.php CHANGED
@@ -20,6 +20,14 @@ echo '>'.__('Video (EmbedPlus)').'</option><option value="p"';
20
  if (attribute_escape( $instance['type'] )=="p") {echo " selected='selected'";}
21
  echo '>'.__('Playlist').'</option></select></p>';
22
 
 
 
 
 
 
 
 
 
23
  $field_id=$this->get_field_id('style');
24
  $field_name=$this->get_field_name('style');
25
  echo "\r\n".'<p><label for="'.$field_id.'">'.__('Style').': </label><input type="text" class="widefat" id="'.$field_id.'" name="'.$field_name.'" value="'.attribute_escape( $instance['style'] ).'" /></p>';
@@ -56,14 +64,6 @@ echo '>'.__('Yes').'</option><option value="0"';
56
  if (attribute_escape( $instance['border'] )=="0") {echo " selected='selected'";}
57
  echo '>'.__('No').'</option></select></p>';
58
 
59
- $field_id=$this->get_field_id('hd');
60
- $field_name=$this->get_field_name('hd');
61
- echo "\r\n".'<p><label for="'.$field_id.'">'.__('Default to HD Quality').': </label><select name="'.$field_name.'" class="widefat" id="'.$field_id.'"><option value="1"';
62
- if (attribute_escape( $instance['hd'] )=="1") {echo " selected='selected'";}
63
- echo '>'.__('Yes').'</option><option value="0"';
64
- if (attribute_escape( $instance['hd'] )=="0") {echo " selected='selected'";}
65
- echo '>'.__('No').'</option></select></p>';
66
-
67
  $field_id=$this->get_field_id('color1');
68
  $field_name=$this->get_field_name('color1');
69
  echo "\r\n".'<p><label for="'.$field_id.'">'.__('Color 1').': #</label><input type="text" size="6" maxlength="6" id="'.$field_id.'" name="'.$field_name.'" value="'.attribute_escape( $instance['color1'] ).'" /></p>';
20
  if (attribute_escape( $instance['type'] )=="p") {echo " selected='selected'";}
21
  echo '>'.__('Playlist').'</option></select></p>';
22
 
23
+ $field_id=$this->get_field_id('hd');
24
+ $field_name=$this->get_field_name('hd');
25
+ echo "\r\n".'<p><label for="'.$field_id.'">'.__('Default to HD Quality').': </label><select name="'.$field_name.'" class="widefat" id="'.$field_id.'"><option value="1"';
26
+ if (attribute_escape( $instance['hd'] )=="1") {echo " selected='selected'";}
27
+ echo '>'.__('Yes').'</option><option value="0"';
28
+ if (attribute_escape( $instance['hd'] )=="0") {echo " selected='selected'";}
29
+ echo '>'.__('No').'</option></select></p>';
30
+
31
  $field_id=$this->get_field_id('style');
32
  $field_name=$this->get_field_name('style');
33
  echo "\r\n".'<p><label for="'.$field_id.'">'.__('Style').': </label><input type="text" class="widefat" id="'.$field_id.'" name="'.$field_name.'" value="'.attribute_escape( $instance['style'] ).'" /></p>';
64
  if (attribute_escape( $instance['border'] )=="0") {echo " selected='selected'";}
65
  echo '>'.__('No').'</option></select></p>';
66
 
 
 
 
 
 
 
 
 
67
  $field_id=$this->get_field_id('color1');
68
  $field_name=$this->get_field_name('color1');
69
  echo "\r\n".'<p><label for="'.$field_id.'">'.__('Color 1').': #</label><input type="text" size="6" maxlength="6" id="'.$field_id.'" name="'.$field_name.'" value="'.attribute_escape( $instance['color1'] ).'" /></p>';