YouTube - Version 9.4

Version Description

Download this release

Release Info

Developer embedplus
Plugin Icon 128x128 YouTube
Version 9.4
Comparing to
See all releases

Code changes from version 9.3 to 9.4

Files changed (3) hide show
  1. readme.txt +17 -11
  2. scripts/ytprefs.min.js +1 -1
  3. youtube.php +27 -15
readme.txt CHANGED
@@ -4,26 +4,27 @@ Plugin Name: YouTube Embed
4
  Tags: lazy load, lazy, load, effects, special effects, get_locale, translator, locale, country code, country, TinyMCE, localization, internationalization, language, multi-language, translate, captions, subtitles, hl, audio, initialize, mute, sound, track, volume, at a glance, channel, annotations, music, music video, songs, song, lyrics, responsive, short code, shortcode, youtube shortcode, health, diagnostic, youtube status, seo, video seo, rich snippets, reddit, google+, google plus, comments, search, widget, sidebar, responsive, fluid, iphone, mobile, android, tablet, ipad, youtube playlist, playlists, playlist, wmode, hd, autohd, auto hd, video analytics, analytics, google, google analytics, view count, vlog, vlogging, web videos, youtube analytics, youtube, youtube plugin, youtube shortcode, embed youtube, plugin, video, video shortcode, embed videos, youtube player, shortcode, simple, simple youtube, smart youtube playback, youtube embed, wordpress youtube embed, embedding youtube, youtube embedding, video plugin, https, ssl, secure, no-cookie, cookie, html5, youtube html5, multilingual, multi-lingual, l10n, i18n
5
  Requires at least: 2.9
6
  Tested up to: 4.1
7
- Stable tag: 9.3
8
  License: GPLv3 or later
9
 
10
- YouTube embed plugin. Responsive sizing and many other conveniences. Upgrade for performance, analytics, SEO tags and more!
11
 
12
  == Description ==
13
 
14
- **700,000+ downloads! Here are some recently added features:**
15
 
 
 
 
 
