YouTube - Version 8.9

Version Description

Download this release

Release Info

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

Code changes from version 8.8 to 8.9

Files changed (4) hide show
  1. images/iconvolume.png +0 -0
  2. readme.txt +21 -13
  3. scripts/ytprefs.min.js +1 -1
  4. youtube.php +110 -72
images/iconvolume.png ADDED
Binary file
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === YouTube ===
2
  Contributors: embedplus
3
  Plugin Name: YouTube Embed
4
- Tags: 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
5
  Requires at least: 2.9
6
- Tested up to: 3.9.2
7
- Stable tag: 8.8
8
  License: GPLv3 or later
9
 
10
  YouTube embed plugin with basic features and convenient defaults. Upgrade now to add tracking, instant video SEO tags, and much more!
@@ -22,15 +22,22 @@ YouTube embed plugin with basic features and convenient defaults. Upgrade now to
22
  * Review the latest web discussions about videos you want to embed before embedding
23
  * Shortcode support for embedding multiple videos on one line
24
  * Playlist support
25
- * (PRO) Automatic Open Graph tagging for Facebook
26
- * (PRO) See if your embeds have restrictions that can block your site's mobile visitors from viewing
27
- * (PRO) Automatic tagging for video SEO
28
- * (PRO) Analytics and deleted video alerts work with past YouTube videos that you embedded with many other YouTube plugins
29
- * (PRO) Alerts when visitors from different countries are blocked from viewing your embeds
30
- * (PRO) Music video embedding extras
31
- * And more...
32
 
33
- This plugin helps you easily manage the growing complexity of YouTube. It can also be upgraded to PRO for enhanced SEO and performance for you and your visitors. It provides the basic features of the YouTube embedded player and will have you posting videos in seconds after installing it. **All you have to do is simply paste an unformatted YouTube link on its own line (shortcodes are also supported).** Your YouTube embed will then show up when you preview or publish the post. The settings page has plenty of default options that you can automatically apply to all your embedded YouTube videos. **Check out the free options below:**
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
  * Force HD quality when available
36
  * Make your videos responsive so that they dynamically fit in all screen sizes (smart phone, PC and tablet)
@@ -77,8 +84,6 @@ Beyond the above features, you have the option of upgrading to PRO to add enhanc
77
  * How much do the producers of the YouTube videos you embed rely on **your site**, versus other sites and YouTube.com, for views?
78
  * Are you embedding videos that are blocked in other countries?
79
 
80
- Recently, we also added Video SEO tags, which adds markup that can improve your click rates and video SERP rankings.
81
-
82
  See more details after installing. Enjoy!
83
 
