YouTube Embed - Version 5.1

Version Description

  • Enhancement: Now supports specifying the language for the closed captions
  • Enhancement: Moved interface language option from the settings screen to profiles
  • Enhancement: You can now head to the settings screen and specify your own videos to be used on the profile screen
  • Enhancement: Added option to allow the Closed Caption language to be specified
  • Enhancement: Removed option in profile page to view an example 3D video. That just left a standard video and a playlist so, instead of switching between them, both examples are now set out on the page (so no need to switch now)
  • Maintenance: Removed deprecated window mode, auto-hide, HTML 5 and theme options
  • Maintenance: Removed the plugins menu
  • Bug: The demo videos weren't working, so they've been updated
  • Bug: Fixed an issue with the video cache, which was expiring too quickly
Download this release

Release Info

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

Code changes from version 5.0.6 to 5.1

images/flash.png DELETED
Binary file
images/html5.png DELETED
Binary file
includes/admin-config.php CHANGED
@@ -102,14 +102,6 @@ function ye_menu_initialise() {
102
 
103
  add_action( 'load-' . $ye_lists_hook, 'ye_add_lists_help' );
104
 
105
- // Add third party plugins sub-menu
106
-
107
- global $ye_plugins_hook;
108
-
109
- $ye_plugins_hook = add_submenu_page( 'ye-profile-options', __( '3rd Party Plugins', 'youtube-embed' ), __( '3rd Party Plugins', 'youtube-embed' ), $menu_access, 'ye-plugins-options', 'ye_plugins_options' );
110
-
111
- add_action( 'load-' . $ye_plugins_hook, 'ye_add_plugins_help' );
112
-
113
  // If installed, add link to Video Overlay Ads plugin
114
 
115
  if ( function_exists( 'video_overlay_create_menu' ) ) {
@@ -178,20 +170,6 @@ function ye_list_options() {
178
 
179
  }
180
 
181
- /**
182
- * Include plugins options screen
183
- *
184
- * XHTML options screen to view and install third party plugins
185
- *
186
- * @since 4.3
187
- */
188
-
189
- function ye_plugins_options() {
190
-
191
- include_once( plugin_dir_path( __FILE__ ) . 'options-plugins.php' );
192
-
193
- }
194
-
195
  /**
196
  * Add Options Help
197
  *
@@ -258,27 +236,6 @@ function ye_add_lists_help() {
258
  $screen -> add_help_tab( array( 'id' => 'lists-links-tab', 'title' => __( 'Links', 'youtube-embed' ), 'content' => youtube_embed_help( 'lists', 'links' ) ) );
259
  }
260
 
261
- /**
262
- * Add Plugins Help
263
- *
264
- * Add help tab to third party plugins screen
265
- *
266
- * @since 4.3
267
- *
268
- * @uses ye_lists_help Return help text
269
- */
270
-
271
- function ye_add_plugins_help() {
272
-
273
- global $ye_plugins_hook;
274
- $screen = get_current_screen();
275
-
276
- if ( $screen->id != $ye_plugins_hook ) { return; }
277
-
278
- $screen -> add_help_tab( array( 'id' => 'lists-help-tab', 'title' => __( 'Help', 'youtube-embed' ), 'content' => youtube_embed_help( 'plugins' ) ) );
279
-
280
- }
281
-
282
  /**
283
  * Help Screens
284
  *
@@ -303,9 +260,6 @@ function youtube_embed_help( $screen, $tab = 'help' ) {
303
  if ( $screen == 'profiles' && $tab == 'help' ) {
304
 
305
  $text .= '<p>' . __( 'This screen allows you to set the options for the default and additional profiles. If you don\'t specify a specific parameter when displaying your YouTube video then the default profile option will be used instead. Additional profiles, which you may name, can be used as well and used as required.', 'youtube-embed' ) . '</p>';
306
- $text .= '<p>' . __( 'All settings will work whether the Flash or HTML5 player is used, unless one of the following icons is shown, indicating which format the option works with...', 'youtube-embed' ) . '</p>';
307
- $text .= "<p><img src='" . plugins_url( 'images/flash.png', dirname(__FILE__) ) . "' alt='" . __( 'Flash player', 'youtube-embed' ) . "' width='10px'/> - " . __( 'Flash player', 'youtube-embed' ) . '</br>';
308
- $text .= "<img src='" . plugins_url( 'images/html5.png', dirname(__FILE__) ) . "' alt='" . __( 'HTML5 player', 'youtube-embed' ) . "' width='10px'/> - " . __( 'HTML5 player', 'youtube-embed' ) . '</br>';
309
  }
310
 
311
  if ( $screen == 'lists' && $tab == 'help' ) {
@@ -313,16 +267,7 @@ function youtube_embed_help( $screen, $tab = 'help' ) {
313
  $text .= '<p>' . __( 'This screen allows you to create lists of YouTube videos, which may be named. These lists can then be used in preference to a single video ID.', 'youtube-embed' ) . '</p>';
314
  }
315
 
316
- if ( $screen == 'plugins' && $tab == 'help' ) {
317
-
318
- $text .= '<p>' . __( 'This screen lists plugins which have all been tested for compatibility with YouTube Embed (and in some cases, specific changes have been made by their authors to ensure compatibility. From here you can view their details and even install the plugins (where hosted at WordPress.org).', 'youtube-embed' ) . '</p>';
319
- $text .= '<p><strong>' . __( 'NB. Inclusion here does not provide any guarantee for third party software, which includes any support.', 'youtube-embed' ) . '</strong></p>';
320
- $text .= '<p>' . __( 'Some of these plugins will also appear under the YouTube Admin administration menu, once activated.', 'youtube-embed' ) . '</p>';
321
- }
322
-
323
- if ( $tab == 'help' && $screen != 'plugins' ) {
324
- $text .= '<p>' . __( 'Remember to click the Save Changes button at the bottom of the screen for any changes to take effect.', 'youtube-embed' ) . '</p>';
325
- }
326
 
327
  if ( $tab == 'links' ) {
328
 
102
 
103
  add_action( 'load-' . $ye_lists_hook, 'ye_add_lists_help' );
104
 
 
 
 
 
 
 
 
 
105
  // If installed, add link to Video Overlay Ads plugin
106
 
107
  if ( function_exists( 'video_overlay_create_menu' ) ) {
170
 
171
  }
172
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
  /**
174
  * Add Options Help
175
  *
236
  $screen -> add_help_tab( array( 'id' => 'lists-links-tab', 'title' => __( 'Links', 'youtube-embed' ), 'content' => youtube_embed_help( 'lists', 'links' ) ) );
237
  }
238
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
239
  /**
240
  * Help Screens
241
  *
260
  if ( $screen == 'profiles' && $tab == 'help' ) {
261
 
262
  $text .= '<p>' . __( 'This screen allows you to set the options for the default and additional profiles. If you don\'t specify a specific parameter when displaying your YouTube video then the default profile option will be used instead. Additional profiles, which you may name, can be used as well and used as required.', 'youtube-embed' ) . '</p>';
 
 
 
263
  }
264
 
265
  if ( $screen == 'lists' && $tab == 'help' ) {
267
  $text .= '<p>' . __( 'This screen allows you to create lists of YouTube videos, which may be named. These lists can then be used in preference to a single video ID.', 'youtube-embed' ) . '</p>';
268
  }
269
 
270
+ $text .= '<p>' . __( 'Remember to click the Save Changes button at the bottom of the screen for any changes to take effect.', 'youtube-embed' ) . '</p>';
 
 
 
 
 
 
 
 
 
271
 
272
  if ( $tab == 'links' ) {
273
 
includes/generate-embed-code.php CHANGED
@@ -31,7 +31,7 @@ function ye_generate_youtube_code( $array ) {
31
 
32
  // Set defaults then merge with passed array. Finally, split array into individual variables
33
 
34
- $default = array( 'id' => '', 'width' => '', 'height' => '', 'fullscreen' => '', 'related' => '', 'autoplay' => '', 'loop' => '', 'start' => '', 'annotation' => '', 'cc' => '', 'style' => '', 'stop' => '', 'disablekb' => '', 'ratio' => '', 'autohide' => '', 'controls' => '', 'profile' => '', 'list_style' => '', 'template' => '', 'color' => '', 'theme' => '', 'responsive' => '', 'search' => '', 'user' => '', 'modest' => '', 'playsinline' => '', 'html5' => '' );
35
 
36
  $array = array_merge( $default, $array );
37
 
@@ -163,7 +163,7 @@ function ye_generate_youtube_code( $array ) {
163
 
164
  // Generate the cache key - it's a combination of ALL the passed parameters, some of the general options, all of the relevant profile options and the playlist, if specified
165
 
166
- $general_extract = array( 'metadata' => $general[ 'metadata' ], 'feed' => $general[ 'feed' ], 'thumbnail' => $general[ 'thumbnail' ], 'privacy' => $general[ 'privacy' ], 'frameborder' => $general[ 'frameborder' ], 'language' => $general[ 'language' ], 'debug' => $general[ 'debug' ], 'script' => $general[ 'script' ], 'force_list_type' => $general[ 'force_list_type' ] );
167
 
168
  $key = serialize( $options ) . serialize( $array ) . serialize ( $general_extract );
169
 
@@ -214,7 +214,7 @@ function ye_generate_youtube_code( $array ) {
214
  $height = $new_sizes[ 'height' ];
215
  }
216
 
217
- // If values have not been pressed, use the default values
218
 
219
  if ( $fullscreen == '' ) { $fullscreen = $options[ 'fullscreen' ]; }
220
  if ( $related == '' ) { $related = $options[ 'related' ]; }
@@ -222,23 +222,19 @@ function ye_generate_youtube_code( $array ) {
222
  if ( $loop == '' ) { $loop = $options[ 'loop' ]; }
223
  if ( $annotation == '' ) { $annotation = $options[ 'annotation' ]; }
224
  if ( $cc == '' ) { $cc = $options[ 'cc' ]; }
 
 
225
  if ( $disablekb == '' ) { $disablekb = $options[ 'disablekb' ]; }
226
- if ( $autohide == '' ) { $autohide = $options[ 'autohide' ]; }
227
  if ( $controls == '' ) { $controls = $options[ 'controls' ]; }
228
  if ( $style == '' ) { $style = $options[ 'style' ]; }
229
  if ( $color == '' ) { $color = $options[ 'color' ]; }
230
- if ( $theme == '' ) { $theme = $options[ 'theme' ]; }
231
  if ( $modest == '' ) { $modest = $options[ 'modest' ]; }
232
  if ( $playsinline == '' ) { $playsinline = $options[ 'playsinline' ]; }
233
- if ( $html5 == '' ) { $html5 = $options[ 'html5' ]; }
234
- if ( $theme == '' ) { $theme = $options[ 'theme' ]; }
235
 
236
  // And for those not passed, simply assign the defaults to variables
237
 
238
- $language = $general[ 'language'];
239
  $metadata = $general[ 'metadata' ];
240
  $debug = $general[ 'debug' ];
241
- $wmode = $options[ 'wmode' ];
242
  $privacy = $general[ 'privacy' ];
243
 
244
  if ( $start == '' ) { $start = '0'; }
@@ -277,14 +273,11 @@ function ye_generate_youtube_code( $array ) {
277
  if ( $loop == 1 ) { $paras .= $amp . 'loop=1'; }
278
  if ( $annotation != 1 ) { $paras .= $amp . 'iv_load_policy=3'; }
279
  if ( $cc != '' ) { $paras .= $amp . 'cc_load_policy=' . $cc; }
 
280
  if ( $disablekb == 1 ) { $paras .= $amp . 'disablekb=1'; }
281
- if ( $autohide != 2 ) { $paras .= $amp . 'autohide=' . $autohide; }
282
  if ( $controls != 1 ) { $paras .= $amp . 'controls=' . $controls; }
283
  if ( strtolower( $color ) != 'red' ) { $paras .= $amp . 'color=' . strtolower( $color ); }
284
- if ( strtolower( $theme ) != 'dark' ) { $paras .= $amp . 'theme=' . strtolower( $theme ); }
285
- if ( $wmode != 'window' ) { $paras .= $amp . 'wmode=' . $wmode; }
286
  if ( $playsinline == 1 ) { $paras .= $amp . 'playsinline=1'; }
287
- if ( $html5 == 1 ) { $paras .= $amp . 'html5=1'; }
288
  if ( $language != '' ) { $paras .= $amp . 'hl=' . $language; }
289
  if ( $start != 0 ) { $paras .= $amp . 'start=' . $start; }
290
  if ( $stop != 0 ) { $paras .= $amp . 'end=' . $stop; }
@@ -406,7 +399,7 @@ function ye_generate_youtube_code( $array ) {
406
 
407
  if ( $general[ 'video_cache' ] != 0 && get_the_date() !== false && !$cache_suppress ) {
408
 
409
- $cache = $general[ 'video_cache' ] * HOURS_IN_SECONDS;
410
 
411
  ye_set_transient( $key, $result, $cache, true );
412
 
31
 
32
  // Set defaults then merge with passed array. Finally, split array into individual variables
33
 
34
+ $default = array( 'id' => '', 'width' => '', 'height' => '', 'fullscreen' => '', 'related' => '', 'autoplay' => '', 'loop' => '', 'start' => '', 'annotation' => '', 'cc' => '', 'style' => '', 'stop' => '', 'disablekb' => '', 'ratio' => '', 'controls' => '', 'profile' => '', 'list_style' => '', 'template' => '', 'color' => '', 'responsive' => '', 'search' => '', 'user' => '', 'modest' => '', 'playsinline' => '', 'cc_lang' => '', 'language' => '' );
35
 
36
  $array = array_merge( $default, $array );
37
 
163
 
164
  // Generate the cache key - it's a combination of ALL the passed parameters, some of the general options, all of the relevant profile options and the playlist, if specified
165
 
166
+ $general_extract = array( 'metadata' => $general[ 'metadata' ], 'feed' => $general[ 'feed' ], 'thumbnail' => $general[ 'thumbnail' ], 'privacy' => $general[ 'privacy' ], 'frameborder' => $general[ 'frameborder' ], 'debug' => $general[ 'debug' ], 'script' => $general[ 'script' ], 'force_list_type' => $general[ 'force_list_type' ] );
167
 
168
  $key = serialize( $options ) . serialize( $array ) . serialize ( $general_extract );
169
 
214
  $height = $new_sizes[ 'height' ];
215
  }
216
 
217
+ // If values have not been passed, use the default values
218
 
219
  if ( $fullscreen == '' ) { $fullscreen = $options[ 'fullscreen' ]; }
220
  if ( $related == '' ) { $related = $options[ 'related' ]; }
222
  if ( $loop == '' ) { $loop = $options[ 'loop' ]; }
223
  if ( $annotation == '' ) { $annotation = $options[ 'annotation' ]; }
224
  if ( $cc == '' ) { $cc = $options[ 'cc' ]; }
225
+ if ( $cc_lang == '' ) { $cc_lang = $options[ 'cc_lang']; }
226
+ if ( $language == '' ) { $language = $options[ 'language']; }
227
  if ( $disablekb == '' ) { $disablekb = $options[ 'disablekb' ]; }
 
228
  if ( $controls == '' ) { $controls = $options[ 'controls' ]; }
229
  if ( $style == '' ) { $style = $options[ 'style' ]; }
230
  if ( $color == '' ) { $color = $options[ 'color' ]; }
 
231
  if ( $modest == '' ) { $modest = $options[ 'modest' ]; }
232
  if ( $playsinline == '' ) { $playsinline = $options[ 'playsinline' ]; }
 
 
233
 
234
  // And for those not passed, simply assign the defaults to variables
235
 
 
236
  $metadata = $general[ 'metadata' ];
237
  $debug = $general[ 'debug' ];
 
238
  $privacy = $general[ 'privacy' ];
239
 
240
  if ( $start == '' ) { $start = '0'; }
273
  if ( $loop == 1 ) { $paras .= $amp . 'loop=1'; }
274
  if ( $annotation != 1 ) { $paras .= $amp . 'iv_load_policy=3'; }
275
  if ( $cc != '' ) { $paras .= $amp . 'cc_load_policy=' . $cc; }
276
+ if ( $cc_lang != '' ) { $paras .= $amp . 'cc_lang_pref=' . $cc_lang; }
277
  if ( $disablekb == 1 ) { $paras .= $amp . 'disablekb=1'; }
 
278
  if ( $controls != 1 ) { $paras .= $amp . 'controls=' . $controls; }
279
  if ( strtolower( $color ) != 'red' ) { $paras .= $amp . 'color=' . strtolower( $color ); }
 
 
280
  if ( $playsinline == 1 ) { $paras .= $amp . 'playsinline=1'; }
 
281
  if ( $language != '' ) { $paras .= $amp . 'hl=' . $language; }
282
  if ( $start != 0 ) { $paras .= $amp . 'start=' . $start; }
283
  if ( $stop != 0 ) { $paras .= $amp . 'end=' . $stop; }
399
 
400
  if ( $general[ 'video_cache' ] != 0 && get_the_date() !== false && !$cache_suppress ) {
401
 
402
+ $cache = $general[ 'video_cache' ] * HOUR_IN_SECONDS;
403
 
404
  ye_set_transient( $key, $result, $cache, true );
405
 
includes/options-general.php CHANGED
@@ -39,8 +39,9 @@ if ( ( !empty( $_POST ) ) && ( check_admin_referer( 'youtube-embed-general', 'yo
39
  $options[ 'thumbnail' ] = sanitize_text_field( $_POST[ 'youtube_embed_thumbnail' ] );
40
  $options[ 'privacy' ] = sanitize_text_field( $_POST[ 'youtube_embed_privacy' ] );
41
  $options[ 'menu_access' ] = sanitize_text_field( $_POST[ 'youtube_embed_menu_access' ] );
42
- $options[ 'language' ] = sanitize_text_field( $_POST[ 'youtube_embed_language' ] );
43
  $options[ 'script' ] = sanitize_text_field( $_POST[ 'youtube_embed_script' ] );
 
 
44
 
45
  $options[ 'api_cache' ] = sanitize_text_field( $_POST[ 'youtube_embed_api_cache' ] );
46
  if ( !is_numeric( $options[ 'api_cache' ] ) ) { $options[ 'api_cache' ] = 0; }
@@ -282,6 +283,24 @@ $shortcode = ye_get_shortcode();
282
  <?php _e( 'Show debug output as HTML comments', 'youtube-embed' ); ?></label></td>
283
  </tr>
284
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
285
  </table><hr><h3 class="title"><?php _e( 'Miscellaneous', 'youtube-embed' ); ?></h3><table class="form-table">
286
 
287
  <!-- Validation -->
@@ -293,14 +312,6 @@ $shortcode = ye_get_shortcode();
293
  <p class="description"><?php _e( 'Will extend the length of the URL, limiting the number of videos in a manual playlist. Switch off metadata for even better validation results.', 'youtube-embed' ); ?></p></td>
294
  </tr>
295
 
296
- <!-- Interface language -->
297
-
298
- <tr>
299
- <th scope="row"><?php _e( 'Interface language', 'youtube-embed' ); ?></th>
300
- <td><label for="youtube_embed_language"><input type="text" size="5" maxlength="5" name="youtube_embed_language" value="<?php echo esc_attr( $options[ 'language' ] ); ?>"/><?php _e( 'The player\'s interface language', 'youtube-embed' ); ?></label>
301
- <p class="description"><?php echo __( 'The parameter value is an <a href="https://www.loc.gov/standards/iso639-2/php/code_list.php">ISO 639-1 two-letter language code</a> or a fully specified locale. For example, the current locale is ', 'youtube-embed' ) . strtolower( str_replace( '_', '-', get_locale() ) ) . '.'; ?></p></td>
302
- </tr>
303
-
304
  </table>
305
 
306
  <?php wp_nonce_field( 'youtube-embed-general','youtube_embed_general_nonce', true, true ); ?>
39
  $options[ 'thumbnail' ] = sanitize_text_field( $_POST[ 'youtube_embed_thumbnail' ] );
40
  $options[ 'privacy' ] = sanitize_text_field( $_POST[ 'youtube_embed_privacy' ] );
41
  $options[ 'menu_access' ] = sanitize_text_field( $_POST[ 'youtube_embed_menu_access' ] );
 
42
  $options[ 'script' ] = sanitize_text_field( $_POST[ 'youtube_embed_script' ] );
43
+ $options[ 'standard_video' ] = sanitize_text_field( $_POST[ 'youtube_embed_video' ] );
44
+ $options[ 'playlist_video' ] = sanitize_text_field( $_POST[ 'youtube_embed_playlist' ] );
45
 
46
  $options[ 'api_cache' ] = sanitize_text_field( $_POST[ 'youtube_embed_api_cache' ] );
47
  if ( !is_numeric( $options[ 'api_cache' ] ) ) { $options[ 'api_cache' ] = 0; }
283
  <?php _e( 'Show debug output as HTML comments', 'youtube-embed' ); ?></label></td>
284
  </tr>
285
 
286
+ </table><hr><h3 class="title"><?php _e( 'Profile Demo Videos', 'youtube-embed' ); ?></h3><table class="form-table">
287
+
288
+ <!-- Standard Video -->
289
+
290
+ <tr>
291
+ <th scope="row"><?php _e( 'Standard Video', 'youtube-embed' ); ?></th>
292
+ <td><label for="youtube_embed_video"><input type="text" size="30" name="youtube_embed_video" value="<?php echo esc_attr( $options[ 'standard_video' ] ); ?>"/></label>
293
+ <p class="description"><?php _e( 'ID of a YouTube video.', 'youtube-embed' ); ?></p></td>
294
+ </tr>
295
+
296
+ <!-- Playlist Video -->
297
+
298
+ <tr>
299
+ <th scope="row"><?php _e( 'Playlist', 'youtube-embed' ); ?></th>
300
+ <td><label for="youtube_embed_playlist"><input type="text" size="30" name="youtube_embed_playlist" value="<?php echo esc_attr( $options[ 'playlist_video' ] ); ?>"/></label>
301
+ <p class="description"><?php _e( 'ID of a YouTube playlist.', 'youtube-embed' ); ?></p></td>
302
+ </tr>
303
+
304
  </table><hr><h3 class="title"><?php _e( 'Miscellaneous', 'youtube-embed' ); ?></h3><table class="form-table">
305
 
306
  <!-- Validation -->
312
  <p class="description"><?php _e( 'Will extend the length of the URL, limiting the number of videos in a manual playlist. Switch off metadata for even better validation results.', 'youtube-embed' ); ?></p></td>
313
  </tr>
314
 
 
 
 
 
 
 
 
 
315
  </table>
316
 
317
  <?php wp_nonce_field( 'youtube-embed-general','youtube_embed_general_nonce', true, true ); ?>
includes/options-plugins.php DELETED
@@ -1,127 +0,0 @@
1
- <?php
2
- /**
3
- * Third Party Plugins Page
4
- *
5
- * Screen for allowing users to view and install third party plugins
6
- *
7
- * @package youtube-embed
8
- * @since 4.3
9
- */
10
- ?>
11
- <?php add_thickbox(); ?>
12
- <div class="wrap">
13
- <h1><?php _e( 'YouTube Embed 3rd Party Plugins', 'youtube-embed' ); ?></h1>
14
-
15
- <form method="post">
16
-
17
- <table class="form-table">
18
-
19
- <?php
20
-
21
- // Turn Off The Lights
22
-
23
- ?><tr>
24
- <th scope="row"><label for="ye_plugins_turnoff"><?php _e( 'Turn Off The Lights', 'youtube-embed' ); ?></th>
25
- <td><a href="https://www.stefanvd.net/project/turnoffthelights.htm"><?php _e( 'Install Turn Out The Lights on your browser', 'youtube-embed' ); ?></a></label>
26
- <p class="description"><?php _e( 'A browser extension that, with a single click on the lamp button, will fade the page dark, with the exception of the embedded video. By clicking on it again, the page will return to normal.', 'youtube-embed' ); ?></p>
27
- </td></tr><?php
28
-
29
- // a3 lazy load
30
-
31
- ye_plugin_status( 'a3-lazy-load', __( 'a3 Lazy Load', 'youtube-embed' ), __( 'Speed up your site and enhance frontend user\'s visual experience. Fully updated to support YouTube Embed.', 'youtube-embed' ), 'a3_lazy_load' );
32
-
33
- // Video Overlay Ads
34
-
35
- ye_plugin_status( 'wpseo-video', __( 'Video SEO', 'youtube-embed' ), __( 'Premium plugin from Yoast to add your video to Google and other search engines.', 'youtube-embed' ), 'video_seo', 'video-seo.php', 'https://yoast.com/wordpress/plugins/video-seo/' );
36
-
37
- // Video Overlay Ads
38
-
39
- ye_plugin_status( 'video-overlay-ads', __( 'WordPress Video Overlay Ads', 'youtube-embed' ), __( 'This plugin creates an lightbox area over Youtube video embeds. You can insert all kinds of html content including banner ads, texts, polls, and add any kind of html and javascript code you like.', 'youtube-embed' ), 'video_overlay_ads', 'main.php' );
40
-
41
- // YouTube Channel Gallery
42
-
43
- ye_plugin_status( 'youtube-channel-gallery', __( 'YouTube Channel Gallery', 'youtube-embed' ), __( 'Adds a widget to show a YouTube video and a gallery of thumbnails for a YouTube channel.', 'youtube-embed' ), 'channel-gallery' );
44
-
45
- // YouTube subscribe Button
46
-
47
- ye_plugin_status( 'youtube-subscribe-button', __( 'YouTube Subscribe Button', 'youtube-embed' ), __( 'Adds a YouTube subscribe button to your blog so people can subscribe to your YouTube channel without leaving your site.', 'youtube-embed' ), 'subscribe-button' );
48
- ?>
49
-
50
- </table></form>
51
-
52
- </div>
53
-
54
- <?php
55
- /**
56
- * Output plugin status
57
- *
58
- * Show details of current plugin installation
59
- *
60
- * @since 4.3
61
- *
62
- * @param $plugin_name string The name of the plugin, as in the WordPress directory
63
- * @param $title string The title of the plugin
64
- * @param $description string The plugin description
65
- * @param $id string A unique ID for the form field
66
- * @param $code_name string The filename of the main plugin code (optional)
67
- * @param $link_url string URL to plugin, if not hosted on WordPress (optional)
68
- */
69
-
70
- function ye_plugin_status( $plugin_name, $title, $description, $id, $code_name = '', $url = '' ) {
71
-
72
- $status = ye_check_plugin( $plugin_name, $code_name );
73
-
74
- echo '<tr><th scope="row"><label for="ye_plugins_' . $id . '">' . $title . '</th>';
75
- echo '<td><input disabled="disabled" type="checkbox" name="ye_plugins_' . $id . '" value="1" ';
76
- checked( $status, 2 );
77
- echo '/>';
78
-
79
- if ( $status == 0 ) {
80
- $text = __( 'Install the plugin', 'youtube-embed' );
81
- } else {
82
- if ( $status == 1 ) {
83
- $text = __( 'Plugin installed but not active', 'youtube-embed' );
84
- } else {
85
- $text = __( 'Plugin installed and active', 'youtube-embed' );
86
- }
87
- }
88
-
89
- echo '<a href="';
90
- if ( $url == '' ) {
91
- echo admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_name . '&TB_iframe=true&width=772&height=565' );
92
- } else {
93
- echo $url . '?TB_iframe=true&width=772&height=565';
94
- }
95
- echo '" class="thickbox">' . $text . '</a>';
96
-
97
- echo '</label><p class="description">' . $description . '</p></td></tr>';
98
- }
99
-
100
- /**
101
- * Check if plugin exists
102
- *
103
- * Check status of plugin - if it installed and, if so, is it active?
104
- *
105
- * @since 4.3
106
- *
107
- * @param $plugin_dir string The directory of the plugin
108
- * @param $plugin_name string The name of the plugin (optional)
109
- * @return $status string The status of the plugin (0=not installed / 1=installed, not active / 2 = installed, active
110
- */
111
-
112
- function ye_check_plugin( $plugin_dir, $plugin_name = '' ) {
113
-
114
- if ( $plugin_name == '' ) { $plugin_name = $plugin_dir . '.php'; }
115
-
116
- $plugins = get_plugins( '/' . $plugin_dir );
117
- if ( $plugins ) {
118
- if ( is_plugin_active( $plugin_dir . '/' . $plugin_name ) ) {
119
- $status = 2;
120
- } else {
121
- $status = 1;
122
- }
123
- } else {
124
- $status = 0;
125
- }
126
- return $status;
127
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/options-profiles.php CHANGED
@@ -8,7 +8,7 @@
8
  * @since 2.0
9
  */
10
 
11
- $demo_video = 'X20GdsIUGKM';
12
 
13
  // Set current profile number
14
 
@@ -57,12 +57,11 @@ if ( ( !empty( $_POST[ 'Submit' ] ) ) && ( check_admin_referer( 'youtube-embed-p
57
  if ( strpos( $options[ 'template' ], '%video%' ) === false ) { $options[ 'template' ] = '%video%'; }
58
 
59
  $options[ 'style' ] = sanitize_text_field( $_POST[ 'youtube_embed_style' ] );
60
- $options[ 'autohide'] = sanitize_text_field( $_POST[ 'youtube_embed_autohide' ] );
61
  $options[ 'controls'] = sanitize_text_field( $_POST[ 'youtube_embed_controls' ] );
62
- $options[ 'wmode'] = sanitize_text_field( $_POST[ 'youtube_embed_wmode' ] );
63
  $options[ 'color' ] = sanitize_text_field( $_POST[ 'youtube_embed_color' ] );
64
- $options[ 'theme' ] = sanitize_text_field( $_POST[ 'youtube_embed_theme' ] );
65
  $options[ 'download_style' ] = sanitize_text_field( $_POST[ 'youtube_embed_download_style' ] );
 
 
66
 
67
  $options[ 'download_text' ] = str_replace( '\"', '"', str_replace( "\'", "'", $_POST[ 'youtube_embed_download_text' ] ) );
68
 
@@ -71,10 +70,10 @@ if ( ( !empty( $_POST[ 'Submit' ] ) ) && ( check_admin_referer( 'youtube-embed-p
71
  if ( isset( $_POST[ 'youtube_embed_autoplay' ] ) ) { $options[ 'autoplay'] = sanitize_text_field( $_POST[ 'youtube_embed_autoplay' ] ); } else { $options[ 'autoplay' ] = ''; }
72
  if ( isset( $_POST[ 'youtube_embed_loop' ] ) ) { $options[ 'loop'] = sanitize_text_field( $_POST[ 'youtube_embed_loop' ] ); } else { $options[ 'loop' ] = ''; }
73
  if ( isset( $_POST[ 'youtube_embed_cc' ] ) ) { $options[ 'cc'] = sanitize_text_field( $_POST[ 'youtube_embed_cc' ] ); } else { $options[ 'cc' ] = ''; }
 
74
  if ( isset( $_POST[ 'youtube_embed_annotation' ] ) ) { $options[ 'annotation'] = sanitize_text_field( $_POST[ 'youtube_embed_annotation' ] ); } else { $options[ 'annotation' ] = ''; }
75
  if ( isset( $_POST[ 'youtube_embed_related' ] ) ) { $options[ 'related'] = sanitize_text_field( $_POST[ 'youtube_embed_related' ] ); } else { $options[ 'related' ] = ''; }
76
  if ( isset( $_POST[ 'youtube_embed_disablekb' ] ) ) { $options[ 'disablekb'] = sanitize_text_field( $_POST[ 'youtube_embed_disablekb' ] ); } else { $options[ 'disablekb' ] = ''; }
77
- if ( isset( $_POST[ 'youtube_embed_html5' ] ) ) { $options[ 'html5'] = sanitize_text_field( $_POST[ 'youtube_embed_html5' ] ); } else { $options[ 'html5' ] = ''; }
78
  if ( isset( $_POST[ 'youtube_embed_modest' ] ) ) { $options[ 'modest' ] = sanitize_text_field( $_POST[ 'youtube_embed_modest' ] ); } else { $options[ 'modest' ] = ''; }
79
  if ( isset( $_POST[ 'youtube_embed_dynamic' ] ) ) { $options[ 'dynamic' ] = sanitize_text_field( $_POST[ 'youtube_embed_dynamic' ] ); } else { $options[ 'dynamic' ] = ''; }
80
  if ( isset( $_POST[ 'youtube_embed_fixed' ] ) ) { $options[ 'fixed' ] = sanitize_text_field( $_POST[ 'youtube_embed_fixed' ] ); } else { $options[ 'fixed' ] = ''; }
@@ -197,18 +196,6 @@ echo ' ' . __( 'Use the drop-down on the right hand side to swap between profile
197
  <p class="description"><?php _e( 'CSS elements to apply to video.', 'youtube-embed' ); ?></p></label></td>
198
  </tr>
199
 
200
- <!-- Window Mode -->
201
-
202
- <tr>
203
- <th scope="row"><?php _e( 'Window Mode', 'youtube-embed' ); ?>&nbsp;<img src="<?php echo plugins_url( 'images/flash.png', dirname(__FILE__) ); ?>" alt="<?php _e( 'Flash', 'youtube-embed' ) ?>" width="10px" align="top"></th>
204
- <td><label for="youtube_embed_wmode"><select name="youtube_embed_wmode">
205
- <option value="opaque"<?php if ( $options[ 'wmode' ] == "opaque" ) { echo " selected='selected'"; } ?>><?php _e( 'Opaque', 'youtube-embed' ); ?></option>
206
- <option value="transparent"<?php if ( $options[ 'wmode' ] == "transparent" ) { echo " selected='selected'"; } ?>><?php _e( 'Transparent', 'youtube-embed' ); ?></option>
207
- <option value="window"<?php if ( $options[ 'wmode' ] == "window" ) { echo " selected='selected'"; } ?>><?php _e( 'Window', 'youtube-embed' ); ?></option>
208
- </select></label>
209
- <p class="description"><?php _e( 'Sets the Window Mode property of the Flash movie for transparency, layering, and positioning in the browser. <a href="http://www.communitymx.com/content/article.cfm?cid=e5141">Learn more</a>.', 'youtube-embed' ); ?></p></td>
210
- </tr>
211
-
212
  </table><hr><h3 class="title"><?php _e( 'Video Size', 'youtube-embed' ); ?></h3><table class="form-table">
213
 
214
  <!-- Video Size -->
@@ -254,7 +241,7 @@ echo ' ' . __( 'Use the drop-down on the right hand side to swap between profile
254
  <!-- Playsinline -->
255
 
256
  <tr>
257
- <th scope="row"><?php _e( 'Plays Inline', 'youtube-embed' ); ?>&nbsp;<img src="<?php echo plugins_url( 'images/html5.png', dirname(__FILE__) ); ?>" alt="<?php _e( 'HTML5', 'youtube-embed' ) ?>" width="10px" align="top"></th>
258
 
259
  <td><label for="youtube_embed_playsinline"><input type="checkbox" name="youtube_embed_playsinline" value="1" <?php checked( $options[ 'playsinline' ], "1" ); ?>/>
260
  <?php _e( 'Whether videos play inline or fullscreen in an HTML5 player on iOS. ', 'youtube-embed' ); ?></label></td>
@@ -299,16 +286,28 @@ echo ' ' . __( 'Use the drop-down on the right hand side to swap between profile
299
  <p class="description"><?php _e( 'Show closed captions.', 'youtube-embed' ); ?></p></td>
300
  </tr>
301
 
302
- <!-- HTML5 -->
303
 
304
  <tr>
305
- <th scope="row"><?php _e( 'Default to HTML5', 'youtube-embed' ); ?></th>
306
- <td><label for="youtube_embed_html5"><input type="checkbox" name="youtube_embed_html5" value="1" <?php checked( $options[ 'html5' ], "1" ); ?>/>
307
- <?php _e( 'Default to the HTML5 player (if available)', 'youtube-embed' ); ?></label>
308
- <p class="description"><?php _e( 'This is an undocumented feature and may not work.', 'youtube-embed' ); ?></p></td>
309
- </tr>
 
310
 
311
- </table><hr><h3 class="title"><?php _e( 'Information', 'youtube-embed' ); ?></h3><table class="form-table">
 
 
 
 
 
 
 
 
 
 
 
312
 
313
  <!-- Related -->
314
 
@@ -330,16 +329,12 @@ echo ' ' . __( 'Use the drop-down on the right hand side to swap between profile
330
 
331
  </table><hr><h3 class="title"><?php _e( 'Controls', 'youtube-embed' ); ?></h3><table class="form-table">
332
 
333
- <!-- Auto Hide -->
334
 
335
  <tr>
336
- <th scope="row"><?php _e( 'Auto hide', 'youtube-embed' ); ?>&nbsp;<img src="<?php echo plugins_url( 'images/flash.png', dirname(__FILE__) ); ?>" alt="<?php _e( 'Flash', 'youtube-embed' ) ?>" width="10px" align="top"></th>
337
- <td><label for="youtube_embed_autohide"><select name="youtube_embed_autohide">
338
- <option value="0"<?php if ( $options[ 'autohide' ] == "0" ) { echo " selected='selected'"; } ?>><?php _e( 'Controls &amp; progress bar remain visible', 'youtube-embed' ); ?></option>
339
- <option value="1"<?php if ( $options[ 'autohide' ] == "1" ) { echo " selected='selected'"; } ?>><?php _e( 'Controls &amp; progress bar fade out', 'youtube-embed' ); ?></option>
340
- <option value="2"<?php if ( $options[ 'autohide' ] == "2" ) { echo " selected='selected'"; } ?>><?php _e( 'Progress bar fades', 'youtube-embed' ); ?></option>
341
- </select></label>
342
- <p class="description"><?php _e( 'Whether the video controls will automatically hide after a video begins playing.', 'youtube-embed' ); ?></p></td>
343
  </tr>
344
 
345
  <!-- Controls -->
@@ -370,17 +365,6 @@ echo ' ' . __( 'Use the drop-down on the right hand side to swap between profile
370
  <?php _e( 'A button will allow the viewer to watch the video fullscreen', 'youtube-embed' ); ?></label></td>
371
  </tr>
372
 
373
- <!-- Theme -->
374
-
375
- <tr>
376
- <th scope="row"><?php _e( 'Theme', 'youtube-embed' ); ?>&nbsp;<img src="<?php echo plugins_url( 'images/flash.png', dirname(__FILE__) ); ?>" alt="<?php _e( 'Flash', 'youtube-embed' ) ?>" width="10px" align="top"></th>
377
- <td><label for="youtube_embed_theme"><select name="youtube_embed_theme">
378
- <option value="dark"<?php if ( $options[ 'theme' ] == "dark" ) { echo " selected='selected'"; } ?>><?php _e( 'Dark', 'youtube-embed' ); ?></option>
379
- <option value="light"<?php if ( $options[ 'theme' ] == "light" ) { echo " selected='selected'"; } ?>><?php _e( 'Light', 'youtube-embed' ); ?></option>
380
- </select></label>
381
- <p class="description"><?php _e( 'Display player controls within a dark or light control bar.', 'youtube-embed' ); ?></p></td>
382
- </tr>
383
-
384
  <!-- Color -->
385
 
386
  <tr>
@@ -428,24 +412,11 @@ echo ' ' . __( 'Use the drop-down on the right hand side to swap between profile
428
 
429
  <a href="#" name="video"></a>
430
  <div style="max-width: <?php echo esc_attr( $options[ 'width' ] ); ?>px">
431
- <form method="post" action="<?php echo get_bloginfo( 'wpurl' ).'/wp-admin/admin.php?page=ye-profile-options#video' ?>">
432
  <h3><?php _e( 'YouTube Video Sample', 'youtube-embed' ); ?></h3>
433
- <p><?php _e( 'The video below uses the above, saved profile settings. Use the drop-down below to change which parameters the video uses - press the Change Video button to update it.', 'youtube-embed' ); ?></p>
434
- <p><select name="youtube_embed_video_type">
435
- <option value="d"<?php if ( $video_type == "d" ) { echo " selected='selected'"; } ?>><?php _e( 'Standard', 'youtube-embed' ); ?></option>
436
- <option value="3"<?php if ( $video_type == "3" ) { echo " selected='selected'"; } ?>><?php _e( '3D', 'youtube-embed' ); ?></option>
437
- <option value="l"<?php if ( $video_type == "l" ) { echo " selected='selected'"; } ?>><?php _e( 'Playlist', 'youtube-embed' ); ?></option>
438
- </select>
439
- <?php wp_nonce_field( 'youtube-embed-profile', 'youtube_embed_profile_nonce', true, true ); ?>
440
- <input type="submit" name="Video" class="button-secondary" value="<?php _e( 'Change video', 'youtube-embed' ); ?>"/></p>
441
-
442
- <p><?php
443
- if ( $video_type == "d" ) { $id = $demo_video; }
444
- if ( $video_type == "3" ) { $id = 'NR5UoBY87GM'; }
445
- if ( $video_type == "l" ) { $id = '095393D5B42B2266'; }
446
- echo ye_generate_youtube_code( array( 'id' => $id, 'profile' => $profile_no ) );
447
- ?></p>
448
-
449
- </form></div>
450
 
451
  </div>
8
  * @since 2.0
9
  */
10
 
11
+ $langs = array( "aa", "ab", "ae", "af", "ak", "am", "an", "ar", "as", "av", "ay", "az", "ba", "be", "bg", "bh", "bi", "bm", "bn", "bo", "br", "bs", "ca", "ce", "ch", "co", "cr", "cs", "cu", "cv", "cy", "da", "de", "dv", "dz", "ee", "el", "en", "eo", "es", "et", "eu", "fa", "ff", "fi", "fj", "fo", "fr", "fy", "ga", "gd", "gl", "gn", "gu", "gv", "ha", "he", "hi", "ho", "hr", "ht", "hu", "hy", "hz", "ia", "id", "ie", "ig", "ii", "ik", "io", "is", "it", "iu", "ja", "jv", "ka", "kg", "ki", "kj", "kk", "kl", "km", "kn", "ko", "kr", "ks", "ku", "kv", "kw", "ky", "la", "lb", "lg", "li", "ln", "lo", "lt", "lu", "lv", "mg", "mh", "mi", "mk", "ml", "mn", "mr", "ms", "mt", "my", "na", "nb", "nd", "ne", "ng", "nl", "nn", "no", "nr", "nv", "ny", "oc", "oj", "om", "or", "os", "pa", "pi", "pl", "ps", "pt", "qu", "rm", "rn", "ro", "ru", "rw", "sa", "sc", "sd", "se", "sg", "si", "sk", "sl", "sm", "sn", "so", "sq", "sr", "ss", "st", "su", "sv", "sw", "ta", "te", "tg", "th", "ti", "tk", "tl", "tn", "to", "tr", "ts", "tt", "tw", "ty", "ug", "uk", "ur", "uz", "ve", "vi", "vo", "wa", "wo", "xh", "yi", "yo", "za", "zh" );
12
 
13
  // Set current profile number
14
 
57
  if ( strpos( $options[ 'template' ], '%video%' ) === false ) { $options[ 'template' ] = '%video%'; }
58
 
59
  $options[ 'style' ] = sanitize_text_field( $_POST[ 'youtube_embed_style' ] );
 
60
  $options[ 'controls'] = sanitize_text_field( $_POST[ 'youtube_embed_controls' ] );
 
61
  $options[ 'color' ] = sanitize_text_field( $_POST[ 'youtube_embed_color' ] );
 
62
  $options[ 'download_style' ] = sanitize_text_field( $_POST[ 'youtube_embed_download_style' ] );
63
+ $options[ 'cc_lang' ] = sanitize_text_field( $_POST[ 'youtube_embed_cc_lang' ] );
64
+ $options[ 'language' ] = sanitize_text_field( $_POST[ 'youtube_embed_language' ] );
65
 
66
  $options[ 'download_text' ] = str_replace( '\"', '"', str_replace( "\'", "'", $_POST[ 'youtube_embed_download_text' ] ) );
67
 
70
  if ( isset( $_POST[ 'youtube_embed_autoplay' ] ) ) { $options[ 'autoplay'] = sanitize_text_field( $_POST[ 'youtube_embed_autoplay' ] ); } else { $options[ 'autoplay' ] = ''; }
71
  if ( isset( $_POST[ 'youtube_embed_loop' ] ) ) { $options[ 'loop'] = sanitize_text_field( $_POST[ 'youtube_embed_loop' ] ); } else { $options[ 'loop' ] = ''; }
72
  if ( isset( $_POST[ 'youtube_embed_cc' ] ) ) { $options[ 'cc'] = sanitize_text_field( $_POST[ 'youtube_embed_cc' ] ); } else { $options[ 'cc' ] = ''; }
73
+
74
  if ( isset( $_POST[ 'youtube_embed_annotation' ] ) ) { $options[ 'annotation'] = sanitize_text_field( $_POST[ 'youtube_embed_annotation' ] ); } else { $options[ 'annotation' ] = ''; }
75
  if ( isset( $_POST[ 'youtube_embed_related' ] ) ) { $options[ 'related'] = sanitize_text_field( $_POST[ 'youtube_embed_related' ] ); } else { $options[ 'related' ] = ''; }
76
  if ( isset( $_POST[ 'youtube_embed_disablekb' ] ) ) { $options[ 'disablekb'] = sanitize_text_field( $_POST[ 'youtube_embed_disablekb' ] ); } else { $options[ 'disablekb' ] = ''; }
 
77
  if ( isset( $_POST[ 'youtube_embed_modest' ] ) ) { $options[ 'modest' ] = sanitize_text_field( $_POST[ 'youtube_embed_modest' ] ); } else { $options[ 'modest' ] = ''; }
78
  if ( isset( $_POST[ 'youtube_embed_dynamic' ] ) ) { $options[ 'dynamic' ] = sanitize_text_field( $_POST[ 'youtube_embed_dynamic' ] ); } else { $options[ 'dynamic' ] = ''; }
79
  if ( isset( $_POST[ 'youtube_embed_fixed' ] ) ) { $options[ 'fixed' ] = sanitize_text_field( $_POST[ 'youtube_embed_fixed' ] ); } else { $options[ 'fixed' ] = ''; }
196
  <p class="description"><?php _e( 'CSS elements to apply to video.', 'youtube-embed' ); ?></p></label></td>
197
  </tr>
198
 
 
 
 
 
 
 
 
 
 
 
 
 
199
  </table><hr><h3 class="title"><?php _e( 'Video Size', 'youtube-embed' ); ?></h3><table class="form-table">
200
 
201
  <!-- Video Size -->
241
  <!-- Playsinline -->
242
 
243
  <tr>
244
+ <th scope="row"><?php _e( 'Plays Inline', 'youtube-embed' ); ?></th>
245
 
246
  <td><label for="youtube_embed_playsinline"><input type="checkbox" name="youtube_embed_playsinline" value="1" <?php checked( $options[ 'playsinline' ], "1" ); ?>/>
247
  <?php _e( 'Whether videos play inline or fullscreen in an HTML5 player on iOS. ', 'youtube-embed' ); ?></label></td>
286
  <p class="description"><?php _e( 'Show closed captions.', 'youtube-embed' ); ?></p></td>
287
  </tr>
288
 
289
+ <!-- Closed Caption Language -->
290
 
291
  <tr>
292
+ <th scope="row"><?php _e( 'Closed Captions Language', 'youtube-embed' ); ?></th>
293
+ <td><label for="youtube_embed_cc_lang"><select name="youtube_embed_cc_lang">
294
+ <option value=""<?php if ( $options[ 'cc_lang' ] == "" ) { echo " selected='selected'"; } ?>>N/A</option>
295
+ <?php
296
+ $loop = 0;
297
+ while ( $loop < count( $langs ) ) {
298
 
299
+ echo '<option value=" '. $langs[ $loop ] . '"';
300
+ if ( $langs[ $loop ] == $options[ 'cc_lang' ] ) { echo " selected='selected'"; }
301
+ echo '>' . $langs[ $loop ] . '</option>';
302
+
303
+ $loop ++;
304
+ }
305
+
306
+ ?>
307
+ </select></label>
308
+ <p class="description"><?php echo __( 'Closed captions language. Select a <a href="http://www.loc.gov/standards/iso639-2/php/code_list.php">ISO 639-1 two-letter language code</a> or N/A for none.', 'youtube-embed' ); ?></p></td>
309
+
310
+ </tr>
311
 
312
  <!-- Related -->
313
 
329
 
330
  </table><hr><h3 class="title"><?php _e( 'Controls', 'youtube-embed' ); ?></h3><table class="form-table">
331
 
332
+ <!-- Interface language -->
333
 
334
  <tr>
335
+ <th scope="row"><?php _e( 'Interface Language', 'youtube-embed' ); ?></th>
336
+ <td><label for="youtube_embed_language"><input type="text" size="5" maxlength="5" name="youtube_embed_language" value="<?php echo esc_attr( $options[ 'language' ] ); ?>"/><?php _e( 'The player\'s interface language', 'youtube-embed' ); ?></label>
337
+ <p class="description"><?php echo __( 'The parameter value is an <a href="https://www.loc.gov/standards/iso639-2/php/code_list.php">ISO 639-1 two-letter language code</a> or a fully specified locale. Leave blank for the default.', 'youtube-embed' ); ?></p></td>
 
 
 
 
338
  </tr>
339
 
340
  <!-- Controls -->
365
  <?php _e( 'A button will allow the viewer to watch the video fullscreen', 'youtube-embed' ); ?></label></td>
366
  </tr>
367
 
 
 
 
 
 
 
 
 
 
 
 
368
  <!-- Color -->
369
 
370
  <tr>
412
 
413
  <a href="#" name="video"></a>
414
  <div style="max-width: <?php echo esc_attr( $options[ 'width' ] ); ?>px">
 
415
  <h3><?php _e( 'YouTube Video Sample', 'youtube-embed' ); ?></h3>
416
+ <p><?php _e( 'The videos below uses the above, saved profile settings in use', 'youtube-embed' ); ?></p>
417
+ <h4><?php _e( 'Standard video', 'youtube-embed' ); ?></h3>
418
+ <p><?php echo ye_generate_youtube_code( array( 'id' => $general[ 'standard_video' ], 'profile' => $profile_no ) ); ?></p>
419
+ <h4><?php _e( 'Playlist', 'youtube-embed' ); ?></h3>
420
+ <p><?php echo ye_generate_youtube_code( array( 'id' => $general[ 'playlist_video' ], 'profile' => $profile_no ) ); ?></p>
 
 
 
 
 
 
 
 
 
 
 
 
421
 
422
  </div>
includes/shared-functions.php CHANGED
@@ -266,14 +266,15 @@ function ye_set_general_defaults() {
266
  'frameborder' => 1,
267
  'widgets' => 0,
268
  'menu_access' => 'list_users',
269
- 'language' => '',
270
  'debug' => 1,
271
  'script' => '',
272
  'prompt' => 1,
273
  'force_list_type' => 0,
274
  'api' => '',
275
  'api_cache' => 7,
276
- 'video_cache' => 24
 
 
277
  );
278
 
279
  // If a new user switch the list option on. Otherwise, an existing user will default to off
@@ -421,17 +422,15 @@ function ye_set_profile_defaults( $profile ) {
421
  'start' => 0,
422
  'loop' => '',
423
  'cc' => '',
 
424
  'annotation' => 1,
425
  'related' => 1,
426
  'info' => 1,
427
  'stop' => 0,
428
  'disablekb' => '',
429
- 'autohide' => 2,
430
  'controls' => 1,
431
- 'wmode' => 'window',
432
  'style' => '',
433
  'color' => 'red',
434
- 'theme' => 'dark',
435
  'modest' => '',
436
  'dynamic' => '',
437
  'fixed' => '',
@@ -439,7 +438,7 @@ function ye_set_profile_defaults( $profile ) {
439
  'download_style' => '',
440
  'download_text' => 'Click here to download the video',
441
  'playsinline' => '',
442
- 'html5' => ''
443
  );
444
 
445
  return $default;
266
  'frameborder' => 1,
267
  'widgets' => 0,
268
  'menu_access' => 'list_users',
 
269
  'debug' => 1,
270
  'script' => '',
271
  'prompt' => 1,
272
  'force_list_type' => 0,
273
  'api' => '',
274
  'api_cache' => 7,
275
+ 'video_cache' => 24,
276
+ 'standard_video' => 'RxAtuMu_ph4',
277
+ 'playlist_video' => '1DD10E84B9B08A35'
278
  );
279
 
280
  // If a new user switch the list option on. Otherwise, an existing user will default to off
422
  'start' => 0,
423
  'loop' => '',
424
  'cc' => '',
425
+ 'cc_lang' => '',
426
  'annotation' => 1,
427
  'related' => 1,
428
  'info' => 1,
429
  'stop' => 0,
430
  'disablekb' => '',
 
431
  'controls' => 1,
 
432
  'style' => '',
433
  'color' => 'red',
 
434
  'modest' => '',
435
  'dynamic' => '',
436
  'fixed' => '',
438
  'download_style' => '',
439
  'download_text' => 'Click here to download the video',
440
  'playsinline' => '',
441
+ 'language' => ''
442
  );
443
 
444
  return $default;
includes/shortcodes.php CHANGED
@@ -74,7 +74,7 @@ if ( isset( $shortcode ) && $shortcode != '' ) { add_shortcode( $shortcode, 'ye_
74
 
75
  function ye_video_shortcode( $paras = '', $content = '', $callback = '', $alt_shortcode = false ) {
76
 
77
- extract( shortcode_atts( array( 'width' => '', 'height' => '', 'fullscreen' => '', 'related' => '', 'autoplay' => '', 'loop' => '', 'start' => '', 'info' => '', 'annotation' => '', 'cc' => '', 'style' => '', 'stop' => '', 'disablekb' => '', 'ratio' => '', 'autohide' => '', 'controls' => '', 'profile' => '', 'id' => '', 'url' => '', 'rel' => '', 'fs' => '', 'cc_load_policy' => '', 'iv_load_policy' => '', 'showinfo' => '', 'youtubeurl' => '', 'template' => '', 'list' => '', 'color' => '', 'theme' => '', 'dynamic' => '', 'responsive' => '', 'h' => '', 'w' => '', 'search' => '', 'user' => '', 'modest' => '', 'playsinline' => '', 'html5' => '' ), $paras ) );
78
 
79
  // If no profile specified and an alternative shortcode used, get that shortcodes default profile
80
 
@@ -137,19 +137,18 @@ function ye_video_shortcode( $paras = '', $content = '', $callback = '', $alt_sh
137
  'stop' => $stop,
138
  'disablekb' => ye_convert( $disablekb ),
139
  'ratio' => $ratio,
140
- 'autohide' => ye_set_autohide( $autohide ),
141
  'controls' => $controls,
142
  'profile' => $profile,
143
  'list_style' => $list,
144
  'template' => $template,
145
  'color' => $color,
146
- 'theme' => $theme,
147
  'responsive' => ye_convert( $responsive ),
148
  'search' => ye_convert( $search ),
149
  'user' => ye_convert( $user ),
150
  'modest' => ye_convert( $modest ),
151
  'playsinline' => ye_convert( $playsinline ),
152
- 'html5' => ye_convert( $html5 )
 
153
  );
154
 
155
  $youtube_code = ye_generate_youtube_code( $array );
74
 
75
  function ye_video_shortcode( $paras = '', $content = '', $callback = '', $alt_shortcode = false ) {
76
 
77
+ extract( shortcode_atts( array( 'width' => '', 'height' => '', 'fullscreen' => '', 'related' => '', 'autoplay' => '', 'loop' => '', 'start' => '', 'info' => '', 'annotation' => '', 'cc' => '', 'cc_lang' => '', 'language' => '', 'style' => '', 'stop' => '', 'disablekb' => '', 'ratio' => '', 'controls' => '', 'profile' => '', 'id' => '', 'url' => '', 'rel' => '', 'fs' => '', 'cc_load_policy' => '', 'iv_load_policy' => '', 'showinfo' => '', 'youtubeurl' => '', 'template' => '', 'list' => '', 'color' => '', 'dynamic' => '', 'responsive' => '', 'h' => '', 'w' => '', 'search' => '', 'user' => '', 'modest' => '', 'playsinline' => '' ), $paras ) );
78
 
79
  // If no profile specified and an alternative shortcode used, get that shortcodes default profile
80
 
137
  'stop' => $stop,
138
  'disablekb' => ye_convert( $disablekb ),
139
  'ratio' => $ratio,
 
140
  'controls' => $controls,
141
  'profile' => $profile,
142
  'list_style' => $list,
143
  'template' => $template,
144
  'color' => $color,
 
145
  'responsive' => ye_convert( $responsive ),
146
  'search' => ye_convert( $search ),
147
  'user' => ye_convert( $user ),
148
  'modest' => ye_convert( $modest ),
149
  'playsinline' => ye_convert( $playsinline ),
150
+ 'cc_lang' => $cc_lang,
151
+ 'language' => $language
152
  );
153
 
154
  $youtube_code = ye_generate_youtube_code( $array );
readme.txt CHANGED
@@ -1,10 +1,11 @@
1
  === YouTube Embed ===
2
- Contributors: dartiss
 
3
  Tags: embed, insert, video, youtube
4
  Requires at least: 4.6
5
- Tested up to: 5.0.3
6
  Requires PHP: 5.3
7
- Stable tag: 5.0.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -12,8 +13,6 @@ An incredibly fast, simple, yet powerful, method of embedding YouTube videos int
12
 
13
  == Description ==
14
 
15
- **Version 5 is here! Now with API access to further improve the rich metadata but also the output caching has returned to make this plugin the fasted method to embed YouTube videos around!**
16
-
17
  YouTube Embed is an incredibly fast, simple, yet powerful, method of embedding YouTube videos into your WordPress site.
18
 
19
  Key features include...
@@ -31,15 +30,9 @@ Key features include...
31
  * Works "out of the box" with 4K, 60FPS and Chromecast - stream your embedded videos to your TV!
32
  * And much, much more!
33
 
34
- Technical specification...
35
-
36
- * Designed for both single and multi-site installations
37
- * PHP7 compatible
38
- * Fully internationalized, ready for translations! **If you would like to add a translation to this plugin then please head to our [Translating WordPress](https://translate.wordpress.org/projects/wp-plugins/youtube-embed "Translating WordPress") page**
39
-
40
  Please visit the [Github page](https://github.com/dartiss/youtube-embed "Github") for the latest code development, planned enhancements and known issues.
41
 
42
- == Getting Started ==
43
 
44
  How easy is it to use? The fine people at [Webucator](https://www.webucator.com "Webucator") have put together an excellent video showing you how to get started with it..
45
 
@@ -53,7 +46,7 @@ Within the administration area, click on the YouTube Embed menu option and then
53
 
54
  Although this document contains a lot of information more is provided on the various administration pages. Whilst on the administration pages, click on the "Help" button in the top right for some useful tips and links. If anything isn't covered and you're unsure of what it does please ask [on the forum](https://wordpress.org/support/plugin/youtube-embed "WordPress Plugins Forum").
55
 
56
- == Creating an API Key ==
57
 
58
  At the top of the `General Settings` administration screen is an option to specify an API key. This is optional but many of the features of this plugin - including accurate video information being added to the metadata - will not be available without it. Thankfully an API key is easy to get and is free.
59
 
@@ -68,15 +61,15 @@ e.g. `[[youtube width=300 height=200]Z_sCoHGIpU0[/youtube]]`
68
  Which options are available depends upon the users's set-up (for example, whether they have Flash installed or not). You can specify any of the parameters but they may be ignored. Please see the Profile screen in Administration for further details on any restrictions which may exist.
69
 
70
  * **annotation** - yes or no, this determines if annotations are shown
71
- * **autohide** - 0, 1 or 2, this parameter indicates whether the video controls will automatically hide after a video begins playing. The default behavior, a value of 2, is for the video progress bar to fade out while the player controls (play button, volume control, etc.) remain visible. If this parameter is set to 0, the video progress bar and the video player controls will be visible throughout the video. If this parameter is set to 1, then the video progress bar and the player controls will slide out of view a couple of seconds after the video starts playing. They will only reappear if the user moves her mouse over the video player or presses a key on her keyboard.
72
  * **autoplay** - yes or no, should the video automatically start playing?
73
- * **cc** - yes or no, decided whether closed captions are displayed. If you don't specify anything then the user's default will be used.
 
74
  * **color** - white or red, the color of the progress bar (see the FAQ about having a white progress bar with the light theme)
75
  * **controls** - 0, 1 or 2, this decides whether the controls should display and when the Flash will load. A value of 0 will not show the controls but 1 or 2 will. A value of 2 will load Flash once the user initiates playback - otherwise it's loaded straight away.
76
  * **disablekb** - yes or no, disable keyboard controls
77
  * **fullscreen** - yes or no, this will add the fullscreen button to the toolbar
78
- * **height** - the video height, in pixels
79
- * **html5** - yes or no, whether to force HTML5 as the default player or not (if available). NB: This is an undocumented feature and, as such, may not work
80
  * **list** - if you've specified your own list, use this to select the way the videos should be output. Should be `random` (display videos in a random order), `single` (show just one video, randomly picked from the list) or `order` (show each video in the original order - this is the default)
81
  * **loop** - yes or no, whether to start the video again once it ends
82
  * **modest** - reduce the branding on the video
@@ -90,7 +83,6 @@ Which options are available depends upon the users's set-up (for example, whethe
90
  * **stop** - this stops the video at a specific time, given in seconds
91
  * **style** - apply CSS elements directly to the video output
92
  * **template** - specify a template (see section on Templates for further details)
93
- * **theme** - dark or light, display player controls (like a 'play' button or volume control) within a dark or light control bar
94
  * **user** - yes or no, create a playlist based on a user's uploads. The search word should be specified instead of a video ID. See "Automatically Generate Playlists" option for more details
95
  * **width** - the video width, in pixels
96
 
@@ -143,7 +135,7 @@ This could be useful, for instance, for having a separate profile for different
143
 
144
  By default you have 5 extra profiles - if you wish to have more (or less) this number can be changed from the YouTube Embed settings screen.
145
 
146
- == Lists ==
147
 
148
  Although this plugin will play standard YouTube playlists their playback options are limited. Instead you can create your own video lists. Under the YouTube Embed administration menu is a sub-menu named Lists. Select this and you will be shown a screen where you can type in a list of video IDs (or URLS). You can also provide a name for the list.
149
 
@@ -165,13 +157,13 @@ YouTube includes options to automatically generate playlists based upon a user n
165
 
166
  To use, simply use the `user` or `search` parameter to switch the appropriate option on. Then, instead of a video ID or URL, you should specify either the user name or search word(s).
167
 
168
- == Third Party Resizing Scripts ==
169
 
170
  Within the YouTube Embed settings screen there is an option to set a third party resizing script - either [iFrame Resizer](https://github.com/davidjbradshaw/iframe-resizer "iFrame Resizer") or [FitVids.js](https://github.com/davatron5000/FitVids.js "FitVids.js"). These work alongside the existing IFRAME but try and improve the output, particularly with regard to how the output is sized.
171
 
172
  There are no guarantees with these and no support of their specific functionality is provided. However, if the video output is wrong then it's worth trying these.
173
 
174
- == Thumbnails ==
175
 
176
  YouTube Embed also has the ability to return a thumbnail of a video (sorry, this doesn't work with playlists).
177
 
@@ -192,11 +184,11 @@ e.g. `[youtube_thumb target="_blank" alt="Demo video"]id[/youtube_thumb]`
192
 
193
  This overrides the `TARGET` and `ALT` elements of the thumbnail.
194
 
195
- == Shortened URL ==
196
 
197
  You may return a short URL for any YouTube video by simply inserting `[youtube_url id=xx]` anywhere within a post. `xx` is the ID of the video.
198
 
199
- == Downloading Videos ==
200
 
201
  If you wish your users to be able to download a YouTube video or playlist then you can do this automatically.
202
 
@@ -208,7 +200,7 @@ In the Profiles screen within administration there is an option to automatically
208
 
209
  e.g. `[download_video id="Z_sCoHGIpU0" target="_blank"]Download the video[/download_video]`
210
 
211
- == Video Information ==
212
 
213
  The shortcode of `vinfo` can be used to output useful video information. Simple pass the video ID using the parameter of `id` and then add any text between the opening and closing shortcode. If this text contains any of the following tags then they will be replaced with the relevant video information...
214
 
@@ -236,17 +228,7 @@ Under the YouTube Embed administration menu is a sub-menu named General Settings
236
  1. Add Metadata - by default, RDFa metadata is added to video output. This can be switched on or off as required (see the FAQs for more information about metadata usage).
237
  2. Feed - videos will not appear in feeds so use this option to decide whether you want them to be converted to links and/or thumbnails.
238
 
239
- == Third Party Plugins ==
240
-
241
- From the `YouTube Embed` administration menu there is a `3rd Party Plugins` sub-menu. This will list a number of WordPress plugins that can work alongside YouTube Embed to add extra functionality. From this screen you can view, install and see the status of each plugin.
242
-
243
- In some cases activating these plugins will cause their settings screen to also appear under the `YouTube Embed` menu, for extra convenience.
244
-
245
- **By listing these plugins, we provide no guarantees that they work correctly and we certainly don't provide any support for them.**
246
-
247
- If you'd like your own plugin adding to this list then please [get in touch](https://artiss.blog/contact-me/ "Contact").
248
-
249
- == Reviews & Mentions ==
250
 
251
  * [Your YouTube Plugin is fantastic-it just saved my life on this site. Thank you!](https://twitter.com/AaronWatters/status/237957701605404672?uid=16257815&iid=am-130280753913455685118891763&nid=4+248 "Twitter - Aaron Watters") - Sonic Clamp
252
  * [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
@@ -311,7 +293,7 @@ One thing to note - by switching on "Improve Validation" you'll extend the lengt
311
 
312
  = I'm getting the error "The maximum URL length has been exceeded" when trying to view a video =
313
 
314
- When embedding a video a URL for YouTube is generated - this contains all the non-default parameters that you've specified and, if you've created a manual playlist, all of the video IDs. Unfortunately, URLs can only be 2000 characters in size. If this is exceeded you'll get the above error message when you try and view the video.
315
 
316
  The solution is to reduce this down by reducing down your playlist or, if you have the "Improve Validation" settings switched on, switching that back off.
317
 
@@ -331,7 +313,18 @@ Before reporting it please bear in mind that this plugin uses the standard YouTu
331
 
332
  == Changelog ==
333
 
334
- [Learn more about my version numbering methodology](https://artiss.blog/2016/09/wordpress-plugin-versioning/ "WordPress Plugin Versioning")
 
 
 
 
 
 
 
 
 
 
 
335
 
336
  = 5.0.6 =
337
  * Bug: It would appear that some of the code for the editor button was still lurking in dark corners of the plugin. That's caused those not rocking Gutenberg to see errors or, worst still, the dreaded "white screen of death". Apologies. I've now hoovered out all of the muck
@@ -544,5 +537,5 @@ Before reporting it please bear in mind that this plugin uses the standard YouTu
544
 
545
  == Upgrade Notice ==
546
 
547
- = 5.0.6 =
548
- * Bug fix
1
  === YouTube Embed ===
2
+ Contributors: dartiss
3
+ Donate link: https://artiss.blog/donate
4
  Tags: embed, insert, video, youtube
5
  Requires at least: 4.6
6
+ Tested up to: 5.4
7
  Requires PHP: 5.3
8
+ Stable tag: 5.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
13
 
14
  == Description ==
15
 
 
 
16
  YouTube Embed is an incredibly fast, simple, yet powerful, method of embedding YouTube videos into your WordPress site.
17
 
18
  Key features include...
30
  * Works "out of the box" with 4K, 60FPS and Chromecast - stream your embedded videos to your TV!
31
  * And much, much more!
32
 
 
 
 
 
 
 
33
  Please visit the [Github page](https://github.com/dartiss/youtube-embed "Github") for the latest code development, planned enhancements and known issues.
34
 
35
+ == 🚦 Getting Started ==
36
 
37
  How easy is it to use? The fine people at [Webucator](https://www.webucator.com "Webucator") have put together an excellent video showing you how to get started with it..
38
 
46
 
47
  Although this document contains a lot of information more is provided on the various administration pages. Whilst on the administration pages, click on the "Help" button in the top right for some useful tips and links. If anything isn't covered and you're unsure of what it does please ask [on the forum](https://wordpress.org/support/plugin/youtube-embed "WordPress Plugins Forum").
48
 
49
+ == 🔑 Creating an API Key ==
50
 
51
  At the top of the `General Settings` administration screen is an option to specify an API key. This is optional but many of the features of this plugin - including accurate video information being added to the metadata - will not be available without it. Thankfully an API key is easy to get and is free.
52
 
61
  Which options are available depends upon the users's set-up (for example, whether they have Flash installed or not). You can specify any of the parameters but they may be ignored. Please see the Profile screen in Administration for further details on any restrictions which may exist.
62
 
63
  * **annotation** - yes or no, this determines if annotations are shown
 
64
  * **autoplay** - yes or no, should the video automatically start playing?
65
+ * **cc** - yes or no, decided whether closed captions are displayed. If you don't specify anything then the user's default will be used.
66
+ * **cc_lang** - Closed captions language. Select a [ISO 639-1 two-letter language code](http://www.loc.gov/standards/iso639-2/php/code_list.php") or leave blank for the default
67
  * **color** - white or red, the color of the progress bar (see the FAQ about having a white progress bar with the light theme)
68
  * **controls** - 0, 1 or 2, this decides whether the controls should display and when the Flash will load. A value of 0 will not show the controls but 1 or 2 will. A value of 2 will load Flash once the user initiates playback - otherwise it's loaded straight away.
69
  * **disablekb** - yes or no, disable keyboard controls
70
  * **fullscreen** - yes or no, this will add the fullscreen button to the toolbar
71
+ * **height** - the video height, in pixels
72
+ * **language** - The interface language. The parameter value is an [ISO 639-1 two-letter language code](http://www.loc.gov/standards/iso639-2/php/code_list.php") or a fully specified locale. Leave blank for the default
73
  * **list** - if you've specified your own list, use this to select the way the videos should be output. Should be `random` (display videos in a random order), `single` (show just one video, randomly picked from the list) or `order` (show each video in the original order - this is the default)
74
  * **loop** - yes or no, whether to start the video again once it ends
75
  * **modest** - reduce the branding on the video
83
  * **stop** - this stops the video at a specific time, given in seconds
84
  * **style** - apply CSS elements directly to the video output
85
  * **template** - specify a template (see section on Templates for further details)
 
86
  * **user** - yes or no, create a playlist based on a user's uploads. The search word should be specified instead of a video ID. See "Automatically Generate Playlists" option for more details
87
  * **width** - the video width, in pixels
88
 
135
 
136
  By default you have 5 extra profiles - if you wish to have more (or less) this number can be changed from the YouTube Embed settings screen.
137
 
138
+ == 📝 Lists ==
139
 
140
  Although this plugin will play standard YouTube playlists their playback options are limited. Instead you can create your own video lists. Under the YouTube Embed administration menu is a sub-menu named Lists. Select this and you will be shown a screen where you can type in a list of video IDs (or URLS). You can also provide a name for the list.
141
 
157
 
158
  To use, simply use the `user` or `search` parameter to switch the appropriate option on. Then, instead of a video ID or URL, you should specify either the user name or search word(s).
159
 
160
+ == 📏 Third Party Resizing Scripts ==
161
 
162
  Within the YouTube Embed settings screen there is an option to set a third party resizing script - either [iFrame Resizer](https://github.com/davidjbradshaw/iframe-resizer "iFrame Resizer") or [FitVids.js](https://github.com/davatron5000/FitVids.js "FitVids.js"). These work alongside the existing IFRAME but try and improve the output, particularly with regard to how the output is sized.
163
 
164
  There are no guarantees with these and no support of their specific functionality is provided. However, if the video output is wrong then it's worth trying these.
165
 
166
+ == 🏙 Thumbnails ==
167
 
168
  YouTube Embed also has the ability to return a thumbnail of a video (sorry, this doesn't work with playlists).
169
 
184
 
185
  This overrides the `TARGET` and `ALT` elements of the thumbnail.
186
 
187
+ == 🗜 Shortened URL ==
188
 
189
  You may return a short URL for any YouTube video by simply inserting `[youtube_url id=xx]` anywhere within a post. `xx` is the ID of the video.
190
 
191
+ == ⬇️ Downloading Videos ==
192
 
193
  If you wish your users to be able to download a YouTube video or playlist then you can do this automatically.
194
 
200
 
201
  e.g. `[download_video id="Z_sCoHGIpU0" target="_blank"]Download the video[/download_video]`
202
 
203
+ == ℹ️ Video Information ==
204
 
205
  The shortcode of `vinfo` can be used to output useful video information. Simple pass the video ID using the parameter of `id` and then add any text between the opening and closing shortcode. If this text contains any of the following tags then they will be replaced with the relevant video information...
206
 
228
  1. Add Metadata - by default, RDFa metadata is added to video output. This can be switched on or off as required (see the FAQs for more information about metadata usage).
229
  2. Feed - videos will not appear in feeds so use this option to decide whether you want them to be converted to links and/or thumbnails.
230
 
231
+ == ♥️ Reviews & Mentions ==
 
 
 
 
 
 
 
 
 
 
232
 
233
  * [Your YouTube Plugin is fantastic-it just saved my life on this site. Thank you!](https://twitter.com/AaronWatters/status/237957701605404672?uid=16257815&iid=am-130280753913455685118891763&nid=4+248 "Twitter - Aaron Watters") - Sonic Clamp
234
  * [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
293
 
294
  = I'm getting the error "The maximum URL length has been exceeded" when trying to view a video =
295
 
296
+ When embedding a video a URL for YouTube is generated - this contains all the non-default parameters that you've specified and, if you've created a manual playlist, all of the video IDs. Unfortunately, URLs can only be 2000 characters in size. If this is exceeded you'll get the above error message when you try and view the video./Users/davidartiss/Documents/GitHub/youtube-embed/readme.txt
297
 
298
  The solution is to reduce this down by reducing down your playlist or, if you have the "Improve Validation" settings switched on, switching that back off.
299
 
313
 
314
  == Changelog ==
315
 
316
+ 🔢 [Learn more about my version numbering methodology](https://artiss.blog/2016/09/wordpress-plugin-versioning/ "WordPress Plugin Versioning")
317
+
318
+ = 5.1 =
319
+ * Enhancement: Now supports specifying the language for the closed captions
320
+ * Enhancement: Moved interface language option from the settings screen to profiles
321
+ * Enhancement: You can now head to the settings screen and specify your own videos to be used on the profile screen
322
+ * Enhancement: Added option to allow the Closed Caption language to be specified
323
+ * Enhancement: Removed option in profile page to view an example 3D video. That just left a standard video and a playlist so, instead of switching between them, both examples are now set out on the page (so no need to switch now)
324
+ * Maintenance: Removed deprecated window mode, auto-hide, HTML 5 and theme options
325
+ * Maintenance: Removed the plugins menu
326
+ * Bug: The demo videos weren't working, so they've been updated
327
+ * Bug: Fixed an issue with the video cache, which was expiring too quickly
328
 
329
  = 5.0.6 =
330
  * Bug: It would appear that some of the code for the editor button was still lurking in dark corners of the plugin. That's caused those not rocking Gutenberg to see errors or, worst still, the dreaded "white screen of death". Apologies. I've now hoovered out all of the muck
537
 
538
  == Upgrade Notice ==
539
 
540
+ = 5.1 =
541
+ * Enhancements and bug fixes
youtube-embed.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: YouTube Embed
4
  Plugin URI: https://github.com/dartiss/youtube-embed
5
  Description: An incredibly fast, simple, yet powerful, method of embedding YouTube videos into your WordPress site.
6
- Version: 5.0.6
7
  Author: dartiss
8
  Author URI: https://artiss.blog
9
  Text Domain: youtube-embed
@@ -18,7 +18,7 @@ Text Domain: youtube-embed
18
  * @since 2.0
19
  */
20
 
21
- define( 'youtube_embed_version', '5.0.6' );
22
 
23
  $functions_dir = plugin_dir_path( __FILE__ ) . 'includes/';
24
 
3
  Plugin Name: YouTube Embed
4
  Plugin URI: https://github.com/dartiss/youtube-embed
5
  Description: An incredibly fast, simple, yet powerful, method of embedding YouTube videos into your WordPress site.
6
+ Version: 5.1
7
  Author: dartiss
8
  Author URI: https://artiss.blog
9
  Text Domain: youtube-embed
18
  * @since 2.0
19
  */
20
 
21
+ define( 'youtube_embed_version', '5.1' );
22
 
23
  $functions_dir = plugin_dir_path( __FILE__ ) . 'includes/';
24