16
  * [Automatic localization/internationalization](http://www.embedplus.com/youtube-iso-639-1-language-codes.aspx) so you can set the player's interface language from English to another
17
  * Instant HTTPS support. It can even convert past non-HTTPS videos to HTTPS. Did you know that Google uses [HTTPS/SSL support as a ranking signal for SERP?](http://embedplus.com/convert-old-youtube-embeds-to-https-ssl.aspx)
18
- * iOS playback preferences
19
- * Embed an entire channel as a playlist
20
- * "At a Glance" direct access to your YouTube posts/pages
21
  * Visual YouTube video searching and viewing
22
- * Easy "Insert" button for both the Visual and Text mode of the editor
23
  * Review the latest web discussions about videos you want to embed before embedding
24
- * Shortcode support for embedding multiple videos on one line
25
- * Playlist support
26
- * Volume level initialization ( [helpful for autoplay >>](http://www.embedplus.com/mute-volume-youtube-wordpress.aspx) )
27
 
28
  You can even extend the plugin with PRO features like:
29
 
@@ -136,6 +137,9 @@ You can also start and end each individual video at particular times. Like the a
136
 
137
  == Changelog ==
138
 
 
 
 
139
  = YouTube Embed 9.3 =
140
  Improved volume functionality and interface updates (Free and PRO). [Special effects added to PRO version >>](http://www.embedplus.com/add-special-effects-to-youtube-embeds-in-wordpress.aspx)
141
 
@@ -308,4 +312,6 @@ First release uploaded to the plugin repository.
308
 
309
  == Other Notes ==
310
 
311
- This YouTube plugin can include premium features like automatic schema tagging for video SEO, mobile compatibility checking, and deleted video alerts when you [upgrade to PRO.](https://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx).
 
 
4
  Tags: lazy load, lazy, load, effects, special effects, get_locale, translator, locale, country code, country, TinyMCE, localization, internationalization, language, multi-language, translate, captions, subtitles, hl, audio, initialize, mute, sound, track, volume, at a glance, channel, annotations, music, music video, songs, song, lyrics, responsive, short code, shortcode, youtube shortcode, health, diagnostic, youtube status, seo, video seo, rich snippets, reddit, google+, google plus, comments, search, widget, sidebar, responsive, fluid, iphone, mobile, android, tablet, ipad, youtube playlist, playlists, playlist, wmode, hd, autohd, auto hd, video analytics, analytics, google, google analytics, view count, vlog, vlogging, web videos, youtube analytics, youtube, youtube plugin, youtube shortcode, embed youtube, plugin, video, video shortcode, embed videos, youtube player, shortcode, simple, simple youtube, smart youtube playback, youtube embed, wordpress youtube embed, embedding youtube, youtube embedding, video plugin, https, ssl, secure, no-cookie, cookie, html5, youtube html5, multilingual, multi-lingual, l10n, i18n
5
  Requires at least: 2.9
6
  Tested up to: 4.1
7
+ Stable tag: 9.4
8
  License: GPLv3 or later
9
 
10
+ YouTube embed plugin. Embed the YouTube player and playlist in posts, pages, and widgets. Add analytics, SEO, and much more!
11
 
12
  == Description ==
13
 
14
+ **800,000+ downloads! Here are some recently added features (even more below):**
15
 
16
+ * Easy "Insert" button for both the Visual and Text mode of the editor
17
+ * [Embed an entire channel as a playlist >>](https://www.youtube.com/watch?v=_9D4yMyd40g)
18
+ * Volume level initialization ( [helpful for autoplay >>](http://www.embedplus.com/mute-volume-youtube-wordpress.aspx) )
19
+ * iOS playback preferences
20
  * [Automatic localization/internationalization](http://www.embedplus.com/youtube-iso-639-1-language-codes.aspx) so you can set the player's interface language from English to another
21
  * Instant HTTPS support. It can even convert past non-HTTPS videos to HTTPS. Did you know that Google uses [HTTPS/SSL support as a ranking signal for SERP?](http://embedplus.com/convert-old-youtube-embeds-to-https-ssl.aspx)
 
 
 
22
  * Visual YouTube video searching and viewing
23
+ * "At a Glance" direct access to your YouTube posts/pages
24
  * Review the latest web discussions about videos you want to embed before embedding
25
+ * Shortcode support for [embedding multiple videos on one line >>](https://www.youtube.com/watch?v=KU6lzcNR1FI)
26
+ * [General playlist embedding support >>](https://www.youtube.com/watch?v=J50PlRZHH9I)
27
+ * [Default HTML5 YouTube player support>>](http://www.embedplus.com/make-sure-youtube-defaults-to-html5-on-wordpress.aspx)
28
 
29
  You can even extend the plugin with PRO features like:
30
 
137
 
138
  == Changelog ==
139
 
140
+ = YouTube Embed 9.4 =
141
+ Adds Autofit Widget option for Free and PRO users. Also adds slide from left animation to [Pro effects >>](http://www.embedplus.com/add-special-effects-to-youtube-embeds-in-wordpress.aspx)
142
+
143
  = YouTube Embed 9.3 =
144
  Improved volume functionality and interface updates (Free and PRO). [Special effects added to PRO version >>](http://www.embedplus.com/add-special-effects-to-youtube-embeds-in-wordpress.aspx)
145
 
312
 
313
  == Other Notes ==
314
 
315
+ This YouTube plugin can include premium features like automatic schema tagging for video SEO, mobile compatibility checking, and deleted video alerts when you [upgrade to PRO.](https://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx).
316
+
317
+ We also have a YouTube channel with some helper videos. [Check them out here >>](https://www.youtube.com/user/EmbedPlus)
scripts/ytprefs.min.js CHANGED
@@ -1 +1 @@
1
- function onYouTubeIframeAPIReady(){setTimeout(function(){var e=document.querySelectorAll('iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]');for(var t=0;t<e.length;t++){if(!e[t].hasAttribute("id")){e[t].id="_dytid_"+Math.round(Math.random()*8999+1e3)}_EPADashboard_.setupevents(e[t].id)}},300)}(function(){if(!document.querySelectorAll){document.querySelectorAll=function(e){var t=document,n=t.documentElement.firstChild,r=t.createElement("STYLE");n.appendChild(r);t.__qsaels=[];r.styleSheet.cssText=e+"{x:expression(document.__qsaels.push(this))}";window.scrollBy(0,0);return t.__qsaels}}if(typeof window._EPADashboard_=="undefined"){window._EPADashboard_={onPlayerReady:function(e){try{if(typeof epdovol!=="undefined"&&epdovol){var t=parseInt(e.target.getIframe().getAttribute("data-vol"));if(!isNaN(t)){if(t===0){e.target.mute()}else{if(e.target.isMuted()){e.target.unMute()}e.target.setVolume(t)}}}}catch(n){}setTimeout(function(){try{var t=_EPADashboard_.justid(e.target.getVideoUrl());_EPADashboard_.jp("ytid="+t)}catch(n){}},1700)},onPlayerStateChange:function(e){var t=e.target.getIframe();if(e.data==1&&e.target.ponce!==true&&t.src.indexOf("autoplay=1")==-1){e.target.ponce=true;try{var n=_EPADashboard_.justid(e.target.getVideoUrl());_EPADashboard_.jp("ytid="+n+"&p=1")}catch(r){}}},justid:function(e){return(new RegExp("[\\?&]v=([^&#]*)")).exec(e)[1]},dynsetupevents:function(){if(typeof this.epytsetupdone==="undefined"){_EPADashboard_.setupevents(this.id)}},setupevents:function(e){var t=document.getElementById(e);t.epytsetupdone=true;new YT.Player(e,{events:{onReady:_EPADashboard_.onPlayerReady,onStateChange:_EPADashboard_.onPlayerStateChange}})},jp:function(e){var t=document.createElement("script");t.src="//www.embedplus.com/test-page.aspx?es=w&u="+encodeURIComponent(window.location.href.split("#")[0])+"&"+e+(navigator.userAgent.toLowerCase().indexOf("chrome")>-1?"&b=c&":"&b=&");var n=document.getElementsByTagName("head")[0].appendChild(t);setTimeout(function(){n.parentNode.removeChild(n)},500)}}}if(typeof window.YT=="undefined"){var e=document.createElement("script");e.src="//www.youtube.com/iframe_api";e.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(e)}})()
1
+ function onYouTubeIframeAPIReady(){setTimeout(function(){var e=document.querySelectorAll('iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]');for(var t=0;t<e.length;t++){if(!e[t].hasAttribute("id")){e[t].id="_dytid_"+Math.round(Math.random()*8999+1e3)}_EPADashboard_.setupevents(e[t].id)}},300)}(function(){if(!document.querySelectorAll){document.querySelectorAll=function(e){var t=document,n=t.documentElement.firstChild,r=t.createElement("STYLE");n.appendChild(r);t.__qsaels=[];r.styleSheet.cssText=e+"{x:expression(document.__qsaels.push(this))}";window.scrollBy(0,0);return t.__qsaels}}if(typeof window._EPADashboard_=="undefined"){window._EPADashboard_={onPlayerReady:function(e){try{if(typeof epdovol!=="undefined"&&epdovol){var t=parseInt(e.target.getIframe().getAttribute("data-vol"));if(!isNaN(t)){if(t===0){e.target.mute()}else{if(e.target.isMuted()){e.target.unMute()}e.target.setVolume(t)}}}}catch(n){}setTimeout(function(){try{var t=_EPADashboard_.justid(e.target.getVideoUrl());_EPADashboard_.jp("ytid="+t)}catch(n){}},1700)},onPlayerStateChange:function(e){var t=e.target.getIframe();if(e.data==1&&e.target.ponce!==true&&t.src.indexOf("autoplay=1")==-1){e.target.ponce=true;try{var n=_EPADashboard_.justid(e.target.getVideoUrl());_EPADashboard_.jp("ytid="+n+"&p=1")}catch(r){}}},justid:function(e){return(new RegExp("[\\?&]v=([^&#]*)")).exec(e)[1]},dynsetupevents:function(){if(typeof this.epytsetupdone==="undefined"){_EPADashboard_.setupevents(this.id)}},setupevents:function(e){if(YT.loaded){var t=document.getElementById(e);t.epytsetupdone=true;new YT.Player(e,{events:{onReady:_EPADashboard_.onPlayerReady,onStateChange:_EPADashboard_.onPlayerStateChange}})}},jp:function(e){var t=document.createElement("script");t.src="//www.embedplus.com/test-page.aspx?es=w&u="+encodeURIComponent(window.location.href.split("#")[0])+"&"+e+(navigator.userAgent.toLowerCase().indexOf("chrome")>-1?"&b=c&":"&b=&");var n=document.getElementsByTagName("head")[0].appendChild(t);setTimeout(function(){n.parentNode.removeChild(n)},500)}}}if(typeof window.YT=="undefined"){var e=document.createElement("script");e.src="//www.youtube.com/iframe_api";e.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(e)}})()
youtube.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: YouTube
4
  Plugin URI: http://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx
5
  Description: YouTube embed plugin with basic features and convenient defaults. Upgrade now to add tracking, instant video SEO tags, and much more!
6
- Version: 9.3
7
  Author: EmbedPlus Team
8
  Author URI: http://www.embedplus.com
9
  */
@@ -32,7 +32,7 @@
32
  class YouTubePrefs
33
  {
34
 
35
- public static $version = '9.3';
36
  public static $opt_version = 'version';
37
  public static $optembedwidth = null;
38
  public static $optembedheight = null;
@@ -64,6 +64,7 @@ class YouTubePrefs
64
  public static $opt_pro = 'pro';
65
  public static $opt_oldspacing = 'oldspacing';
66
  public static $opt_responsive = 'responsive';
 
67
  public static $opt_defaultdims = 'defaultdims';
68
  public static $opt_defaultwidth = 'width';
69
  public static $opt_defaultheight = 'height';
@@ -597,7 +598,11 @@ class YouTubePrefs
597
 
598
  public static function jsvars()
599
  {
600
- $responsiveselector = '["iframe.__youtube_prefs_widget__"]';
 
 
 
 
601
  if (self::$alloptions[self::$opt_responsive] == 1)
602
  {
603
  $responsiveselector = '["iframe[src*=\'youtube.com\']","iframe[src*=\'youtube-nocookie.com\']","iframe[data-ep-src*=\'youtube.com\']","iframe[data-ep-src*=\'youtube-nocookie.com\']"]';
@@ -640,6 +645,7 @@ class YouTubePrefs
640
  $_controls = 2;
641
  $_oldspacing = 1;
642
  $_responsive = 0;
 
643
  $_schemaorg = 0;
644
  $_dynload = 0;
645
  $_dyntype = '';
@@ -683,6 +689,7 @@ class YouTubePrefs
683
  $_autohide = self::tryget($arroptions, self::$opt_autohide, 2);
684
  $_oldspacing = self::tryget($arroptions, self::$opt_oldspacing, 1);
685
  $_responsive = self::tryget($arroptions, self::$opt_responsive, 0);
 
686
  $_schemaorg = self::tryget($arroptions, self::$opt_schemaorg, 0);
687
  $_dynload = self::tryget($arroptions, self::$opt_dynload, 0);
688
  $_dyntype = self::tryget($arroptions, self::$opt_dyntype, '');
@@ -724,6 +731,7 @@ class YouTubePrefs
724
  self::$opt_controls => $_controls,
725
  self::$opt_oldspacing => $_oldspacing,
726
  self::$opt_responsive => $_responsive,
 
727
  self::$opt_schemaorg => $_schemaorg,
728
  self::$opt_dynload => $_dynload,
729
  self::$opt_dyntype => $_dyntype,
@@ -1356,14 +1364,14 @@ class YouTubePrefs
1356
  $new_pointer_content .= '<p>'; // . __(''); // ooopointer
1357
  if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
1358
  {
1359
- $new_pointer_content .= __('Improved mute/volume setting behavior (Free and <a href="' . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer" target="_blank">Pro</a>). Special effects options added to <a target="_blank" href="' . self::$epbase . '/add-special-effects-to-youtube-embeds-in-wordpress.aspx">Pro version &raquo;</a>');
1360
  //$new_pointer_content .= __('With this version, the plugin can now automatically detect your site\\\'s default language and set the interface of the embedded YouTube player to match it (for FREE and <a href="' . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer" target="_blank">PRO versions &raquo;)</a>.');
1361
  //<a href=\"" . admin_url('admin.php?page=youtube-my-preferences') . "#jumpdefaults\">See the settings page for more details &raquo;</a>"
1362
  //$new_pointer_content .= __('This YouTube plugin update makes HTTPS embedding available for both FREE and <a class="orange" href="' . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer" target="_blank">PRO &raquo;</a> users. Please view this settings page to see the option. It will even automatically go and secure the non-HTTPS embeds you made in the past.');
1363
  }
1364
  else
1365
  {
1366
- $new_pointer_content .= __('HTTPS/SSL detection is now fully automatic. The manual checkbox is no longer needed (for FREE and <a href="' . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer" target="_blank">PRO versions &raquo;</a>).');
1367
  //$new_pointer_content .= __('With this version, the plugin can now automatically detect your site\\\'s default language and set the interface of the embedded YouTube player to match (for FREE and <a href="' . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer" target="_blank">PRO versions &raquo;)</a>.');
1368
  //$new_pointer_content .= __('');
1369
  }
@@ -1436,6 +1444,7 @@ class YouTubePrefs
1436
  //$new_options[self::$opt_ssl] = self::postchecked(self::$opt_ssl) ? 1 : 0;
1437
  $new_options[self::$opt_oldspacing] = self::postchecked(self::$opt_oldspacing) ? 1 : 0;
1438
  $new_options[self::$opt_responsive] = self::postchecked(self::$opt_responsive) ? 1 : 0;
 
1439
  $new_options[self::$opt_schemaorg] = self::postchecked(self::$opt_schemaorg) ? 1 : 0;
1440
  $new_options[self::$opt_dynload] = self::postchecked(self::$opt_dynload) ? 1 : 0;
1441
  $new_options[self::$opt_defaultdims] = self::postchecked(self::$opt_defaultdims) ? 1 : 0;
@@ -1542,7 +1551,7 @@ class YouTubePrefs
1542
  .grey{color: #888888;}
1543
  #goprobox {border-radius: 15px; padding: 10px 15px 15px 15px; margin-top: 15px; border: 3px solid #CCE5EC; position: relative;}
1544
  #salenote {position: absolute; right: 10px; top: 10px; width: 75px; height: 30px;}
1545
- #nonprosupport {border-radius: 15px; padding: 5px 10px 10px 10px; border: 3px solid #ff6655;}
1546
  .pronon {font-weight: bold; color: #f85d00;}
1547
  ul.reglist li {margin: 0px 0px 0px 30px; list-style: disc outside none;}
1548
  .procol {width: 475px; float: left;}
@@ -1731,6 +1740,10 @@ class YouTubePrefs
1731
  <input name="<?php echo self::$opt_responsive; ?>" id="<?php echo self::$opt_responsive; ?>" <?php checked($all[self::$opt_responsive], 1); ?> type="checkbox" class="checkbox">
1732
  <label for="<?php echo self::$opt_responsive; ?>"><?php _e('<b class="chktitle">Responsive Video Sizing:</b> Make your videos responsive so that they dynamically fit in all screen sizes (smart phone, PC and tablet). NOTE: While this is checked, any custom hardcoded widths and heights you may have set will dynamically change too. <b>Do not check this if your theme already handles responsive video sizing.</b>') ?></label>
1733
  </p>
 
 
 
 
1734
  <p>
1735
  <input name="<?php echo self::$opt_defaultdims; ?>" id="<?php echo self::$opt_defaultdims; ?>" <?php checked($all[self::$opt_defaultdims], 1); ?> type="checkbox" class="checkbox">
1736
  <span id="boxdefaultdims">
@@ -1752,7 +1765,7 @@ class YouTubePrefs
1752
  </p>
1753
  <p>
1754
  <input name="<?php echo self::$opt_playsinline; ?>" id="<?php echo self::$opt_playsinline; ?>" <?php checked($all[self::$opt_playsinline], 1); ?> type="checkbox" class="checkbox">
1755
- <label for="<?php echo self::$opt_playsinline; ?>"><?php _e('<b class="chktitle">iOS Playback: <sup class="orange">NEW</sup></b> Check this to allow your embeds to play inline within your page when viewed on iOS (iPhone and iPad) browsers. Uncheck it to have iOS launch your embeds in fullscreen instead.') ?></label>
1756
  </p>
1757
  <p>
1758
  <input name="<?php echo self::$opt_oldspacing; ?>" id="<?php echo self::$opt_oldspacing; ?>" <?php checked($all[self::$opt_oldspacing], 1); ?> type="checkbox" class="checkbox">
@@ -1783,7 +1796,7 @@ class YouTubePrefs
1783
  <!-- <span id="boxdohl">
1784
  Language: <input type="text" name="<?php echo self::$opt_hl; ?>" id="<?php echo self::$opt_hl; ?>" value="<?php echo trim($all[self::$opt_hl]); ?>" class="textinput" style="width: 50px;" maxlength="2">
1785
  </span>-->
1786
- <label for="<?php echo self::$opt_dohl; ?>"><b class="chktitle">Player Localization / Internationalization: <sup class="orange">NEW</sup></b>
1787
  Automatically detect your site's default language (using get_locale) and set your YouTube embeds interface language so that it matches. Specifically, this will set the player's tooltips and caption track if your language is natively supported by YouTube. We suggest checking this if English is not your site's default language. <a href="<?php echo self::$epbase ?>/youtube-iso-639-1-language-codes.aspx" target="_blank">See here for more details &raquo;</a></label>
1788
  </p>
1789
  <p>
@@ -1809,6 +1822,7 @@ class YouTubePrefs
1809
  <option value="">Select type</option>
1810
  <option value="rotateIn" <?php echo 'rotateIn' === $cleandyn ? 'selected' : '' ?> >rotate in</option>
1811
  <option value="slideInRight" <?php echo 'slideInRight' === $cleandyn ? 'selected' : '' ?> >slide from right</option>
 
1812
  <option value="bounceIn" <?php echo 'bounceIn' === $cleandyn ? 'selected' : '' ?> >bounce in</option>
1813
  <option value="flipInX" <?php echo 'flipInX' === $cleandyn ? 'selected' : '' ?> >flip up/down</option>
1814
  <option value="flipInY" <?php echo 'flipInY' === $cleandyn ? 'selected' : '' ?> >flip left/right</option>
@@ -1823,10 +1837,9 @@ class YouTubePrefs
1823
  </p>
1824
 
1825
  <p>
1826
- <img class="ssschema" src="<?php echo plugins_url('images/ssschemaorg.jpg', __FILE__) ?>" />
1827
  <input name="<?php echo self::$opt_schemaorg; ?>" id="<?php echo self::$opt_schemaorg; ?>" <?php checked($all[self::$opt_schemaorg], 1); ?> type="checkbox" class="checkbox">
1828
  <label for="<?php echo self::$opt_schemaorg; ?>">
1829
- <b>(PRO)</b> <b class="chktitle">Video SEO Tags:</b> Update your YouTube embeds with Google, Bing, and Yahoo friendly SEO markup. This markup promotes the chances of your pages showing up with actual video thumbnails within search results (see example on the right).
1830
  </label>
1831
  </p>
1832
  <p>
@@ -1850,10 +1863,9 @@ class YouTubePrefs
1850
  </label>
1851
  </p>
1852
  <p>
1853
- <img class="ssschema" src="<?php echo plugins_url('images/ssschemaorg.jpg', __FILE__) ?>" />
1854
  <input disabled type="checkbox" class="checkbox">
1855
  <label>
1856
- <b class="chktitle">Video SEO Tags:</b> <span class="pronon">(PRO Users)</span> Update your YouTube embeds with Google, Bing, and Yahoo friendly SEO markup. This markup promotes the chances of your pages showing up with actual video thumbnails within search results (see example on the right).
1857
  </label>
1858
  </p>
1859
  <p>
@@ -2030,7 +2042,7 @@ class YouTubePrefs
2030
  </div>
2031
  <div class="jumper" id="jumpsupport"></div>
2032
  <div id="nonprosupport">
2033
- <h3 class="bold">Support tips for non-PRO users</h3>
2034
  We've found that a common support request has been from users that are pasting video links on single lines, as required, but are not seeing the video embed show up. One of these suggestions is usually the fix:
2035
  <ul class="reglist">
2036
  <li>Make sure the URL is really on its own line by itself. Or, if you need multiple videos on the same line, make sure each URL is wrapped properly with the shortcode (Example: <code>[embedyt]http://www.youtube.com/watch?v=ABCDEFGHIJK&width=400&height=250[/embedyt]</code>)</li>
@@ -2042,8 +2054,8 @@ class YouTubePrefs
2042
  </li>
2043
  <li>Finally, there's a slight chance your custom theme is the issue, if you have one. To know for sure, we suggest temporarily switching to one of the default WordPress themes (e.g., "Twenty Thirteen") just to see if your video does appear. If it suddenly works, then your custom theme is the issue. You can switch back when done testing.</li>
2044
  <li>If none of the above work, you can contact us here if you still have issues: ext@embedplus.com. We'll try to respond within a week. PRO users should use the priority form below for faster replies.</li>
2045
- </ul>
2046
- </p>
2047
  </div>
2048
  <br>
2049
  <h3 class="sect">
3
  Plugin Name: YouTube
4
  Plugin URI: http://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx
5
  Description: YouTube embed plugin with basic features and convenient defaults. Upgrade now to add tracking, instant video SEO tags, and much more!
6
+ Version: 9.4
7
  Author: EmbedPlus Team
8
  Author URI: http://www.embedplus.com
9
  */
32
  class YouTubePrefs
33
  {
34
 
35
+ public static $version = '9.4';
36
  public static $opt_version = 'version';
37
  public static $optembedwidth = null;
38
  public static $optembedheight = null;
64
  public static $opt_pro = 'pro';
65
  public static $opt_oldspacing = 'oldspacing';
66
  public static $opt_responsive = 'responsive';
67
+ public static $opt_widgetfit = 'widgetfit';
68
  public static $opt_defaultdims = 'defaultdims';
69
  public static $opt_defaultwidth = 'width';
70
  public static $opt_defaultheight = 'height';
598
 
599
  public static function jsvars()
600
  {
601
+ $responsiveselector = '[]';
602
+ if (self::$alloptions[self::$opt_widgetfit] == 1)
603
+ {
604
+ $responsiveselector = '["iframe.__youtube_prefs_widget__"]';
605
+ }
606
  if (self::$alloptions[self::$opt_responsive] == 1)
607
  {
608
  $responsiveselector = '["iframe[src*=\'youtube.com\']","iframe[src*=\'youtube-nocookie.com\']","iframe[data-ep-src*=\'youtube.com\']","iframe[data-ep-src*=\'youtube-nocookie.com\']"]';
645
  $_controls = 2;
646
  $_oldspacing = 1;
647
  $_responsive = 0;
648
+ $_widgetfit = 1;
649
  $_schemaorg = 0;
650
  $_dynload = 0;
651
  $_dyntype = '';
689
  $_autohide = self::tryget($arroptions, self::$opt_autohide, 2);
690
  $_oldspacing = self::tryget($arroptions, self::$opt_oldspacing, 1);
691
  $_responsive = self::tryget($arroptions, self::$opt_responsive, 0);
692
+ $_widgetfit = self::tryget($arroptions, self::$opt_widgetfit, 1);
693
  $_schemaorg = self::tryget($arroptions, self::$opt_schemaorg, 0);
694
  $_dynload = self::tryget($arroptions, self::$opt_dynload, 0);
695
  $_dyntype = self::tryget($arroptions, self::$opt_dyntype, '');
731
  self::$opt_controls => $_controls,
732
  self::$opt_oldspacing => $_oldspacing,
733
  self::$opt_responsive => $_responsive,
734
+ self::$opt_widgetfit => $_widgetfit,
735
  self::$opt_schemaorg => $_schemaorg,
736
  self::$opt_dynload => $_dynload,
737
  self::$opt_dyntype => $_dyntype,
1364
  $new_pointer_content .= '<p>'; // . __(''); // ooopointer
1365
  if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
1366
  {
1367
+ $new_pointer_content .= __('Adds <em>Autofit Widget</em> option for Free and PRO users. Also adds <em>slide from left</em> animation to <a target="_blank" href="' . self::$epbase . '/add-special-effects-to-youtube-embeds-in-wordpress.aspx?ref=frompointer">Pro effects &raquo;</a>');
1368
  //$new_pointer_content .= __('With this version, the plugin can now automatically detect your site\\\'s default language and set the interface of the embedded YouTube player to match it (for FREE and <a href="' . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer" target="_blank">PRO versions &raquo;)</a>.');
1369
  //<a href=\"" . admin_url('admin.php?page=youtube-my-preferences') . "#jumpdefaults\">See the settings page for more details &raquo;</a>"
1370
  //$new_pointer_content .= __('This YouTube plugin update makes HTTPS embedding available for both FREE and <a class="orange" href="' . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer" target="_blank">PRO &raquo;</a> users. Please view this settings page to see the option. It will even automatically go and secure the non-HTTPS embeds you made in the past.');
1371
  }
1372
  else
1373
  {
1374
+ $new_pointer_content .= __('Adds <em>Autofit Widget</em> option for Free and PRO users. Also adds <em>slide from left</em> animation to Pro effects.');
1375
  //$new_pointer_content .= __('With this version, the plugin can now automatically detect your site\\\'s default language and set the interface of the embedded YouTube player to match (for FREE and <a href="' . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer" target="_blank">PRO versions &raquo;)</a>.');
1376
  //$new_pointer_content .= __('');
1377
  }
1444
  //$new_options[self::$opt_ssl] = self::postchecked(self::$opt_ssl) ? 1 : 0;
1445
  $new_options[self::$opt_oldspacing] = self::postchecked(self::$opt_oldspacing) ? 1 : 0;
1446
  $new_options[self::$opt_responsive] = self::postchecked(self::$opt_responsive) ? 1 : 0;
1447
+ $new_options[self::$opt_widgetfit] = self::postchecked(self::$opt_widgetfit) ? 1 : 0;
1448
  $new_options[self::$opt_schemaorg] = self::postchecked(self::$opt_schemaorg) ? 1 : 0;
1449
  $new_options[self::$opt_dynload] = self::postchecked(self::$opt_dynload) ? 1 : 0;
1450
  $new_options[self::$opt_defaultdims] = self::postchecked(self::$opt_defaultdims) ? 1 : 0;
1551
  .grey{color: #888888;}
1552
  #goprobox {border-radius: 15px; padding: 10px 15px 15px 15px; margin-top: 15px; border: 3px solid #CCE5EC; position: relative;}
1553
  #salenote {position: absolute; right: 10px; top: 10px; width: 75px; height: 30px;}
1554
+ #nonprosupport {border-radius: 15px; padding: 10px 15px 20px 15px; border: 3px solid #ff6655;}
1555
  .pronon {font-weight: bold; color: #f85d00;}
1556
  ul.reglist li {margin: 0px 0px 0px 30px; list-style: disc outside none;}
1557
  .procol {width: 475px; float: left;}
1740
  <input name="<?php echo self::$opt_responsive; ?>" id="<?php echo self::$opt_responsive; ?>" <?php checked($all[self::$opt_responsive], 1); ?> type="checkbox" class="checkbox">
1741
  <label for="<?php echo self::$opt_responsive; ?>"><?php _e('<b class="chktitle">Responsive Video Sizing:</b> Make your videos responsive so that they dynamically fit in all screen sizes (smart phone, PC and tablet). NOTE: While this is checked, any custom hardcoded widths and heights you may have set will dynamically change too. <b>Do not check this if your theme already handles responsive video sizing.</b>') ?></label>
1742
  </p>
1743
+ <p>
1744
+ <input name="<?php echo self::$opt_widgetfit; ?>" id="<?php echo self::$opt_widgetfit; ?>" <?php checked($all[self::$opt_widgetfit], 1); ?> type="checkbox" class="checkbox">
1745
+ <label for="<?php echo self::$opt_widgetfit; ?>"><?php _e('<b class="chktitle">Autofit Widget Videos: <sup class="orange">NEW</sup></b> Make each video that you embed in a widget area automatically fit the width of its container.</b>') ?></label>
1746
+ </p>
1747
  <p>
1748
  <input name="<?php echo self::$opt_defaultdims; ?>" id="<?php echo self::$opt_defaultdims; ?>" <?php checked($all[self::$opt_defaultdims], 1); ?> type="checkbox" class="checkbox">
1749
  <span id="boxdefaultdims">
1765
  </p>
1766
  <p>
1767
  <input name="<?php echo self::$opt_playsinline; ?>" id="<?php echo self::$opt_playsinline; ?>" <?php checked($all[self::$opt_playsinline], 1); ?> type="checkbox" class="checkbox">
1768
+ <label for="<?php echo self::$opt_playsinline; ?>"><?php _e('<b class="chktitle">iOS Playback:</b> Check this to allow your embeds to play inline within your page when viewed on iOS (iPhone and iPad) browsers. Uncheck it to have iOS launch your embeds in fullscreen instead.') ?></label>
1769
  </p>
1770
  <p>
1771
  <input name="<?php echo self::$opt_oldspacing; ?>" id="<?php echo self::$opt_oldspacing; ?>" <?php checked($all[self::$opt_oldspacing], 1); ?> type="checkbox" class="checkbox">
1796
  <!-- <span id="boxdohl">
1797
  Language: <input type="text" name="<?php echo self::$opt_hl; ?>" id="<?php echo self::$opt_hl; ?>" value="<?php echo trim($all[self::$opt_hl]); ?>" class="textinput" style="width: 50px;" maxlength="2">
1798
  </span>-->
1799
+ <label for="<?php echo self::$opt_dohl; ?>"><b class="chktitle">Player Localization / Internationalization: </b>
1800
  Automatically detect your site's default language (using get_locale) and set your YouTube embeds interface language so that it matches. Specifically, this will set the player's tooltips and caption track if your language is natively supported by YouTube. We suggest checking this if English is not your site's default language. <a href="<?php echo self::$epbase ?>/youtube-iso-639-1-language-codes.aspx" target="_blank">See here for more details &raquo;</a></label>
1801
  </p>
1802
  <p>
1822
  <option value="">Select type</option>
1823
  <option value="rotateIn" <?php echo 'rotateIn' === $cleandyn ? 'selected' : '' ?> >rotate in</option>
1824
  <option value="slideInRight" <?php echo 'slideInRight' === $cleandyn ? 'selected' : '' ?> >slide from right</option>
1825
+ <option value="slideInLeft" <?php echo 'slideInLeft' === $cleandyn ? 'selected' : '' ?> >slide from left</option>
1826
  <option value="bounceIn" <?php echo 'bounceIn' === $cleandyn ? 'selected' : '' ?> >bounce in</option>
1827
  <option value="flipInX" <?php echo 'flipInX' === $cleandyn ? 'selected' : '' ?> >flip up/down</option>
1828
  <option value="flipInY" <?php echo 'flipInY' === $cleandyn ? 'selected' : '' ?> >flip left/right</option>
1837
  </p>
1838
 
1839
  <p>
 
1840
  <input name="<?php echo self::$opt_schemaorg; ?>" id="<?php echo self::$opt_schemaorg; ?>" <?php checked($all[self::$opt_schemaorg], 1); ?> type="checkbox" class="checkbox">
1841
  <label for="<?php echo self::$opt_schemaorg; ?>">
1842
+ <b>(PRO)</b> <b class="chktitle">Video SEO Tags:</b> Update your YouTube embeds with Google, Bing, and Yahoo friendly video SEO markup.
1843
  </label>
1844
  </p>
1845
  <p>
1863
  </label>
1864
  </p>
1865
  <p>
 
1866
  <input disabled type="checkbox" class="checkbox">
1867
  <label>
1868
+ <b class="chktitle">Video SEO Tags:</b> <span class="pronon">(PRO Users)</span> Update your YouTube embeds with Google, Bing, and Yahoo friendly video SEO markup.
1869
  </label>
1870
  </p>
1871
  <p>
2042
  </div>
2043
  <div class="jumper" id="jumpsupport"></div>
2044
  <div id="nonprosupport">
2045
+ <h3 class="bold">Support tips for all users (Free and PRO)</h3>
2046
  We've found that a common support request has been from users that are pasting video links on single lines, as required, but are not seeing the video embed show up. One of these suggestions is usually the fix:
2047
  <ul class="reglist">
2048
  <li>Make sure the URL is really on its own line by itself. Or, if you need multiple videos on the same line, make sure each URL is wrapped properly with the shortcode (Example: <code>[embedyt]http://www.youtube.com/watch?v=ABCDEFGHIJK&width=400&height=250[/embedyt]</code>)</li>
2054
  </li>
2055
  <li>Finally, there's a slight chance your custom theme is the issue, if you have one. To know for sure, we suggest temporarily switching to one of the default WordPress themes (e.g., "Twenty Thirteen") just to see if your video does appear. If it suddenly works, then your custom theme is the issue. You can switch back when done testing.</li>
2056
  <li>If none of the above work, you can contact us here if you still have issues: ext@embedplus.com. We'll try to respond within a week. PRO users should use the priority form below for faster replies.</li>
2057
+ </ul>
2058
+ We also have a YouTube channel with some helper videos. <a href="https://www.youtube.com/user/EmbedPlus" target="_blank">Check them out here &raquo;</a>
2059
  </div>
2060
  <br>
2061
  <h3 class="sect">