Version Description
Download this release
Release Info
Developer | embedplus |
Plugin | YouTube |
Version | 11.8.2 |
Comparing to | |
See all releases |
Code changes from version 11.8.1 to 11.8.2
- readme.txt +5 -1
- scripts/ytprefs.js +1 -0
- scripts/ytprefs.min.js +1 -1
- youtube.php +26 -19
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: YouTube Embed
|
|
4 |
Tags: youtube gallery, video gallery, youtube channel, youtube live, live stream
|
5 |
Requires at least: 3.6.1
|
6 |
Tested up to: 4.8
|
7 |
-
Stable tag: 11.8.
|
8 |
License: GPLv3 or later
|
9 |
|
10 |
YouTube Embed WordPress Plugin. Embed a responsive video, YouTube channel gallery, playlist gallery, or YouTube.com live stream
|
@@ -145,6 +145,10 @@ You can also start and end each individual video at particular times. Like the a
|
|
145 |
|
146 |
== Changelog ==
|
147 |
|
|
|
|
|
|
|
|
|
148 |
= WordPress YouTube Embed 11.8.1 =
|
149 |
* Fix playlist gallery issue
|
150 |
|
4 |
Tags: youtube gallery, video gallery, youtube channel, youtube live, live stream
|
5 |
Requires at least: 3.6.1
|
6 |
Tested up to: 4.8
|
7 |
+
Stable tag: 11.8.2
|
8 |
License: GPLv3 or later
|
9 |
|
10 |
YouTube Embed WordPress Plugin. Embed a responsive video, YouTube channel gallery, playlist gallery, or YouTube.com live stream
|
145 |
|
146 |
== Changelog ==
|
147 |
|
148 |
+
= WordPress YouTube Embed 11.8.2 =
|
149 |
+
* Fix auto-next gallery issue
|
150 |
+
* Make settings form more secure
|
151 |
+
|
152 |
= WordPress YouTube Embed 11.8.1 =
|
153 |
* Fix playlist gallery issue
|
154 |
|
scripts/ytprefs.js
CHANGED
@@ -222,6 +222,7 @@
|
|
222 |
scrollTop: $iframe.offset().top - parseInt(_EPYT_.gallery_scrolloffset)
|
223 |
}, 500, function () {
|
224 |
$iframe.attr('src', vidSrc);
|
|
|
225 |
window._EPADashboard_.setupevents($iframe.attr('id'));
|
226 |
});
|
227 |
|
222 |
scrollTop: $iframe.offset().top - parseInt(_EPYT_.gallery_scrolloffset)
|
223 |
}, 500, function () {
|
224 |
$iframe.attr('src', vidSrc);
|
225 |
+
$iframe.get(0).epytsetupdone = false;
|
226 |
window._EPADashboard_.setupevents($iframe.attr('id'));
|
227 |
});
|
228 |
|
scripts/ytprefs.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
|
2 |
-
(function(a,b){a._EPYT_=a._EPYT_||{ajaxurl:"/wp-admin/admin-ajax.php",security:"",gallery_scrolloffset:100,eppathtoscripts:"/wp-content/plugins/youtube-embed-plus/scripts/",epresponsiveselector:["iframe.__youtube_prefs_widget__"],epdovol:true,evselector:'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]',stopMobileBuffer:true,ajax_compat:false,usingdefault:true};if(a.location.toString().indexOf("https://")===0){a._EPYT_.ajaxurl=a._EPYT_.ajaxurl.replace("http://","https://")}a._EPYT_.pageLoaded=false;b(a).on("load._EPYT_",function(){a._EPYT_.pageLoaded=true});if(!document.querySelectorAll){document.querySelectorAll=function(e){var g=document,f=g.documentElement.firstChild,d=g.createElement("STYLE");f.appendChild(d);g.__qsaels=[];d.styleSheet.cssText=e+"{x:expression(document.__qsaels.push(this))}";a.scrollBy(0,0);return g.__qsaels}}if(typeof a._EPADashboard_==="undefined"){a._EPADashboard_={initStarted:false,checkCount:0,onPlayerReady:function(g){try{if(typeof _EPYT_.epdovol!=="undefined"&&_EPYT_.epdovol){var e=parseInt(g.target.getIframe().getAttribute("data-vol"));if(!isNaN(e)){if(e===0){g.target.mute()}else{if(g.target.isMuted()){g.target.unMute()}g.target.setVolume(e)}}}var d=parseInt(g.target.getIframe().getAttribute("data-epautoplay"));if(!isNaN(d)&&d===1){g.target.playVideo()}}catch(f){}},onPlayerStateChange:function(g){var f=g.target.getIframe();if(g.data===a.YT.PlayerState.PLAYING&&g.target.ponce!==true&&f.src.indexOf("autoplay=1")===-1){g.target.ponce=true}var d=b(f).closest(".epyt-gallery");if(!d.length){d=b("#"+b(f).data("epytgalleryid"))}if(d.length){var e=d.find(".epyt-pagebutton").first().data("autonext")=="1";if(e&&g.data===a.YT.PlayerState.ENDED){var h=d.find(".epyt-current-video");if(!h.length){h=d.find(".epyt-gallery-thumb").first()}var i=h.find(" ~ .epyt-gallery-thumb").first();if(i.length){i.click()}else{d.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click()}}}},justid:function(d){return new RegExp("[\\?&]v=([^&#]*)").exec(d)[1]},setupevents:function(e){a._EPADashboard_.log("Setting up YT API events: "+e);if(typeof(a.YT)!=="undefined"&&a.YT!==null&&a.YT.loaded){var d=document.getElementById(e);if(!d.epytsetupdone){d.epytsetupdone=true;return new a.YT.Player(e,{events:{onReady:a._EPADashboard_.onPlayerReady,onStateChange:a._EPADashboard_.onPlayerStateChange}})}}},apiInit:function(){if(typeof(a.YT)!=="undefined"){a._EPADashboard_.initStarted=true;var d=document.querySelectorAll(_EPYT_.evselector);for(var e=0;e<d.length;e++){if(!d[e].hasAttribute("id")){d[e].id="_dytid_"+Math.round(Math.random()*8999+1000)}a._EPADashboard_.setupevents(d[e].id)}}},log:function(e){try{console.log(e)}catch(d){}},doubleCheck:function(){a._EPADashboard_.checkInterval=setInterval(function(){a._EPADashboard_.checkCount++;if(a._EPADashboard_.checkCount>=5||a._EPADashboard_.initStarted){clearInterval(a._EPADashboard_.checkInterval)}else{a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API init check")}},1000)},selectText:function(e){if(document.selection){var d=document.body.createTextRange();d.moveToElementText(e);d.select()}else{if(a.getSelection){var d=document.createRange();d.selectNode(e);a.getSelection().addRange(d)}}},pageReady:function(){b(".epyt-gallery").each(function(){var h=b(this);var g=b(this).find("iframe").first();var e=g.attr("src");if(!e){e=g.data("ep-src")}var f=b(this).find(".epyt-gallery-list .epyt-gallery-thumb").first().data("videoid");e=e.replace(f,"GALLERYVIDEOID");g.data("ep-gallerysrc",e);var d=h.find(".epyt-gallery-list");h.on("click",".epyt-gallery-list .epyt-gallery-thumb",function(){h.find(".epyt-gallery-list .epyt-gallery-thumb").removeClass("epyt-current-video");b(this).addClass("epyt-current-video");var i=b(this).data("videoid");h.data("currvid",i);var k=g.data("ep-gallerysrc").replace("GALLERYVIDEOID",i);var j=h.find(".epyt-pagebutton").first().data("thumbplay");if(j!=="0"&&j!==0){if(k.indexOf("autoplay")>0){k=k.replace("autoplay=0","autoplay=1")}else{k+="&autoplay=1"}g.addClass("epyt-thumbplay")}b("html, body").animate({scrollTop:g.offset().top-parseInt(_EPYT_.gallery_scrolloffset)},500,function(){g.attr("src",k);a._EPADashboard_.setupevents(g.attr("id"))})}).on("keydown",".epyt-gallery-list .epyt-gallery-thumb, .epyt-pagebutton",function(j){var i=j.which;if((i===13)||(i===32)){j.preventDefault();b(this).click()}});h.on("mouseenter",".epyt-gallery-list .epyt-gallery-thumb",function(){b(this).addClass("hover")});h.on("mouseleave",".epyt-gallery-list .epyt-gallery-thumb",function(){b(this).removeClass("hover")});h.on("click",".epyt-pagebutton",function(){var k={action:"my_embedplus_gallery_page",security:_EPYT_.security,options:{playlistId:b(this).data("playlistid"),pageToken:b(this).data("pagetoken"),pageSize:b(this).data("pagesize"),columns:b(this).data("columns"),showTitle:b(this).data("showtitle"),showPaging:b(this).data("showpaging"),autonext:b(this).data("autonext"),thumbplay:b(this).data("thumbplay")}};var i=b(this).hasClass("epyt-next");var j=parseInt(h.data("currpage")+"");j+=i?1:-1;h.data("currpage",j);h.find(".epyt-gallery-list").addClass("epyt-loading");b.post(_EPYT_.ajaxurl,k,function(l){h.find(".epyt-gallery-list").html(l);h.find(".epyt-current").each(function(){b(this).text(h.data("currpage"))});h.find('.epyt-gallery-thumb[data-videoid="'+h.data("currvid")+'"]').addClass("epyt-current-video");if(h.find(".epyt-pagebutton").first().data("autonext")=="1"){h.find(".epyt-gallery-thumb").first().click()}}).fail(function(){alert("Sorry, there was an error loading the next page.")}).always(function(){h.find(".epyt-gallery-list").removeClass("epyt-loading");b("html, body").animate({scrollTop:h.find(".epyt-gallery-list").offset().top-parseInt(_EPYT_.gallery_scrolloffset)},500)})})})}}}a.onYouTubeIframeAPIReady=typeof a.onYouTubeIframeAPIReady!=="undefined"?a.onYouTubeIframeAPIReady:function(){if(a._EPYT_.pageLoaded){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API ready")}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API ready 2")})}};if(typeof a.YT==="undefined"){var c=document.createElement("script");c.src="//www.youtube.com/iframe_api";c.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(c)}else{if(a.YT.loaded){if(a._EPYT_.pageLoaded){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API available")}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API available 2")})}}}if(a._EPYT_.pageLoaded){a._EPADashboard_.doubleCheck()}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.doubleCheck()})}b(document).ready(function(){a._EPADashboard_.pageReady();if(a._EPYT_.ajax_compat){b(a).on("load._EPYT_",function(){b(document).ajaxSuccess(function(f,g,d){if(g&&g.responseText&&g.responseText.indexOf("<iframe ")!==-1){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API AJAX");a._EPADashboard_.pageReady()}})})}})})(window,jQuery);
|
1 |
|
2 |
+
(function(a,b){a._EPYT_=a._EPYT_||{ajaxurl:"/wp-admin/admin-ajax.php",security:"",gallery_scrolloffset:100,eppathtoscripts:"/wp-content/plugins/youtube-embed-plus/scripts/",epresponsiveselector:["iframe.__youtube_prefs_widget__"],epdovol:true,evselector:'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]',stopMobileBuffer:true,ajax_compat:false,usingdefault:true};if(a.location.toString().indexOf("https://")===0){a._EPYT_.ajaxurl=a._EPYT_.ajaxurl.replace("http://","https://")}a._EPYT_.pageLoaded=false;b(a).on("load._EPYT_",function(){a._EPYT_.pageLoaded=true});if(!document.querySelectorAll){document.querySelectorAll=function(e){var g=document,f=g.documentElement.firstChild,d=g.createElement("STYLE");f.appendChild(d);g.__qsaels=[];d.styleSheet.cssText=e+"{x:expression(document.__qsaels.push(this))}";a.scrollBy(0,0);return g.__qsaels}}if(typeof a._EPADashboard_==="undefined"){a._EPADashboard_={initStarted:false,checkCount:0,onPlayerReady:function(g){try{if(typeof _EPYT_.epdovol!=="undefined"&&_EPYT_.epdovol){var e=parseInt(g.target.getIframe().getAttribute("data-vol"));if(!isNaN(e)){if(e===0){g.target.mute()}else{if(g.target.isMuted()){g.target.unMute()}g.target.setVolume(e)}}}var d=parseInt(g.target.getIframe().getAttribute("data-epautoplay"));if(!isNaN(d)&&d===1){g.target.playVideo()}}catch(f){}},onPlayerStateChange:function(g){var f=g.target.getIframe();if(g.data===a.YT.PlayerState.PLAYING&&g.target.ponce!==true&&f.src.indexOf("autoplay=1")===-1){g.target.ponce=true}var d=b(f).closest(".epyt-gallery");if(!d.length){d=b("#"+b(f).data("epytgalleryid"))}if(d.length){var e=d.find(".epyt-pagebutton").first().data("autonext")=="1";if(e&&g.data===a.YT.PlayerState.ENDED){var h=d.find(".epyt-current-video");if(!h.length){h=d.find(".epyt-gallery-thumb").first()}var i=h.find(" ~ .epyt-gallery-thumb").first();if(i.length){i.click()}else{d.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click()}}}},justid:function(d){return new RegExp("[\\?&]v=([^&#]*)").exec(d)[1]},setupevents:function(e){a._EPADashboard_.log("Setting up YT API events: "+e);if(typeof(a.YT)!=="undefined"&&a.YT!==null&&a.YT.loaded){var d=document.getElementById(e);if(!d.epytsetupdone){d.epytsetupdone=true;return new a.YT.Player(e,{events:{onReady:a._EPADashboard_.onPlayerReady,onStateChange:a._EPADashboard_.onPlayerStateChange}})}}},apiInit:function(){if(typeof(a.YT)!=="undefined"){a._EPADashboard_.initStarted=true;var d=document.querySelectorAll(_EPYT_.evselector);for(var e=0;e<d.length;e++){if(!d[e].hasAttribute("id")){d[e].id="_dytid_"+Math.round(Math.random()*8999+1000)}a._EPADashboard_.setupevents(d[e].id)}}},log:function(e){try{console.log(e)}catch(d){}},doubleCheck:function(){a._EPADashboard_.checkInterval=setInterval(function(){a._EPADashboard_.checkCount++;if(a._EPADashboard_.checkCount>=5||a._EPADashboard_.initStarted){clearInterval(a._EPADashboard_.checkInterval)}else{a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API init check")}},1000)},selectText:function(e){if(document.selection){var d=document.body.createTextRange();d.moveToElementText(e);d.select()}else{if(a.getSelection){var d=document.createRange();d.selectNode(e);a.getSelection().addRange(d)}}},pageReady:function(){b(".epyt-gallery").each(function(){var h=b(this);var g=b(this).find("iframe").first();var e=g.attr("src");if(!e){e=g.data("ep-src")}var f=b(this).find(".epyt-gallery-list .epyt-gallery-thumb").first().data("videoid");e=e.replace(f,"GALLERYVIDEOID");g.data("ep-gallerysrc",e);var d=h.find(".epyt-gallery-list");h.on("click",".epyt-gallery-list .epyt-gallery-thumb",function(){h.find(".epyt-gallery-list .epyt-gallery-thumb").removeClass("epyt-current-video");b(this).addClass("epyt-current-video");var i=b(this).data("videoid");h.data("currvid",i);var k=g.data("ep-gallerysrc").replace("GALLERYVIDEOID",i);var j=h.find(".epyt-pagebutton").first().data("thumbplay");if(j!=="0"&&j!==0){if(k.indexOf("autoplay")>0){k=k.replace("autoplay=0","autoplay=1")}else{k+="&autoplay=1"}g.addClass("epyt-thumbplay")}b("html, body").animate({scrollTop:g.offset().top-parseInt(_EPYT_.gallery_scrolloffset)},500,function(){g.attr("src",k);g.get(0).epytsetupdone=false;a._EPADashboard_.setupevents(g.attr("id"))})}).on("keydown",".epyt-gallery-list .epyt-gallery-thumb, .epyt-pagebutton",function(j){var i=j.which;if((i===13)||(i===32)){j.preventDefault();b(this).click()}});h.on("mouseenter",".epyt-gallery-list .epyt-gallery-thumb",function(){b(this).addClass("hover")});h.on("mouseleave",".epyt-gallery-list .epyt-gallery-thumb",function(){b(this).removeClass("hover")});h.on("click",".epyt-pagebutton",function(){var k={action:"my_embedplus_gallery_page",security:_EPYT_.security,options:{playlistId:b(this).data("playlistid"),pageToken:b(this).data("pagetoken"),pageSize:b(this).data("pagesize"),columns:b(this).data("columns"),showTitle:b(this).data("showtitle"),showPaging:b(this).data("showpaging"),autonext:b(this).data("autonext"),thumbplay:b(this).data("thumbplay")}};var i=b(this).hasClass("epyt-next");var j=parseInt(h.data("currpage")+"");j+=i?1:-1;h.data("currpage",j);h.find(".epyt-gallery-list").addClass("epyt-loading");b.post(_EPYT_.ajaxurl,k,function(l){h.find(".epyt-gallery-list").html(l);h.find(".epyt-current").each(function(){b(this).text(h.data("currpage"))});h.find('.epyt-gallery-thumb[data-videoid="'+h.data("currvid")+'"]').addClass("epyt-current-video");if(h.find(".epyt-pagebutton").first().data("autonext")=="1"){h.find(".epyt-gallery-thumb").first().click()}}).fail(function(){alert("Sorry, there was an error loading the next page.")}).always(function(){h.find(".epyt-gallery-list").removeClass("epyt-loading");b("html, body").animate({scrollTop:h.find(".epyt-gallery-list").offset().top-parseInt(_EPYT_.gallery_scrolloffset)},500)})})})}}}a.onYouTubeIframeAPIReady=typeof a.onYouTubeIframeAPIReady!=="undefined"?a.onYouTubeIframeAPIReady:function(){if(a._EPYT_.pageLoaded){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API ready")}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API ready 2")})}};if(typeof a.YT==="undefined"){var c=document.createElement("script");c.src="//www.youtube.com/iframe_api";c.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(c)}else{if(a.YT.loaded){if(a._EPYT_.pageLoaded){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API available")}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API available 2")})}}}if(a._EPYT_.pageLoaded){a._EPADashboard_.doubleCheck()}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.doubleCheck()})}b(document).ready(function(){a._EPADashboard_.pageReady();if(a._EPYT_.ajax_compat){b(a).on("load._EPYT_",function(){b(document).ajaxSuccess(function(f,g,d){if(g&&g.responseText&&g.responseText.indexOf("<iframe ")!==-1){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API AJAX");a._EPADashboard_.pageReady()}})})}})})(window,jQuery);
|
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 and YouTube Gallery WordPress Plugin. Embed a responsive video, YouTube channel, playlist gallery, or live stream
|
6 |
-
Version: 11.8.
|
7 |
Author: EmbedPlus Team
|
8 |
Author URI: http://www.embedplus.com
|
9 |
*/
|
@@ -33,7 +33,7 @@ class YouTubePrefs
|
|
33 |
{
|
34 |
|
35 |
public static $curltimeout = 20;
|
36 |
-
public static $version = '11.8.
|
37 |
public static $opt_version = 'version';
|
38 |
public static $optembedwidth = null;
|
39 |
public static $optembedheight = null;
|
@@ -304,6 +304,8 @@ class YouTubePrefs
|
|
304 |
$if_live_preview = false;
|
305 |
if (isset($_POST['wizform_submit']))
|
306 |
{
|
|
|
|
|
307 |
$submit_type = $_POST['wizform_submit'];
|
308 |
if ($submit_type === 'step1_video')
|
309 |
{
|
@@ -719,6 +721,7 @@ class YouTubePrefs
|
|
719 |
Search YouTube videos by title below (example: <em>TED talks</em>). Or, if you already have the URL for the video, you can paste it below (example: <em>https://www.youtube.com/watch?v=YVvn8dpSAt0</em> )
|
720 |
</p>
|
721 |
<form name="wizform_video" method="post" action="" class="wizform" id="wizform_video">
|
|
|
722 |
<div class="center txt-button-align">
|
723 |
<input name="txtUrl" maxlength="200" id="txtUrl" class="txturlpastecustom ui-widget ui-widget-content ui-corner-all" placeholder="Search by title or paste URL here" type="text"> <button name="wizform_submit" class="ui-button ui-widget ui-corner-all" type="submit" value="step1_video">Submit</button>
|
724 |
</div>
|
@@ -762,6 +765,7 @@ class YouTubePrefs
|
|
762 |
</div>
|
763 |
|
764 |
<form name="wizform_playlist" method="post" action="" class="wizform" id="wizform_playlist">
|
|
|
765 |
<div class="center txt-button-align">
|
766 |
<input name="txtUrlPlaylist" maxlength="200" id="txtUrlPlaylist" class="txturlpastecustom ui-widget ui-widget-content ui-corner-all" placeholder="Paste the playlist link here" type="text">
|
767 |
<button name="wizform_submit" class="ui-button ui-widget ui-corner-all" type="submit" value="step1_playlist">Get Playlist</button>
|
@@ -784,6 +788,7 @@ class YouTubePrefs
|
|
784 |
Enter a link to any video that belongs to the user's channel. Example: https://www.youtube.com/watch?v=YVvn8dpSAt0
|
785 |
</p>
|
786 |
<form name="wizform_channel" method="post" action="" class="wizform" id="wizform_channel">
|
|
|
787 |
<div class="center txt-button-align">
|
788 |
<input name="txtUrlChannel" maxlength="200" id="txtUrlChannel" class="txturlpastecustom ui-widget ui-widget-content ui-corner-all" placeholder="Paste YouTube link here" type="text"> <button name="wizform_submit" class="ui-button ui-widget ui-corner-all" type="submit" value="step1_channel">Get Channel</button>
|
789 |
</div>
|
@@ -798,7 +803,7 @@ class YouTubePrefs
|
|
798 |
}
|
799 |
?>
|
800 |
</div>
|
801 |
-
<h3 id="h3_live"><a href="#">Embed a live stream.
|
802 |
<div>
|
803 |
<h4 class="center">Live stream directions (<a href="https://www.youtube.com/watch?v=dEQMTUke48E" target="_blank">Video tutorial here »</a>)</h4>
|
804 |
<?php
|
@@ -820,6 +825,7 @@ class YouTubePrefs
|
|
820 |
</li>
|
821 |
</ol>
|
822 |
<form name="wizform_live" method="post" action="" class="wizform" id="wizform_live">
|
|
|
823 |
<div class="center txt-button-align">
|
824 |
<input name="txtUrlLive" maxlength="200" id="txtUrlLive" class="ui-widget ui-widget-content ui-corner-all" placeholder="Paste YouTube link here" type="text"> <button name="wizform_submit" class="ui-button ui-widget ui-corner-all" type="submit" value="step1_live">Submit</button>
|
825 |
</div>
|
@@ -1145,7 +1151,7 @@ class YouTubePrefs
|
|
1145 |
type: "post",
|
1146 |
dataType: "json",
|
1147 |
timeout: 30000,
|
1148 |
-
url: window._EPYTA_.wpajaxurl,
|
1149 |
data: {action: 'my_embedplus_glance_vids', postid: pid},
|
1150 |
success: function (response) {
|
1151 |
if (response.type === "success") {
|
@@ -1456,7 +1462,7 @@ class YouTubePrefs
|
|
1456 |
type: "post",
|
1457 |
dataType: "json",
|
1458 |
timeout: 30000,
|
1459 |
-
url: window._EPYTA_.wpajaxurl,
|
1460 |
data: {action: 'my_embedplus_dismiss_double_plugin_warning'},
|
1461 |
success: function (response) {
|
1462 |
if (response.type === "success") {
|
@@ -2152,7 +2158,7 @@ class YouTubePrefs
|
|
2152 |
|
2153 |
if (!isset($linkparams['v']))
|
2154 |
{
|
2155 |
-
return apply_filters('the_content',
|
2156 |
}
|
2157 |
}
|
2158 |
|
@@ -2532,7 +2538,7 @@ class YouTubePrefs
|
|
2532 |
type: "post",
|
2533 |
dataType: "json",
|
2534 |
timeout: 30000,
|
2535 |
-
url: window._EPYTA_.wpajaxurl,
|
2536 |
data: {action: 'my_embedplus_glance_count'},
|
2537 |
success: function (response) {
|
2538 |
if (response.type === "success") {
|
@@ -2578,7 +2584,7 @@ class YouTubePrefs
|
|
2578 |
align: '<?php echo $array['align']; ?>'
|
2579 |
},
|
2580 |
close: function () {
|
2581 |
-
$.post(window._EPYTA_.wpajaxurl, {
|
2582 |
pointer: '<?php echo $pointer; ?>',
|
2583 |
action: 'dismiss-wp-pointer'
|
2584 |
});
|
@@ -2607,11 +2613,11 @@ class YouTubePrefs
|
|
2607 |
$new_pointer_content .= '<p>'; // ooopointer
|
2608 |
if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
|
2609 |
{
|
2610 |
-
$new_pointer_content .= __("This update
|
2611 |
}
|
2612 |
else
|
2613 |
{
|
2614 |
-
$new_pointer_content .= __("This update
|
2615 |
}
|
2616 |
$new_pointer_content .= '</p>';
|
2617 |
|
@@ -2653,6 +2659,7 @@ class YouTubePrefs
|
|
2653 |
// If they did, this hidden field will be set to 'Y'
|
2654 |
if (isset($_POST[$ytprefs_submitted]) && $_POST[$ytprefs_submitted] == 'Y')
|
2655 |
{
|
|
|
2656 |
// Read their posted values
|
2657 |
|
2658 |
$new_options = array();
|
@@ -3013,7 +3020,7 @@ class YouTubePrefs
|
|
3013 |
|
3014 |
<form name="form1" method="post" action="" id="ytform">
|
3015 |
<input type="hidden" name="<?php echo $ytprefs_submitted; ?>" value="Y">
|
3016 |
-
|
3017 |
<div class="jumper" id="jumpapikey"></div>
|
3018 |
<h3 class="sect">
|
3019 |
YouTube API Key
|
@@ -3023,7 +3030,7 @@ class YouTubePrefs
|
|
3023 |
</p>
|
3024 |
<p>
|
3025 |
<b class="chktitle">YouTube API Key:</b>
|
3026 |
-
<input type="text" name="<?php echo self::$opt_apikey; ?>" id="<?php echo self::$opt_apikey; ?>" value="<?php echo trim($all[self::$opt_apikey]); ?>" class="textinput" style="width: 250px;">
|
3027 |
<a href="https://www.youtube.com/watch?v=LpKDFT40V0U" target="_blank">Click this link »</a> and follow the video to get your API key. Don't worry, it's an easy process.
|
3028 |
</p>
|
3029 |
|
@@ -3040,7 +3047,7 @@ class YouTubePrefs
|
|
3040 |
<p>
|
3041 |
<input name="<?php echo self::$opt_restrict_wizard; ?>" id="<?php echo self::$opt_restrict_wizard; ?>" <?php checked($all[self::$opt_restrict_wizard], 1); ?> type="checkbox" class="checkbox">
|
3042 |
<label for="<?php echo self::$opt_restrict_wizard; ?>">
|
3043 |
-
<b class="chktitle">Restrict Wizard Button:</b>
|
3044 |
</label>
|
3045 |
<br>
|
3046 |
<span id="box_restrict_wizard" class="chx">
|
@@ -3104,8 +3111,8 @@ class YouTubePrefs
|
|
3104 |
<p>
|
3105 |
<input name="<?php echo self::$opt_defaultdims; ?>" id="<?php echo self::$opt_defaultdims; ?>" <?php checked($all[self::$opt_defaultdims], 1); ?> type="checkbox" class="checkbox">
|
3106 |
<span id="boxdefaultdims">
|
3107 |
-
Width: <input type="text" name="<?php echo self::$opt_defaultwidth; ?>" id="<?php echo self::$opt_defaultwidth; ?>" value="<?php echo trim($all[self::$opt_defaultwidth]); ?>" class="textinput" style="width: 50px;">
|
3108 |
-
Height: <input type="text" name="<?php echo self::$opt_defaultheight; ?>" id="<?php echo self::$opt_defaultheight; ?>" value="<?php echo trim($all[self::$opt_defaultheight]); ?>" class="textinput" style="width: 50px;">
|
3109 |
</span>
|
3110 |
|
3111 |
<label for="<?php echo self::$opt_defaultdims; ?>"><?php _e('<b class="chktitle">Default Dimensions:</b> Make your videos have a default size. (NOTE: Checking the responsive option will override this size setting) ') ?></label>
|
@@ -3163,7 +3170,7 @@ class YouTubePrefs
|
|
3163 |
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. This feature is experimental and is less predictable on a page with more than one embed. 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 »</a>
|
3164 |
</label>
|
3165 |
<span id="boxdefaultvol">
|
3166 |
-
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]); ?>" >
|
3167 |
</span>
|
3168 |
</p>
|
3169 |
|
@@ -3186,7 +3193,7 @@ class YouTubePrefs
|
|
3186 |
</p>
|
3187 |
<p>
|
3188 |
<label for="<?php echo self::$opt_not_live_content; ?>">
|
3189 |
-
<b class="chktitle">Default "Not Live" Content:</b>
|
3190 |
Below, enter what you would like to appear while your channel is not currently streaming live.
|
3191 |
</label>
|
3192 |
<?php
|
@@ -3438,7 +3445,7 @@ class YouTubePrefs
|
|
3438 |
</p>
|
3439 |
<p>
|
3440 |
<label for="<?php echo self::$opt_gallery_columns; ?>"><b class="chktitle">Number of Columns:</b></label>
|
3441 |
-
<input name="<?php echo self::$opt_gallery_columns; ?>" id="<?php echo self::$opt_gallery_columns; ?>" type="number" class="textinput" style="width: 60px;" value="<?php echo trim($all[self::$opt_gallery_columns]); ?>">
|
3442 |
Enter how many thumbnails can fit per row.
|
3443 |
</p>
|
3444 |
<p>
|
@@ -3495,7 +3502,7 @@ class YouTubePrefs
|
|
3495 |
|
3496 |
<p>
|
3497 |
<label for="<?php echo self::$opt_gallery_scrolloffset; ?>"><b class="chktitle">Scroll Offset:</b></label>
|
3498 |
-
<input name="<?php echo self::$opt_gallery_scrolloffset; ?>" id="<?php echo self::$opt_gallery_scrolloffset; ?>" type="number" class="textinput" style="width: 60px;" value="<?php echo trim($all[self::$opt_gallery_scrolloffset]); ?>">
|
3499 |
After you click on a thumbnail, the gallery will automatically smooth scroll up to the actual player. If you need it to scroll a few pixels further, increase this number.
|
3500 |
</p>
|
3501 |
<p>
|
3 |
Plugin Name: YouTube
|
4 |
Plugin URI: http://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx
|
5 |
Description: YouTube Embed and YouTube Gallery WordPress Plugin. Embed a responsive video, YouTube channel, playlist gallery, or live stream
|
6 |
+
Version: 11.8.2
|
7 |
Author: EmbedPlus Team
|
8 |
Author URI: http://www.embedplus.com
|
9 |
*/
|
33 |
{
|
34 |
|
35 |
public static $curltimeout = 20;
|
36 |
+
public static $version = '11.8.2';
|
37 |
public static $opt_version = 'version';
|
38 |
public static $optembedwidth = null;
|
39 |
public static $optembedheight = null;
|
304 |
$if_live_preview = false;
|
305 |
if (isset($_POST['wizform_submit']))
|
306 |
{
|
307 |
+
check_admin_referer('_epyt_wiz', '_epyt_nonce');
|
308 |
+
|
309 |
$submit_type = $_POST['wizform_submit'];
|
310 |
if ($submit_type === 'step1_video')
|
311 |
{
|
721 |
Search YouTube videos by title below (example: <em>TED talks</em>). Or, if you already have the URL for the video, you can paste it below (example: <em>https://www.youtube.com/watch?v=YVvn8dpSAt0</em> )
|
722 |
</p>
|
723 |
<form name="wizform_video" method="post" action="" class="wizform" id="wizform_video">
|
724 |
+
<?php wp_nonce_field('_epyt_wiz', '_epyt_nonce', true); ?>
|
725 |
<div class="center txt-button-align">
|
726 |
<input name="txtUrl" maxlength="200" id="txtUrl" class="txturlpastecustom ui-widget ui-widget-content ui-corner-all" placeholder="Search by title or paste URL here" type="text"> <button name="wizform_submit" class="ui-button ui-widget ui-corner-all" type="submit" value="step1_video">Submit</button>
|
727 |
</div>
|
765 |
</div>
|
766 |
|
767 |
<form name="wizform_playlist" method="post" action="" class="wizform" id="wizform_playlist">
|
768 |
+
<?php wp_nonce_field('_epyt_wiz', '_epyt_nonce', true); ?>
|
769 |
<div class="center txt-button-align">
|
770 |
<input name="txtUrlPlaylist" maxlength="200" id="txtUrlPlaylist" class="txturlpastecustom ui-widget ui-widget-content ui-corner-all" placeholder="Paste the playlist link here" type="text">
|
771 |
<button name="wizform_submit" class="ui-button ui-widget ui-corner-all" type="submit" value="step1_playlist">Get Playlist</button>
|
788 |
Enter a link to any video that belongs to the user's channel. Example: https://www.youtube.com/watch?v=YVvn8dpSAt0
|
789 |
</p>
|
790 |
<form name="wizform_channel" method="post" action="" class="wizform" id="wizform_channel">
|
791 |
+
<?php wp_nonce_field('_epyt_wiz', '_epyt_nonce', true); ?>
|
792 |
<div class="center txt-button-align">
|
793 |
<input name="txtUrlChannel" maxlength="200" id="txtUrlChannel" class="txturlpastecustom ui-widget ui-widget-content ui-corner-all" placeholder="Paste YouTube link here" type="text"> <button name="wizform_submit" class="ui-button ui-widget ui-corner-all" type="submit" value="step1_channel">Get Channel</button>
|
794 |
</div>
|
803 |
}
|
804 |
?>
|
805 |
</div>
|
806 |
+
<h3 id="h3_live"><a href="#">Embed a live stream. </a></h3>
|
807 |
<div>
|
808 |
<h4 class="center">Live stream directions (<a href="https://www.youtube.com/watch?v=dEQMTUke48E" target="_blank">Video tutorial here »</a>)</h4>
|
809 |
<?php
|
825 |
</li>
|
826 |
</ol>
|
827 |
<form name="wizform_live" method="post" action="" class="wizform" id="wizform_live">
|
828 |
+
<?php wp_nonce_field('_epyt_wiz', '_epyt_nonce', true); ?>
|
829 |
<div class="center txt-button-align">
|
830 |
<input name="txtUrlLive" maxlength="200" id="txtUrlLive" class="ui-widget ui-widget-content ui-corner-all" placeholder="Paste YouTube link here" type="text"> <button name="wizform_submit" class="ui-button ui-widget ui-corner-all" type="submit" value="step1_live">Submit</button>
|
831 |
</div>
|
1151 |
type: "post",
|
1152 |
dataType: "json",
|
1153 |
timeout: 30000,
|
1154 |
+
url: window._EPYTA_ ? window._EPYTA_.wpajaxurl : ajaxurl,
|
1155 |
data: {action: 'my_embedplus_glance_vids', postid: pid},
|
1156 |
success: function (response) {
|
1157 |
if (response.type === "success") {
|
1462 |
type: "post",
|
1463 |
dataType: "json",
|
1464 |
timeout: 30000,
|
1465 |
+
url: window._EPYTA_ ? window._EPYTA_.wpajaxurl : ajaxurl,
|
1466 |
data: {action: 'my_embedplus_dismiss_double_plugin_warning'},
|
1467 |
success: function (response) {
|
1468 |
if (response.type === "success") {
|
2158 |
|
2159 |
if (!isset($linkparams['v']))
|
2160 |
{
|
2161 |
+
return apply_filters('the_content', wp_kses_post(self::$alloptions[self::$opt_not_live_content]));
|
2162 |
}
|
2163 |
}
|
2164 |
|
2538 |
type: "post",
|
2539 |
dataType: "json",
|
2540 |
timeout: 30000,
|
2541 |
+
url: window._EPYTA_ ? window._EPYTA_.wpajaxurl : ajaxurl,
|
2542 |
data: {action: 'my_embedplus_glance_count'},
|
2543 |
success: function (response) {
|
2544 |
if (response.type === "success") {
|
2584 |
align: '<?php echo $array['align']; ?>'
|
2585 |
},
|
2586 |
close: function () {
|
2587 |
+
$.post(window._EPYTA_ ? window._EPYTA_.wpajaxurl : ajaxurl, {
|
2588 |
pointer: '<?php echo $pointer; ?>',
|
2589 |
action: 'dismiss-wp-pointer'
|
2590 |
});
|
2613 |
$new_pointer_content .= '<p>'; // ooopointer
|
2614 |
if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
|
2615 |
{
|
2616 |
+
$new_pointer_content .= __("This update improves the auto-next gallery feature, and adds more security under-the-hood to the settings form for both the Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions »</a>");
|
2617 |
}
|
2618 |
else
|
2619 |
{
|
2620 |
+
$new_pointer_content .= __("This update improves the auto-next gallery feature, and adds more security under-the-hood to the settings form for both the Free and Pro versions. " . '<strong>Important message to YouTube Pro users</strong>: From version 11.7 onward, you must <a href="https://www.embedplus.com/youtube-pro/download/?prokey=' . esc_attr(self::$alloptions[self::$opt_pro]) . '" target="_blank">download the separate plugin here</a> to regain your Pro features. All your settings will automatically migrate after installing the separate Pro download. Thank you for your support and patience during this transition.');
|
2621 |
}
|
2622 |
$new_pointer_content .= '</p>';
|
2623 |
|
2659 |
// If they did, this hidden field will be set to 'Y'
|
2660 |
if (isset($_POST[$ytprefs_submitted]) && $_POST[$ytprefs_submitted] == 'Y')
|
2661 |
{
|
2662 |
+
check_admin_referer('_epyt_save', '_epyt_nonce');
|
2663 |
// Read their posted values
|
2664 |
|
2665 |
$new_options = array();
|
3020 |
|
3021 |
<form name="form1" method="post" action="" id="ytform">
|
3022 |
<input type="hidden" name="<?php echo $ytprefs_submitted; ?>" value="Y">
|
3023 |
+
<?php wp_nonce_field('_epyt_save', '_epyt_nonce', true); ?>
|
3024 |
<div class="jumper" id="jumpapikey"></div>
|
3025 |
<h3 class="sect">
|
3026 |
YouTube API Key
|
3030 |
</p>
|
3031 |
<p>
|
3032 |
<b class="chktitle">YouTube API Key:</b>
|
3033 |
+
<input type="text" name="<?php echo self::$opt_apikey; ?>" id="<?php echo self::$opt_apikey; ?>" value="<?php echo esc_attr(trim($all[self::$opt_apikey])); ?>" class="textinput" style="width: 250px;">
|
3034 |
<a href="https://www.youtube.com/watch?v=LpKDFT40V0U" target="_blank">Click this link »</a> and follow the video to get your API key. Don't worry, it's an easy process.
|
3035 |
</p>
|
3036 |
|
3047 |
<p>
|
3048 |
<input name="<?php echo self::$opt_restrict_wizard; ?>" id="<?php echo self::$opt_restrict_wizard; ?>" <?php checked($all[self::$opt_restrict_wizard], 1); ?> type="checkbox" class="checkbox">
|
3049 |
<label for="<?php echo self::$opt_restrict_wizard; ?>">
|
3050 |
+
<b class="chktitle">Restrict Wizard Button:</b> Select which roles can use the YouTube wizard button. For example, you may wish to hide the button from contributors submitting content on the front end.
|
3051 |
</label>
|
3052 |
<br>
|
3053 |
<span id="box_restrict_wizard" class="chx">
|
3111 |
<p>
|
3112 |
<input name="<?php echo self::$opt_defaultdims; ?>" id="<?php echo self::$opt_defaultdims; ?>" <?php checked($all[self::$opt_defaultdims], 1); ?> type="checkbox" class="checkbox">
|
3113 |
<span id="boxdefaultdims">
|
3114 |
+
Width: <input type="text" name="<?php echo self::$opt_defaultwidth; ?>" id="<?php echo self::$opt_defaultwidth; ?>" value="<?php echo esc_attr(trim($all[self::$opt_defaultwidth])); ?>" class="textinput" style="width: 50px;">
|
3115 |
+
Height: <input type="text" name="<?php echo self::$opt_defaultheight; ?>" id="<?php echo self::$opt_defaultheight; ?>" value="<?php echo esc_attr(trim($all[self::$opt_defaultheight])); ?>" class="textinput" style="width: 50px;">
|
3116 |
</span>
|
3117 |
|
3118 |
<label for="<?php echo self::$opt_defaultdims; ?>"><?php _e('<b class="chktitle">Default Dimensions:</b> Make your videos have a default size. (NOTE: Checking the responsive option will override this size setting) ') ?></label>
|
3170 |
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. This feature is experimental and is less predictable on a page with more than one embed. 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 »</a>
|
3171 |
</label>
|
3172 |
<span id="boxdefaultvol">
|
3173 |
+
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 esc_attr(trim($all[self::$opt_vol])); ?>" >
|
3174 |
</span>
|
3175 |
</p>
|
3176 |
|
3193 |
</p>
|
3194 |
<p>
|
3195 |
<label for="<?php echo self::$opt_not_live_content; ?>">
|
3196 |
+
<b class="chktitle">Default "Not Live" Content:</b>
|
3197 |
Below, enter what you would like to appear while your channel is not currently streaming live.
|
3198 |
</label>
|
3199 |
<?php
|
3445 |
</p>
|
3446 |
<p>
|
3447 |
<label for="<?php echo self::$opt_gallery_columns; ?>"><b class="chktitle">Number of Columns:</b></label>
|
3448 |
+
<input name="<?php echo self::$opt_gallery_columns; ?>" id="<?php echo self::$opt_gallery_columns; ?>" type="number" class="textinput" style="width: 60px;" value="<?php echo esc_attr(trim($all[self::$opt_gallery_columns])); ?>">
|
3449 |
Enter how many thumbnails can fit per row.
|
3450 |
</p>
|
3451 |
<p>
|
3502 |
|
3503 |
<p>
|
3504 |
<label for="<?php echo self::$opt_gallery_scrolloffset; ?>"><b class="chktitle">Scroll Offset:</b></label>
|
3505 |
+
<input name="<?php echo self::$opt_gallery_scrolloffset; ?>" id="<?php echo self::$opt_gallery_scrolloffset; ?>" type="number" class="textinput" style="width: 60px;" value="<?php echo esc_attr(trim($all[self::$opt_gallery_scrolloffset])); ?>">
|
3506 |
After you click on a thumbnail, the gallery will automatically smooth scroll up to the actual player. If you need it to scroll a few pixels further, increase this number.
|
3507 |
</p>
|
3508 |
<p>
|