84
  [Maintained by EmbedPlus for YouTube >>](http://www.embedplus.com/)
@@ -128,6 +133,9 @@ You can also start and end each individual video at particular times. Like the a
128
 
129
  == Changelog ==
130
 
 
 
 
131
  = YouTube Embed 8.8 =
132
  * Better embedplus plugin conflict notifications.
133
  * Greater emphasis on HTTPS support due to Google's recent announcement about [HTTPS/SSL as an SEO/SERP signal](http://embedplus.com/convert-old-youtube-embeds-to-https-ssl.aspx).
1
  === YouTube ===
2
  Contributors: embedplus
3
  Plugin Name: YouTube Embed
4
+ Tags: 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
5
  Requires at least: 2.9
6
+ Tested up to: 4.0
7
+ Stable tag: 8.9
8
  License: GPLv3 or later
9
 
10
  YouTube embed plugin with basic features and convenient defaults. Upgrade now to add tracking, instant video SEO tags, and much more!
22
  * Review the latest web discussions about videos you want to embed before embedding
23
  * Shortcode support for embedding multiple videos on one line
24
  * Playlist support
25
+ * Volume level initialization ( [helpful for autoplay >>](http://www.embedplus.com/mute-volume-youtube-wordpress.aspx) )
 
 
 
 
 
 
26
 
27
+ You can even extend the plugin with PRO features like:
28
+
29
+ * Automatic tagging for video SEO
30
+ * Automatic Open Graph tagging for Facebook
31
+ * Deleted video alerts (i.e., did Google remove or take down videos I previously embedded?)
32
+ * Mobile compatibility checking (i.e., see if your embeds have restrictions that can block your site's mobile visitors from viewing)
33
+ * Alerts when visitors from different countries are blocked from viewing your embeds
34
+ * And more features and analytics...
35
+
36
+ **Click the Download button to start exploring now, or take a look at some details below.**
37
+
38
+ This plugin helps you easily manage the growing complexity of YouTube embedding. It provides a spectrum of basic and advanced features of the YouTube embedded player and will have you posting videos in seconds after installing it. **All you have to do is simply paste an unformatted YouTube link on its own line (shortcodes are also supported).** Your YouTube embeds will then show up when you preview or publish the post.
39
+
40
+ The settings page has plenty of default options that you can automatically apply to all your embedded YouTube videos. **Check out the free options below:**
41
 
42
  * Force HD quality when available
43
  * Make your videos responsive so that they dynamically fit in all screen sizes (smart phone, PC and tablet)
84
  * How much do the producers of the YouTube videos you embed rely on **your site**, versus other sites and YouTube.com, for views?
85
  * Are you embedding videos that are blocked in other countries?
86
 
 
 
87
  See more details after installing. Enjoy!
88
 
89
  [Maintained by EmbedPlus for YouTube >>](http://www.embedplus.com/)
133
 
134
  == Changelog ==
135
 
136
+ = YouTube Embed 8.9 =
137
+ Allows volume level initialization.
138
+
139
  = YouTube Embed 8.8 =
140
  * Better embedplus plugin conflict notifications.
141
  * Greater emphasis on HTTPS support due to Google's recent announcement about [HTTPS/SSL as an SEO/SERP signal](http://embedplus.com/convert-old-youtube-embeds-to-https-ssl.aspx).
scripts/ytprefs.min.js CHANGED
@@ -1 +1 @@
1
- function onYouTubeIframeAPIReady(){setTimeout(function(){var e=document.querySelectorAll('iframe.__youtube_prefs__, 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)}},2e3)}(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{var t=_EPADashboard_.justid(e.target.getVideoUrl());_EPADashboard_.jp("ytid="+t)}catch(n){}},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]},setupevents:function(e){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__, 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{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]},setupevents:function(e){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: 8.8
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 = '8.8';
36
  public static $opt_version = 'version';
37
  public static $optembedwidth = null;
38
  public static $optembedheight = null;
@@ -601,6 +601,7 @@ class YouTubePrefs
601
  <script type="text/javascript">
602
  var eppathtoscripts = "<?php echo plugins_url('scripts/', __FILE__); ?>";
603
  var epresponsiveselector = <?php echo $responsiveselector; ?>;
 
604
  </script>
605
  <?php
606
  }
@@ -640,8 +641,8 @@ class YouTubePrefs
640
  $_defaultwidth = '';
641
  $_defaultheight = '';
642
  $_playsinline = 0;
643
- // epvol $_defaultvol = 0;
644
- // epvol $_vol = '';
645
 
646
  $arroptions = get_option(self::$opt_alloptions);
647
 
@@ -675,8 +676,8 @@ class YouTubePrefs
675
  $_defaultdims = self::tryget($arroptions, self::$opt_defaultdims, 0);
676
  $_defaultwidth = self::tryget($arroptions, self::$opt_defaultwidth, '');
677
  $_defaultheight = self::tryget($arroptions, self::$opt_defaultheight, '');
678
- // epvol $_defaultvol = self::tryget($arroptions, self::$opt_defaultvol, 0);
679
- // epvol $_vol = self::tryget($arroptions, self::$opt_vol, '');
680
  }
681
  else
682
  {
@@ -712,8 +713,8 @@ class YouTubePrefs
712
  self::$opt_defaultdims => $_defaultdims,
713
  self::$opt_defaultwidth => $_defaultwidth,
714
  self::$opt_defaultheight => $_defaultheight,
715
- // epvol self::$opt_defaultvol => $_defaultvol,
716
- // epvol self::$opt_vol => $_vol
717
  );
718
 
719
  update_option(self::$opt_alloptions, $all);
@@ -801,7 +802,7 @@ class YouTubePrefs
801
  $linkscheme = 'http';
802
  $youtubebaseurl = 'youtube';
803
  $schemaorgoutput = '';
804
- // epvol $voloutput = '';
805
 
806
  $finalparams = $linkparams + self::$alloptions;
807
 
@@ -817,6 +818,12 @@ class YouTubePrefs
817
  $linkscheme = 'https';
818
  }
819
 
 
 
 
 
 
 
820
  if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0)
821
  {
822
  if (isset($finalparams[self::$opt_html5]) && $finalparams[self::$opt_html5] == 0)
@@ -828,6 +835,11 @@ class YouTubePrefs
828
  {
829
  $schemaorgoutput = self::getschemaorgoutput($finalparams['v']);
830
  }
 
 
 
 
 
831
  }
832
  else
833
  {
@@ -835,6 +847,10 @@ class YouTubePrefs
835
  {
836
  unset($finalparams[self::$opt_html5]);
837
  }
 
 
 
 
838
  }
839
 
840
  $centercode = '';
@@ -846,7 +862,7 @@ class YouTubePrefs
846
  $code1 = '<iframe ' . $centercode . ' id="_ytid_' . rand(10000, 99999) . '" width="' . self::$defaultwidth . '" height="' . self::$defaultheight .
847
  '" src="' . $linkscheme . '://www.' . $youtubebaseurl . '.com/embed/' . (isset($linkparams['v']) ? $linkparams['v'] : '') . '?';
848
  $code2 = '" frameborder="0" type="text/html" class="__youtube_prefs__' . ($iscontent ? '' : ' __youtube_prefs_widget__') .
849
- '" allowfullscreen webkitallowfullscreen mozallowfullscreen ></iframe>' . $schemaorgoutput;
850
 
851
  $origin = '';
852
 
@@ -1193,7 +1209,7 @@ class YouTubePrefs
1193
 
1194
  public static function custom_admin_pointers_check()
1195
  {
1196
- return false; // ooopointer shut all off;
1197
  $admin_pointers = self::custom_admin_pointers();
1198
  foreach ($admin_pointers as $pointer => $array)
1199
  {
@@ -1284,7 +1300,7 @@ class YouTubePrefs
1284
  ?>
1285
  }
1286
 
1287
- ep_do_pointers(jQuery); // switch off all pointers ooopointer
1288
  /* ]]> */
1289
  </script>
1290
  <?php
@@ -1301,11 +1317,12 @@ class YouTubePrefs
1301
  $new_pointer_content .= '<p>'; // . __(''); // ooopointer
1302
  if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
1303
  {
1304
- $new_pointer_content .= __("(PRO) Extends the plugin\'s existing tagging capabilities by also adding Open Graph markup to enhance Facebook sharing/discovery of your pages. Read more in the plugin\'s <a href=\"" . admin_url('admin.php?page=youtube-my-preferences') . "#jumppro\">settings page &raquo;</a>");
1305
  //$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.');
1306
  }
1307
  else
1308
  {
 
1309
  //$new_pointer_content .= __('');
1310
  }
1311
  $new_pointer_content .= '</p>';
@@ -1379,7 +1396,7 @@ class YouTubePrefs
1379
  $new_options[self::$opt_responsive] = self::postchecked(self::$opt_responsive) ? 1 : 0;
1380
  $new_options[self::$opt_schemaorg] = self::postchecked(self::$opt_schemaorg) ? 1 : 0;
1381
  $new_options[self::$opt_defaultdims] = self::postchecked(self::$opt_defaultdims) ? 1 : 0;
1382
- // epvol $new_options[self::$opt_defaultvol] = self::postchecked(self::$opt_defaultvol) ? 1 : 0;
1383
 
1384
  $_defaultwidth = '';
1385
  try
@@ -1403,16 +1420,16 @@ class YouTubePrefs
1403
  }
1404
  $new_options[self::$opt_defaultheight] = $_defaultheight;
1405
 
1406
- // epvol $_vol = '';
1407
- // epvol try
1408
- //epvol {
1409
- // $_vol = is_numeric(trim($_POST[self::$opt_vol])) ? intval(trim($_POST[self::$opt_vol])) : $_vol;
1410
- //epvol }
1411
- // catch (Exception $ex)
1412
- // {
1413
- // epvol
1414
- // }
1415
- //epvol $new_options[self::$opt_vol] = $_vol;
1416
 
1417
  $all = $new_options + $all;
1418
 
@@ -1458,7 +1475,7 @@ class YouTubePrefs
1458
  #nonprosupport {border-radius: 15px; padding: 5px 10px 10px 10px; border: 3px solid #ff6655;}
1459
  .pronon {font-weight: bold; color: #f85d00;}
1460
  ul.reglist li {margin: 0px 0px 0px 30px; list-style: disc outside none;}
1461
- .procol {width: 465px; float: left;}
1462
  .smallnote {font-style: italic; font-size: 10px;}
1463
  .italic {font-style: italic;}
1464
  .ytindent h3 {font-size: 15px; line-height: 22px; margin: 5px 0px 10px 0px;}
@@ -1470,9 +1487,6 @@ class YouTubePrefs
1470
  .cuz {background-image: linear-gradient(to bottom,#4983FF,#0C5597) !important; color: #ffffff;}
1471
  .brightpro {background-image: linear-gradient(to bottom,#ff5500,#cc2200) !important; color: #ffffff;}
1472
  #boxdefaultdims {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_defaultdims] ? '' : 'display: none;' ?>}
1473
- #boxdefaultvol {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_defaultvol] ? '' : 'display: none;' ?>}
1474
- .vol-output {display: inline-block; width: 30px; color: #008800;}
1475
- input#vol {vertical-align: middle;}
1476
  .textinput {border-width: 2px !important;}
1477
  h3.sect {border-radius: 10px; background-color: #D9E9F7; padding: 5px 5px 5px 10px; position: relative; font-weight: bold;}
1478
  h3.sect a {text-decoration: none; color: #E20000;}
@@ -1489,6 +1503,12 @@ class YouTubePrefs
1489
  b, strong {font-weight: bold;}
1490
  input.checkbox[disabled] {border: 1px dotted #444444;}
1491
  .pad10 {padding: 10px;}
 
 
 
 
 
 
1492
  </style>
1493
 
1494
  <div class="ytindent">
@@ -1663,6 +1683,16 @@ class YouTubePrefs
1663
  This will go back and also secure your past embeds as they are loaded on their pages. Most web browsers will warn users when they access web pages via HTTPS that contain embedded content loaded via HTTP. If your main site is currently accessed via HTTPS, using HTTPS URLs for your YouTube embeds will prevent your users from running into that warning. If you're not currently supporting HTTPS/SSL, <a href="http://embedplus.com/convert-old-youtube-embeds-to-https-ssl.aspx" target="_blank">here's some motivation from Google &raquo;</a>
1664
  </label>
1665
  </p>
 
 
 
 
 
 
 
 
 
 
1666
 
1667
 
1668
  <p class="smallnote orange">Below are PRO features for enhanced SEO and performance (works for even past embed links):</p>
@@ -1691,13 +1721,6 @@ class YouTubePrefs
1691
  <b>(PRO)</b> <b class="chktitle">Facebook Open Graph Markup:</b> <span class="pronon">(NEW: PRO Users)</span> Update YouTube embeds on your pages with Open Graph markup to enhance Facebook sharing and discovery of the pages. Your shared pages, for example, will also display embedded video thumbnails on Facebook Timelines.
1692
  </label>
1693
  </p>
1694
- <!-- epvol <p>
1695
- <input name="<?php echo self::$opt_defaultvol; ?>" id="<?php echo self::$opt_defaultvol; ?>" <?php checked($all[self::$opt_defaultvol], 1); ?> type="checkbox" class="checkbox">
1696
- <span id="boxdefaultvol">
1697
- Volume: <span class="vol-output"></span> <input min="0" max="100" step="1" type="range" name="<?php echo self::$opt_vol; ?>" id="<?php echo self::$opt_vol; ?>" value="<?php echo trim($all[self::$opt_vol]); ?>" >
1698
- </span>
1699
- <label for="<?php echo self::$opt_defaultvol; ?>"><b>(PRO)</b> <b class="chktitle">Default Volume:</b> <span class="pronon">(NEW: PRO Users)</span> Make my videos have a default volume</label>
1700
- </p>-->
1701
 
1702
  <?php
1703
  }
@@ -1818,10 +1841,9 @@ class YouTubePrefs
1818
  Check if your embeds have restrictions that can block mobile viewing <sup class="orange bold">NEW</sup>
1819
  </li>
1820
 
1821
-
1822
  </ul>
1823
  </div>
1824
- <div class="procol" style="max-width: 400px;">
1825
  <ul class="gopro">
1826
  <li>
1827
  <img src="<?php echo plugins_url('images/prioritysupport.png', __FILE__) ?>">
@@ -1841,18 +1863,18 @@ class YouTubePrefs
1841
  Instant YouTube embed diagnostic reports
1842
  </li>
1843
  <li>
1844
- <img src="<?php echo plugins_url('images/iconmusic.png', __FILE__) ?>">
1845
- Music video extras to inspire your posts <sup class="orange bold">NEW</sup>
1846
- </li>
1847
 
1848
  <li>
1849
  <img src="<?php echo plugins_url('images/infinity.png', __FILE__) ?>">
1850
  Unlimited PRO upgrades and downloads
1851
  </li>
1852
- <!-- <li>
1853
- <img src="<?php echo plugins_url('images/questionsale.png', __FILE__) ?>">
1854
- What else? You tell us!
1855
- </li> -->
1856
  </ul>
1857
  </div>
1858
  <div style="clear: both;"></div>
@@ -1953,15 +1975,15 @@ class YouTubePrefs
1953
  }
1954
  }
1955
 
1956
- // epvol if (jQuery("#<?php echo self::$opt_defaultvol; ?>").is(":checked"))
1957
- // epvol {
1958
- // if (!(jQuery.isNumeric(jQuery.trim(jQuery("#<?php echo self::$opt_vol; ?>").val()))))
1959
- // {
1960
- // epvol alertmessage += "Please enter a number between 0 and 100 for the default volume, or uncheck the option.";
1961
- // jQuery("#boxdefaultvol input").css("background-color", "#ffcccc").css("border", "2px solid #000000");
1962
- // valid = false;
1963
- // epvol }
1964
- // epvol }
1965
 
1966
  if (!valid)
1967
  {
@@ -1987,23 +2009,39 @@ class YouTubePrefs
1987
 
1988
  });
1989
 
1990
- // epvol jQuery('#<?php echo self::$opt_defaultvol; ?>').change(function()
1991
- // {
1992
- // if (jQuery(this).is(":checked"))
1993
- // {
1994
- // epvol jQuery("#boxdefaultvol").show(500);
1995
- // }
1996
- // else
1997
- // {
1998
- // jQuery("#boxdefaultvol").hide(500);
1999
- // }
2000
- //
2001
- // epvol });
2002
- //
2003
- // $("input#vol").on("input change", function() {
2004
- // $('.vol-output').text($(this).val() > 0 ? $(this).val() + '%' : 'Mute');
2005
- // });
2006
- // epvol $('.vol-output').text($("input#vol").val() > 0 ? $("input#vol").val() + '%' : 'Mute');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2007
 
2008
  jQuery("#showcase-validate").click(function() {
2009
  window.open("<?php echo self::$epbase . "/showcase-validate.aspx?prokey=" . self::$alloptions[self::$opt_pro] ?>" + "&domain=" + mydomain);
@@ -2025,7 +2063,7 @@ class YouTubePrefs
2025
  tempscript.src = "//www.embedplus.com/dashboard/wordpress-pro-validatejp.aspx?simple=1&prokey=" + prokeyval + "&domain=" + mydomain;
2026
  var n = document.getElementsByTagName("head")[0].appendChild(tempscript);
2027
  setTimeout(function() {
2028
- n.parentNode.removeChild(n)
2029
  }, 500);
2030
  return false;
2031
  });
@@ -2195,7 +2233,7 @@ class YouTubePrefs
2195
  add_action('wp_print_scripts', 'youtubeprefs_output_scriptvars');
2196
 
2197
  if (
2198
- (!(isset(YouTubePrefs::$alloptions[YouTubePrefs::$opt_pro]) && strlen(trim(YouTubePrefs::$alloptions[YouTubePrefs::$opt_pro])) > 0)) && // display only if not pro ooopointer
2199
  (get_bloginfo('version') >= '3.3') && YouTubePrefs::custom_admin_pointers_check()
2200
  )
2201
  {
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: 8.9
7
  Author: EmbedPlus Team
8
  Author URI: http://www.embedplus.com
9
  */
32
  class YouTubePrefs
33
  {
34
 
35
+ public static $version = '8.9';
36
  public static $opt_version = 'version';
37
  public static $optembedwidth = null;
38
  public static $optembedheight = null;
601
  <script type="text/javascript">
602
  var eppathtoscripts = "<?php echo plugins_url('scripts/', __FILE__); ?>";
603
  var epresponsiveselector = <?php echo $responsiveselector; ?>;
604
+ var epdovol = true; //<?php echo (self::$alloptions[self::$opt_defaultvol] == 1 ? 'true' : 'false') ?>;
605
  </script>
606
  <?php
607
  }
641
  $_defaultwidth = '';
642
  $_defaultheight = '';
643
  $_playsinline = 0;
644
+ $_defaultvol = 0;
645
+ $_vol = '';
646
 
647
  $arroptions = get_option(self::$opt_alloptions);
648
 
676
  $_defaultdims = self::tryget($arroptions, self::$opt_defaultdims, 0);
677
  $_defaultwidth = self::tryget($arroptions, self::$opt_defaultwidth, '');
678
  $_defaultheight = self::tryget($arroptions, self::$opt_defaultheight, '');
679
+ $_defaultvol = self::tryget($arroptions, self::$opt_defaultvol, 0);
680
+ $_vol = self::tryget($arroptions, self::$opt_vol, '');
681
  }
682
  else
683
  {
713
  self::$opt_defaultdims => $_defaultdims,
714
  self::$opt_defaultwidth => $_defaultwidth,
715
  self::$opt_defaultheight => $_defaultheight,
716
+ self::$opt_defaultvol => $_defaultvol,
717
+ self::$opt_vol => $_vol
718
  );
719
 
720
  update_option(self::$opt_alloptions, $all);
802
  $linkscheme = 'http';
803
  $youtubebaseurl = 'youtube';
804
  $schemaorgoutput = '';
805
+ $voloutput = '';
806
 
807
  $finalparams = $linkparams + self::$alloptions;
808
 
818
  $linkscheme = 'https';
819
  }
820
 
821
+ if (self::$alloptions[self::$opt_defaultvol] == 1)
822
+ {
823
+ $voloutput = ' data-vol="' . self::$alloptions[self::$opt_vol] . '" ';
824
+ }
825
+
826
+
827
  if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0)
828
  {
829
  if (isset($finalparams[self::$opt_html5]) && $finalparams[self::$opt_html5] == 0)
835
  {
836
  $schemaorgoutput = self::getschemaorgoutput($finalparams['v']);
837
  }
838
+
839
+ if (isset($linkparams[self::$opt_vol]) && is_numeric(trim($linkparams[self::$opt_vol])))
840
+ {
841
+ $voloutput = ' data-vol="' . $linkparams[self::$opt_vol] . '" ';
842
+ }
843
  }
844
  else
845
  {
847
  {
848
  unset($finalparams[self::$opt_html5]);
849
  }
850
+ if (isset($finalparams[self::$opt_vol]))
851
+ {
852
+ unset($finalparams[self::$opt_vol]);
853
+ }
854
  }
855
 
856
  $centercode = '';
862
  $code1 = '<iframe ' . $centercode . ' id="_ytid_' . rand(10000, 99999) . '" width="' . self::$defaultwidth . '" height="' . self::$defaultheight .
863
  '" src="' . $linkscheme . '://www.' . $youtubebaseurl . '.com/embed/' . (isset($linkparams['v']) ? $linkparams['v'] : '') . '?';
864
  $code2 = '" frameborder="0" type="text/html" class="__youtube_prefs__' . ($iscontent ? '' : ' __youtube_prefs_widget__') .
865
+ '"' . $voloutput . ' allowfullscreen webkitallowfullscreen mozallowfullscreen ></iframe>' . $schemaorgoutput;
866
 
867
  $origin = '';
868
 
1209
 
1210
  public static function custom_admin_pointers_check()
1211
  {
1212
+ //return false; // ooopointer shut all off;
1213
  $admin_pointers = self::custom_admin_pointers();
1214
  foreach ($admin_pointers as $pointer => $array)
1215
  {
1300
  ?>
1301
  }
1302
 
1303
+ ep_do_pointers(jQuery); // switch off all pointers via js ooopointer
1304
  /* ]]> */
1305
  </script>
1306
  <?php
1317
  $new_pointer_content .= '<p>'; // . __(''); // ooopointer
1318
  if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
1319
  {
1320
+ $new_pointer_content .= __("This update allows volume level initialization for your YouTube embeds. <a href=\"" . admin_url('admin.php?page=youtube-my-preferences') . "#jumpdefaults\">See the settings page for more details &raquo;</a>");
1321
  //$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.');
1322
  }
1323
  else
1324
  {
1325
+ $new_pointer_content .= __("This update allows volume level initialization for your YouTube embeds. <a href=\"" . admin_url('admin.php?page=youtube-my-preferences') . "#jumpdefaults\">See the settings page for more details &raquo;</a>");
1326
  //$new_pointer_content .= __('');
1327
  }
1328
  $new_pointer_content .= '</p>';
1396
  $new_options[self::$opt_responsive] = self::postchecked(self::$opt_responsive) ? 1 : 0;
1397
  $new_options[self::$opt_schemaorg] = self::postchecked(self::$opt_schemaorg) ? 1 : 0;
1398
  $new_options[self::$opt_defaultdims] = self::postchecked(self::$opt_defaultdims) ? 1 : 0;
1399
+ $new_options[self::$opt_defaultvol] = self::postchecked(self::$opt_defaultvol) ? 1 : 0;
1400
 
1401
  $_defaultwidth = '';
1402
  try
1420
  }
1421
  $new_options[self::$opt_defaultheight] = $_defaultheight;
1422
 
1423
+ $_vol = '';
1424
+ try
1425
+ {
1426
+ $_vol = is_numeric(trim($_POST[self::$opt_vol])) ? intval(trim($_POST[self::$opt_vol])) : $_vol;
1427
+ }
1428
+ catch (Exception $ex)
1429
+ {
1430
+
1431
+ }
1432
+ $new_options[self::$opt_vol] = $_vol;
1433
 
1434
  $all = $new_options + $all;
1435
 
1475
  #nonprosupport {border-radius: 15px; padding: 5px 10px 10px 10px; border: 3px solid #ff6655;}
1476
  .pronon {font-weight: bold; color: #f85d00;}
1477
  ul.reglist li {margin: 0px 0px 0px 30px; list-style: disc outside none;}
1478
+ .procol {width: 475px; float: left;}
1479
  .smallnote {font-style: italic; font-size: 10px;}
1480
  .italic {font-style: italic;}
1481
  .ytindent h3 {font-size: 15px; line-height: 22px; margin: 5px 0px 10px 0px;}
1487
  .cuz {background-image: linear-gradient(to bottom,#4983FF,#0C5597) !important; color: #ffffff;}
1488
  .brightpro {background-image: linear-gradient(to bottom,#ff5500,#cc2200) !important; color: #ffffff;}
1489
  #boxdefaultdims {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_defaultdims] ? '' : 'display: none;' ?>}
 
 
 
1490
  .textinput {border-width: 2px !important;}
1491
  h3.sect {border-radius: 10px; background-color: #D9E9F7; padding: 5px 5px 5px 10px; position: relative; font-weight: bold;}
1492
  h3.sect a {text-decoration: none; color: #E20000;}
1503
  b, strong {font-weight: bold;}
1504
  input.checkbox[disabled] {border: 1px dotted #444444;}
1505
  .pad10 {padding: 10px;}
1506
+
1507
+ #boxdefaultvol {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_defaultvol] ? '' : 'display: none;' ?>}
1508
+ .vol-output {display: none; width: 30px; color: #008800;}
1509
+ .vol-range {background-color: #dddddd; border-radius: 3px; cursor: pointer;}
1510
+ input#vol {vertical-align: middle;}
1511
+ .vol-seeslider {display: none;}
1512
  </style>
1513
 
1514
  <div class="ytindent">
1683
  This will go back and also secure your past embeds as they are loaded on their pages. Most web browsers will warn users when they access web pages via HTTPS that contain embedded content loaded via HTTP. If your main site is currently accessed via HTTPS, using HTTPS URLs for your YouTube embeds will prevent your users from running into that warning. If you're not currently supporting HTTPS/SSL, <a href="http://embedplus.com/convert-old-youtube-embeds-to-https-ssl.aspx" target="_blank">here's some motivation from Google &raquo;</a>
1684
  </label>
1685
  </p>
1686
+ <p>
1687
+ <input name="<?php echo self::$opt_defaultvol; ?>" id="<?php echo self::$opt_defaultvol; ?>" <?php checked($all[self::$opt_defaultvol], 1); ?> type="checkbox" class="checkbox">
1688
+ <span id="boxdefaultvol">
1689
+ Volume: <span class="vol-output"></span> <input min="0" max="100" step="1" type="text" name="<?php echo self::$opt_vol; ?>" id="<?php echo self::$opt_vol; ?>" value="<?php echo trim($all[self::$opt_vol]); ?>" >
1690
+ </span>
1691
+ <label for="<?php echo self::$opt_defaultvol; ?>">
1692
+ <b class="chktitle">Volume Initialization: <sup class="orange">NEW</sup></b>
1693
+ Set an initial volume level for all of your embedded videos. Check this and you'll see a <span class="vol-seeslider">slider</span> <span class="vol-seetextbox">textbox</span> for setting the start volume to a value between 0 (mute) and 100 (max) percent. Leaving it unchecked means you want the visitor's default behavior. Read more about why you might want to <a href="<?php echo self::$epbase ?>/mute-volume-youtube-wordpress.aspx" target="_blank">initialize YouTube embed volume here &raquo;</a>
1694
+ </label>
1695
+ </p>
1696
 
1697
 
1698
  <p class="smallnote orange">Below are PRO features for enhanced SEO and performance (works for even past embed links):</p>
1721
  <b>(PRO)</b> <b class="chktitle">Facebook Open Graph Markup:</b> <span class="pronon">(NEW: PRO Users)</span> Update YouTube embeds on your pages with Open Graph markup to enhance Facebook sharing and discovery of the pages. Your shared pages, for example, will also display embedded video thumbnails on Facebook Timelines.
1722
  </label>
1723
  </p>
 
 
 
 
 
 
 
1724
 
1725
  <?php
1726
  }
1841
  Check if your embeds have restrictions that can block mobile viewing <sup class="orange bold">NEW</sup>
1842
  </li>
1843
 
 
1844
  </ul>
1845
  </div>
1846
+ <div class="procol" style="max-width: 465px;">
1847
  <ul class="gopro">
1848
  <li>
1849
  <img src="<?php echo plugins_url('images/prioritysupport.png', __FILE__) ?>">
1863
  Instant YouTube embed diagnostic reports
1864
  </li>
1865
  <li>
1866
+ <img src="<?php echo plugins_url('images/iconvolume.png', __FILE__) ?>">
1867
+ Fine-Grained Volume Initialization – Make individual video volume settings in the wizard <sup class="orange bold">NEW</sup>
1868
+ </li>
1869
 
1870
  <li>
1871
  <img src="<?php echo plugins_url('images/infinity.png', __FILE__) ?>">
1872
  Unlimited PRO upgrades and downloads
1873
  </li>
1874
+ <!-- <li>
1875
+ <img src="<?php echo plugins_url('images/questionsale.png', __FILE__) ?>">
1876
+ What else? You tell us!
1877
+ </li> -->
1878
  </ul>
1879
  </div>
1880
  <div style="clear: both;"></div>
1975
  }
1976
  }
1977
 
1978
+ if (jQuery("#<?php echo self::$opt_defaultvol; ?>").is(":checked"))
1979
+ {
1980
+ if (!(jQuery.isNumeric(jQuery.trim(jQuery("#<?php echo self::$opt_vol; ?>").val()))))
1981
+ {
1982
+ alertmessage += "Please enter a number between 0 and 100 for the default volume, or uncheck the option.";
1983
+ jQuery("#boxdefaultvol input").css("background-color", "#ffcccc").css("border", "2px solid #000000");
1984
+ valid = false;
1985
+ }
1986
+ }
1987
 
1988
  if (!valid)
1989
  {
2009
 
2010
  });
2011
 
2012
+
2013
+
2014
+
2015
+ jQuery('#<?php echo self::$opt_defaultvol; ?>').change(function()
2016
+ {
2017
+ if (jQuery(this).is(":checked"))
2018
+ {
2019
+ jQuery("#boxdefaultvol").show(500);
2020
+ }
2021
+ else
2022
+ {
2023
+ jQuery("#boxdefaultvol").hide(500);
2024
+ }
2025
+
2026
+ });
2027
+
2028
+ var rangedetect = document.createElement("input");
2029
+ rangedetect.setAttribute("type", "range");
2030
+ var canrange = rangedetect.type !== "text";
2031
+ //canrange = false;
2032
+ if (canrange)
2033
+ {
2034
+ $("input#vol").prop("type", "range").addClass("vol-range").on("input change", function() {
2035
+ $('.vol-output').text($(this).val() > 0 ? $(this).val() + '%' : 'Mute');
2036
+ });
2037
+ $('.vol-output').css("display", "inline-block").text($("input#vol").val() > 0 ? $("input#vol").val() + '%' : 'Mute');
2038
+ $('.vol-seeslider').show();
2039
+ $('.vol-seetextbox').hide();
2040
+ }
2041
+ else
2042
+ {
2043
+ $("input#vol").width(40);
2044
+ }
2045
 
2046
  jQuery("#showcase-validate").click(function() {
2047
  window.open("<?php echo self::$epbase . "/showcase-validate.aspx?prokey=" . self::$alloptions[self::$opt_pro] ?>" + "&domain=" + mydomain);
2063
  tempscript.src = "//www.embedplus.com/dashboard/wordpress-pro-validatejp.aspx?simple=1&prokey=" + prokeyval + "&domain=" + mydomain;
2064
  var n = document.getElementsByTagName("head")[0].appendChild(tempscript);
2065
  setTimeout(function() {
2066
+ n.parentNode.removeChild(n);
2067
  }, 500);
2068
  return false;
2069
  });
2233
  add_action('wp_print_scripts', 'youtubeprefs_output_scriptvars');
2234
 
2235
  if (
2236
+ //(!(isset(YouTubePrefs::$alloptions[YouTubePrefs::$opt_pro]) && strlen(trim(YouTubePrefs::$alloptions[YouTubePrefs::$opt_pro])) > 0)) && // display only if not pro ooopointer
2237
  (get_bloginfo('version') >= '3.3') && YouTubePrefs::custom_admin_pointers_check()
2238
  )
2239
  {