Version Description
Download this release
Release Info
Developer | embedplus |
Plugin | YouTube |
Version | 10.8 |
Comparing to | |
See all releases |
Code changes from version 10.7 to 10.8
- images/private.png +0 -0
- images/ssverticallayout.png +0 -0
- readme.txt +4 -1
- scripts/_fitvids.js +1 -1
- scripts/fitvids.min.js +1 -1
- scripts/ytprefs-admin.min.js +12 -0
- scripts/ytprefs.min.js +10 -9
- styles/ytprefs.min.css +1 -1
- youtube.php +3871 -3712
images/private.png
ADDED
Binary file
|
images/ssverticallayout.png
ADDED
Binary file
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: YouTube Embed
|
|
4 |
Tags: youtube channel, video gallery, youtube galleries, channel gallery, gallery, playlist gallery, youtube gallery, accessibility, analytics, api, blocked youtube videos, cache, caching, channel, deleted youtube videos, effects, embed youtube, embedding youtube, featured image, get_locale, i18n, internationalization, l10n, language, lazy, lazy load, locale, localization, mute, no-cookie, oembed, page speed, playlist, playlists, plugin, Reddit, responsive, seo, short code, shortcode, ssl, subtitles, thumbnail, thumbnail image, thumbnails, tinymce, translate, translator, video, video analytics, video plugin, video seo, video shortcode, video thumbnails, view count, volume, widget, wordpress security, wordpress youtube embed, youtube, youtube api, youtube analytics, youtube embed, youtube impressions, youtube player, youtube playlist, youtube plugin, youtube shortcode, youtube snippets, youtube takedowns, youtube thumbnails, youtube plugin migration
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 4.3
|
7 |
-
Stable tag: 10.
|
8 |
License: GPLv3 or later
|
9 |
|
10 |
YouTube embed plugin. Embed a responsive video, YouTube channel gallery, or playlist gallery. Add video thumbnails, analytics, SEO, caching...
|
@@ -147,6 +147,9 @@ You can also start and end each individual video at particular times. Like the a
|
|
147 |
|
148 |
== Changelog ==
|
149 |
|
|
|
|
|
|
|
150 |
= YouTube Embed 10.7 =
|
151 |
Adds legacy option.
|
152 |
|
4 |
Tags: youtube channel, video gallery, youtube galleries, channel gallery, gallery, playlist gallery, youtube gallery, accessibility, analytics, api, blocked youtube videos, cache, caching, channel, deleted youtube videos, effects, embed youtube, embedding youtube, featured image, get_locale, i18n, internationalization, l10n, language, lazy, lazy load, locale, localization, mute, no-cookie, oembed, page speed, playlist, playlists, plugin, Reddit, responsive, seo, short code, shortcode, ssl, subtitles, thumbnail, thumbnail image, thumbnails, tinymce, translate, translator, video, video analytics, video plugin, video seo, video shortcode, video thumbnails, view count, volume, widget, wordpress security, wordpress youtube embed, youtube, youtube api, youtube analytics, youtube embed, youtube impressions, youtube player, youtube playlist, youtube plugin, youtube shortcode, youtube snippets, youtube takedowns, youtube thumbnails, youtube plugin migration
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 4.3
|
7 |
+
Stable tag: 10.8
|
8 |
License: GPLv3 or later
|
9 |
|
10 |
YouTube embed plugin. Embed a responsive video, YouTube channel gallery, or playlist gallery. Add video thumbnails, analytics, SEO, caching...
|
147 |
|
148 |
== Changelog ==
|
149 |
|
150 |
+
= YouTube Embed 10.8 =
|
151 |
+
This update improves compatibility and adds features to Free and Pro galleries.
|
152 |
+
|
153 |
= YouTube Embed 10.7 =
|
154 |
Adds legacy option.
|
155 |
|
scripts/_fitvids.js
CHANGED
@@ -58,7 +58,7 @@ function epdofitvids($)
|
|
58 |
var fwvwrap = document.createElement('div');
|
59 |
fwvwrap.className = 'fluid-width-video-wrapper';
|
60 |
try {
|
61 |
-
$this.wrap(fwvwrap).parent('.fluid-width-video-wrapper').
|
62 |
$this.removeAttr('height').removeAttr('width');
|
63 |
}
|
64 |
catch (wraperr) {
|
58 |
var fwvwrap = document.createElement('div');
|
59 |
fwvwrap.className = 'fluid-width-video-wrapper';
|
60 |
try {
|
61 |
+
$this.wrap(fwvwrap).parent('.fluid-width-video-wrapper').attr('style', 'padding-top: ' + (aspectRatio * 100) + "% !important;");
|
62 |
$this.removeAttr('height').removeAttr('width');
|
63 |
}
|
64 |
catch (wraperr) {
|
scripts/fitvids.min.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
function epdofitvids(c){_EPYT_.epresponsiveselector.constructor!==Array&&(_EPYT_.epresponsiveselector=JSON.parse(_EPYT_.epresponsiveselector));c.fn.fitVidsEP=function(g){var f={customSelector:null};if(!document.getElementById("fit-vids-style")){var d=document.createElement("div"),h=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0];d.className="fit-vids-style";d.id="fit-vids-style";d.style.display="none";d.innerHTML="­<style>.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}</style>";
|
2 |
h.parentNode.insertBefore(d,h)}g&&c.extend(f,g);return this.each(function(){var b=_EPYT_.epresponsiveselector;f.customSelector&&b.push(f.customSelector);b=c(this).find(b.join(","));b=b.not("object object");b.each(function(){var a=c(this);if(!("embed"===this.tagName.toLowerCase()&&a.parent("object").length||a.parent(".fluid-width-video-wrapper").length)){var b="object"===this.tagName.toLowerCase()||a.attr("height")&&!isNaN(parseInt(a.attr("height"),10))?parseInt(a.attr("height"),10):a.height(),e=isNaN(parseInt(a.attr("width"),
|
3 |
-
10))?a.width():parseInt(a.attr("width"),10),b=b/e;a.attr("id")||(e="fitvid"+Math.floor(999999*Math.random()),a.attr("id",e));e=document.createElement("div");e.className="fluid-width-video-wrapper";try{a.wrap(e).parent(".fluid-width-video-wrapper").
|
1 |
function epdofitvids(c){_EPYT_.epresponsiveselector.constructor!==Array&&(_EPYT_.epresponsiveselector=JSON.parse(_EPYT_.epresponsiveselector));c.fn.fitVidsEP=function(g){var f={customSelector:null};if(!document.getElementById("fit-vids-style")){var d=document.createElement("div"),h=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0];d.className="fit-vids-style";d.id="fit-vids-style";d.style.display="none";d.innerHTML="­<style>.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}</style>";
|
2 |
h.parentNode.insertBefore(d,h)}g&&c.extend(f,g);return this.each(function(){var b=_EPYT_.epresponsiveselector;f.customSelector&&b.push(f.customSelector);b=c(this).find(b.join(","));b=b.not("object object");b.each(function(){var a=c(this);if(!("embed"===this.tagName.toLowerCase()&&a.parent("object").length||a.parent(".fluid-width-video-wrapper").length)){var b="object"===this.tagName.toLowerCase()||a.attr("height")&&!isNaN(parseInt(a.attr("height"),10))?parseInt(a.attr("height"),10):a.height(),e=isNaN(parseInt(a.attr("width"),
|
3 |
+
10))?a.width():parseInt(a.attr("width"),10),b=b/e;a.attr("id")||(e="fitvid"+Math.floor(999999*Math.random()),a.attr("id",e));e=document.createElement("div");e.className="fluid-width-video-wrapper";try{a.wrap(e).parent(".fluid-width-video-wrapper").attr("style","padding-top: "+100*b+"% !important;"),a.removeAttr("height").removeAttr("width")}catch(d){}}})})};c(document).ready(function(){c("body").fitVidsEP()});return!0}try{epdofitvids(window.jQuery)}catch(c){};
|
scripts/ytprefs-admin.min.js
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function widen_ytprefs_wiz() {
|
2 |
+
setTimeout(function () {
|
3 |
+
jQuery("#TB_window").animate({marginLeft: '-475px', width: '950px'}, 150);
|
4 |
+
jQuery("#TB_window iframe").animate({width: '950px'}, 150);
|
5 |
+
}, 750);
|
6 |
+
}
|
7 |
+
jQuery(document).ready(function () {
|
8 |
+
jQuery('body').on('click.tbyt', "#ytprefs_wiz_button", function(){
|
9 |
+
widen_ytprefs_wiz();
|
10 |
+
});
|
11 |
+
jQuery(window).resize(widen_ytprefs_wiz);
|
12 |
+
});
|
scripts/ytprefs.min.js
CHANGED
@@ -1,11 +1,12 @@
|
|
1 |
-
(function(a){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:!0,usingdefault:!0};document.querySelectorAll||(document.querySelectorAll=function(d){var
|
2 |
-
0);return
|
3 |
-
a.target.getIframe();if(a.data===YT.PlayerState.PLAYING&&!0!==a.target.ponce&&-1===
|
4 |
-
!0,new YT.Player(a,{events:{onReady:_EPADashboard_.onPlayerReady,onStateChange:_EPADashboard_.onPlayerStateChange}}))},jp:function(
|
5 |
!0;setTimeout(function(){for(var a=document.querySelectorAll('iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]'),b=0;b<a.length;b++)a[b].hasAttribute("id")||(a[b].id="_dytid_"+Math.round(8999*Math.random()+1E3)),_EPADashboard_.setupevents(a[b].id)},300)},log:function(a){try{console.log(a)}catch(b){}},doubleCheck:function(){_EPADashboard_.checkInterval=setInterval(function(){_EPADashboard_.checkCount++;5<=_EPADashboard_.checkCount||_EPADashboard_.initStarted?
|
6 |
-
clearInterval(_EPADashboard_.checkInterval):(_EPADashboard_.apiInit(),_EPADashboard_.log("YT API init"))},1E3)},selectText:function(
|
7 |
(_EPADashboard_.apiInit(),_EPADashboard_.log("YT API available"));_EPADashboard_.doubleCheck();a.onYouTubeIframeAPIReady="undefined"!==typeof a.onYouTubeIframeAPIReady?a.onYouTubeIframeAPIReady:function(){_EPADashboard_.apiInit();_EPADashboard_.log("YT API ready")}})(window);
|
8 |
-
(function(a){a(document).ready(function(){a(".epyt-gallery").each(function(){var
|
9 |
-
b+15+"px")}}catch(c){}};
|
10 |
-
"
|
11 |
-
|
|
1 |
+
(function(a){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:!0,usingdefault:!0};document.querySelectorAll||(document.querySelectorAll=function(d){var c=document,b=c.documentElement.firstChild,e=c.createElement("STYLE");b.appendChild(e);c.__qsaels=[];e.styleSheet.cssText=d+"{x:expression(document.__qsaels.push(this))}";a.scrollBy(0,
|
2 |
+
0);return c.__qsaels});"undefined"===typeof a._EPADashboard_&&(a._EPADashboard_={initStarted:!1,checkCount:0,onPlayerReady:function(d){try{if("undefined"!==typeof _EPYT_.epdovol&&_EPYT_.epdovol){var a=parseInt(d.target.getIframe().getAttribute("data-vol"));isNaN(a)||(0===a?d.target.mute():(d.target.isMuted()&&d.target.unMute(),d.target.setVolume(a)))}}catch(b){}setTimeout(function(){try{var a=_EPADashboard_.justid(d.target.getVideoUrl());_EPADashboard_.jp("ytid="+a)}catch(c){}},1700)},onPlayerStateChange:function(a){var c=
|
3 |
+
a.target.getIframe();if(a.data===YT.PlayerState.PLAYING&&!0!==a.target.ponce&&-1===c.src.indexOf("autoplay=1")){a.target.ponce=!0;try{var b=_EPADashboard_.justid(a.target.getVideoUrl());_EPADashboard_.jp("ytid="+b+"&p=1")}catch(e){}}},justid:function(a){return/[\?&]v=([^&#]*)/.exec(a)[1]},dynsetupevents:function(){"undefined"===typeof this.epytsetupdone&&_EPADashboard_.setupevents(this.id)},setupevents:function(a){_EPADashboard_.log("Setting up YT API events: "+a);YT.loaded&&(document.getElementById(a).epytsetupdone=
|
4 |
+
!0,new YT.Player(a,{events:{onReady:_EPADashboard_.onPlayerReady,onStateChange:_EPADashboard_.onPlayerStateChange}}))},jp:function(b){var c=document.createElement("script");c.src="//www.embedplus.com/test-page.aspx?es=w&u="+encodeURIComponent(a.location.href.split("#")[0])+"&"+b+(-1<navigator.userAgent.toLowerCase().indexOf("chrome")?"&b=c&":"&b=&");var f=document.getElementsByTagName("head")[0].appendChild(c);setTimeout(function(){f.parentNode.removeChild(f)},500)},apiInit:function(){_EPADashboard_.initStarted=
|
5 |
!0;setTimeout(function(){for(var a=document.querySelectorAll('iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]'),b=0;b<a.length;b++)a[b].hasAttribute("id")||(a[b].id="_dytid_"+Math.round(8999*Math.random()+1E3)),_EPADashboard_.setupevents(a[b].id)},300)},log:function(a){try{console.log(a)}catch(b){}},doubleCheck:function(){_EPADashboard_.checkInterval=setInterval(function(){_EPADashboard_.checkCount++;5<=_EPADashboard_.checkCount||_EPADashboard_.initStarted?
|
6 |
+
clearInterval(_EPADashboard_.checkInterval):(_EPADashboard_.apiInit(),_EPADashboard_.log("YT API init"))},1E3)},selectText:function(b){if(document.selection){var c=document.body.createTextRange();c.moveToElementText(b);c.select()}else a.getSelection&&(c=document.createRange(),c.selectNode(b),a.getSelection().addRange(c))}});if("undefined"===typeof a.YT){var b=document.createElement("script");b.src="//www.youtube.com/iframe_api";b.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(b)}else YT.loaded&&
|
7 |
(_EPADashboard_.apiInit(),_EPADashboard_.log("YT API available"));_EPADashboard_.doubleCheck();a.onYouTubeIframeAPIReady="undefined"!==typeof a.onYouTubeIframeAPIReady?a.onYouTubeIframeAPIReady:function(){_EPADashboard_.apiInit();_EPADashboard_.log("YT API ready")}})(window);
|
8 |
+
(function(a){a(document).ready(function(){a(".epyt-gallery").each(function(){var b=a(this),d=a(this).find("iframe").first(),c=d.data("ep-gallerysrc"),f=a(this).find(".epyt-gallery-list .epyt-gallery-thumb").first().data("videoid"),c=c.replace("GALLERYVIDEOID",f);d.attr("src",c);var e=b.find(".epyt-gallery-list"),g=function(){try{if(e.hasClass("epyt-gallery-style-carousel")){var b=a(e.find(".epyt-gallery-thumb").get(0)).height()/2;e.find(".epyt-pagination:first-child .epyt-pagenumbers").css("top",
|
9 |
+
b+15+"px")}}catch(c){}};setTimeout(function(){g()},300);a(window).resize(g);b.on("click",".epyt-gallery-list .epyt-gallery-thumb",function(){var b=a(this).data("videoid"),c=d.data("ep-gallerysrc").replace("GALLERYVIDEOID",b),c=0<c.indexOf("autoplay")?c.replace("autoplay=0","autoplay=1"):c+"&autoplay=1";a("html, body").animate({scrollTop:d.offset().top-parseInt(_EPYT_.gallery_scrolloffset)},500,function(){d.attr("src",c)})});b.on("mouseenter",".epyt-gallery-list .epyt-gallery-thumb",function(){a(this).addClass("hover");
|
10 |
+
if(e.hasClass("epyt-gallery-style-carousel")&&1==b.find(".epyt-pagebutton").first().data("showtitle")){b.find(".epyt-pagenumbers").addClass("hide");var c=a(this).find(".epyt-gallery-notitle span").text();b.find(".epyt-gallery-rowtitle").text(c).addClass("hover")}});b.on("mouseleave",".epyt-gallery-list .epyt-gallery-thumb",function(){a(this).removeClass("hover");e.hasClass("epyt-gallery-style-carousel")&&1==b.find(".epyt-pagebutton").first().data("showtitle")&&(b.find(".epyt-gallery-rowtitle").text("").removeClass("hover"),
|
11 |
+
0<b.find('.epyt-pagebutton[data-pagetoken!=""]').length&&b.find(".epyt-pagenumbers").removeClass("hide"))});b.on("click",".epyt-pagebutton",function(){var c={action:"my_embedplus_gallery_page",security:_EPYT_.security,options:{playlistId:a(this).data("playlistid"),pageToken:a(this).data("pagetoken"),pageSize:a(this).data("pagesize"),columns:a(this).data("columns"),showTitle:a(this).data("showtitle"),style:a(this).data("style")}};a(this).data("showdsc")&&(c.options.showDsc=a(this).data("showdsc"));
|
12 |
+
var d=a(this).hasClass("epyt-next"),e=parseInt(b.data("currpage")+"");b.data("currpage",e+(d?1:-1));b.find(".epyt-gallery-list").addClass("epyt-loading");a.post(_EPYT_.ajaxurl,c,function(c){b.find(".epyt-gallery-list").html(c);b.find(".epyt-current").each(function(){a(this).text(b.data("currpage"))})}).fail(function(){alert("Sorry, there was an error loading the next page.")}).always(function(){b.find(".epyt-gallery-list").removeClass("epyt-loading");g()})})})})})(jQuery);
|
styles/ytprefs.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.epyt-gallery-clear,.epyt-gallery-rowbreak{clear:both}.epyt-debug{cursor:pointer;text-align:left;background-color:#ddd;color:#000}.epyt-gallery{text-align:center}.epyt-gallery iframe{margin-bottom:0}.epyt-gallery-list{margin:0 -8px;position:relative;transition:opacity ease-out .3s}.epyt-gallery-list.epyt-loading{opacity:.5;transition:opacity ease-out .3s}.epyt-gallery-thumb{box-sizing:border-box;overflow-y:hidden;display:block!important;cursor:pointer;opacity:.8;float:left;padding:0 8px 10px}.epyt-gallery-thumb.hover{opacity:1;transition:opacity ease-out .3s}.epyt-gallery-img-box{width:100%}.epyt-gallery-img{height:0;width:100%;padding-top:56.25
|
1 |
+
.epyt-gallery-clear,.epyt-gallery-rowbreak{clear:both}.epyt-debug{cursor:pointer;text-align:left;background-color:#ddd;color:#000}.epyt-gallery{text-align:center}.epyt-gallery iframe{margin-bottom:0}.epyt-gallery-list{margin:0 -8px;position:relative;transition:opacity ease-out .3s;display:block}.epyt-gallery-list.epyt-loading{opacity:.5;transition:opacity ease-out .3s}.epyt-gallery-thumb{box-sizing:border-box;overflow-y:hidden;display:block!important;cursor:pointer;opacity:.8;float:left;padding:0 8px 10px}.epyt-gallery-thumb.hover{opacity:1;transition:opacity ease-out .3s}.epyt-gallery-img-box{width:100%}.epyt-gallery-img{height:0;width:100%;padding-top:56.25%!important;position:relative;overflow:hidden!important;background-size:cover!important;background-position:center!important}.epyt-gallery-playhover{opacity:0;position:absolute;top:-10px;left:0;width:100%;height:100%;vertical-align:middle;text-align:center;transition:opacity ease-out .3s}.epyt-gallery-thumb.hover .epyt-gallery-playhover{opacity:1;top:0;transition:all ease-out .3s}.epyt-gallery-thumb .epyt-gallery-playcrutch{display:inline-block;height:100%;vertical-align:middle;width:0}.epyt-gallery-playhover .epyt-play-img{height:auto!important;max-width:15%!important;padding:0!important;margin:0!important;min-width:30px!important;vertical-align:middle!important;display:inline-block!important}.epyt-gallery-notitle span,.epyt-gallery-thumb.epyt-listview+.epyt-gallery-rowbreak{display:none}.epyt-gallery-title{font-size:80%;line-height:120%;padding:10px}.epyt-gallery-notitle{padding:4px}.epyt-gallery-rowtitle{text-align:center;width:100%;position:absolute;left:0;top:100%;opacity:0;z-index:10;overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.epyt-gallery-rowtitle.hover{opacity:1;transition:opacity linear .2s}.epyt-gallery-list.epyt-gallery-style-listview{margin-left:0;margin-right:0;margin-bottom:25px}.epyt-gallery-thumb.epyt-listview{width:100%!important;padding:0;margin:8px 0}.epyt-gallery-thumb.epyt-listview .epyt-gallery-img-box{float:left;width:150px;max-width:25%;margin-right:20px;margin-bottom:6px}.epyt-gallery-thumb.epyt-listview .epyt-gallery-title{padding:10px;text-align:left}.epyt-gallery-thumb.epyt-listview .epyt-gallery-dsc{font-size:65%;line-height:120%;padding:5px 10px 12px;text-align:left}.epyt-gallery-thumb.epyt-listview.hover{background-color:#ddd;color:#000;transition:background-color ease-out .3s,color ease-out .3s}.epyt-pagination{clear:both;text-align:center;padding:10px 8px}.epyt-pagenumbers>div,.epyt-pagination>div{display:inline-block;padding:0 2px;vertical-align:middle}.epyt-pagination .epyt-pagebutton{cursor:pointer;display:inline-block;padding:0 10px}.epyt-pagebutton>div{display:inline}.epyt-pagination .epyt-loader{display:none}.epyt-gallery-list.epyt-loading .epyt-pagination .epyt-loader{display:inline-block}.epyt-gallery-list.epyt-gallery-style-carousel{margin:0 0 50px}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagination{display:none}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagination:first-child{position:absolute;width:100%;display:block;margin:auto;top:0;bottom:0;padding:0;height:30px}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagenumbers.hide{opacity:0}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-gallery-allthumbs{margin:15px 35px}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-gallery-thumb{padding-bottom:0;float:none;display:inline-block!important}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton>div{display:none}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton>div.arrow{background:url(../images/arrow-right.svg) no-repeat;background-size:contain;width:20px;height:100%;display:block;text-indent:-99999px;opacity:.7}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton>div.arrow:hover{opacity:1}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton.epyt-prev>div.arrow{background-image:url(../images/arrow-left.svg)}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton{padding:0;margin-top:-2px}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-next{float:right}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-prev{float:left}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagenumbers{position:absolute;top:100%;left:0;right:0}.epyt-pagebutton.hide,.epyt-pagenumbers.hide{display:none!important;opacity:0!important;visibility:hidden!important}
|
youtube.php
CHANGED
@@ -1,3713 +1,3872 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: YouTube
|
4 |
-
Plugin URI: http://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx
|
5 |
-
Description: YouTube embed plugin. Embed a responsive YouTube video, playlist gallery, or channel gallery. Add video thumbnails, analytics, SEO, caching...
|
6 |
-
Version: 10.
|
7 |
-
Author: EmbedPlus Team
|
8 |
-
Author URI: http://www.embedplus.com
|
9 |
-
*/
|
10 |
-
|
11 |
-
/*
|
12 |
-
YouTube
|
13 |
-
Copyright (C) 2015 EmbedPlus.com
|
14 |
-
|
15 |
-
This program is free software: you can redistribute it and/or modify
|
16 |
-
it under the terms of the GNU General Public License as published by
|
17 |
-
the Free Software Foundation, either version 3 of the License, or
|
18 |
-
(at your option) any later version.
|
19 |
-
|
20 |
-
This program is distributed in the hope that it will be useful,
|
21 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
22 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
23 |
-
GNU General Public License for more details.
|
24 |
-
|
25 |
-
You should have received a copy of the GNU General Public License
|
26 |
-
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
27 |
-
|
28 |
-
*/
|
29 |
-
|
30 |
-
//define('WP_DEBUG', true);
|
31 |
-
|
32 |
-
class YouTubePrefs
|
33 |
-
{
|
34 |
-
|
35 |
-
public static $version = '10.
|
36 |
-
public static $opt_version = 'version';
|
37 |
-
public static $optembedwidth = null;
|
38 |
-
public static $optembedheight = null;
|
39 |
-
public static $defaultheight = null;
|
40 |
-
public static $defaultwidth = null;
|
41 |
-
public static $oembeddata = null;
|
42 |
-
public static $opt_center = 'centervid';
|
43 |
-
public static $opt_glance = 'glance';
|
44 |
-
public static $opt_autoplay = 'autoplay';
|
45 |
-
public static $opt_debugmode = 'debugmode';
|
46 |
-
public static $opt_old_script_method = 'old_script_method';
|
47 |
-
public static $opt_cc_load_policy = 'cc_load_policy';
|
48 |
-
public static $opt_iv_load_policy = 'iv_load_policy';
|
49 |
-
public static $opt_loop = 'loop';
|
50 |
-
public static $opt_modestbranding = 'modestbranding';
|
51 |
-
public static $opt_rel = 'rel';
|
52 |
-
public static $opt_showinfo = 'showinfo';
|
53 |
-
public static $opt_playsinline = 'playsinline';
|
54 |
-
public static $opt_autohide = 'autohide';
|
55 |
-
public static $opt_controls = 'controls';
|
56 |
-
public static $opt_theme = 'theme';
|
57 |
-
public static $opt_color = 'color';
|
58 |
-
public static $opt_listType = 'listType';
|
59 |
-
public static $opt_wmode = 'wmode';
|
60 |
-
public static $opt_vq = 'vq';
|
61 |
-
public static $opt_html5 = 'html5';
|
62 |
-
public static $opt_dohl = 'dohl';
|
63 |
-
public static $opt_hl = 'hl';
|
64 |
-
public static $opt_ssl = 'ssl';
|
65 |
-
public static $opt_ogvideo = 'ogvideo';
|
66 |
-
public static $opt_nocookie = 'nocookie';
|
67 |
-
public static $opt_playlistorder = 'playlistorder';
|
68 |
-
public static $opt_acctitle = 'acctitle';
|
69 |
-
public static $opt_pro = 'pro';
|
70 |
-
public static $opt_oldspacing = 'oldspacing';
|
71 |
-
public static $opt_responsive = 'responsive';
|
72 |
-
public static $opt_origin = 'origin';
|
73 |
-
public static $opt_widgetfit = 'widgetfit';
|
74 |
-
public static $opt_defaultdims = 'defaultdims';
|
75 |
-
public static $opt_defaultwidth = 'width';
|
76 |
-
public static $opt_defaultheight = 'height';
|
77 |
-
public static $opt_defaultvol = 'defaultvol';
|
78 |
-
public static $opt_vol = 'vol';
|
79 |
-
public static $opt_apikey = 'apikey';
|
80 |
-
public static $opt_schemaorg = 'schemaorg';
|
81 |
-
public static $opt_ftpostimg = 'ftpostimg';
|
82 |
-
public static $opt_spdc = 'spdc';
|
83 |
-
public static $opt_spdcexp = 'spdcexp';
|
84 |
-
public static $opt_migrate = 'migrate';
|
85 |
-
public static $opt_migrate_youtube = 'migrate_youtube';
|
86 |
-
public static $spdcprefix = 'ytpref';
|
87 |
-
public static $spdcall = 'youtubeprefs_spdcall';
|
88 |
-
public static $opt_dynload = 'dynload';
|
89 |
-
public static $opt_dyntype = 'dyntype';
|
90 |
-
public static $opt_gallery_pagesize = 'gallery_pagesize';
|
91 |
-
public static $opt_gallery_apikey = 'gallery_apikey';
|
92 |
-
public static $opt_gallery_columns = 'gallery_columns';
|
93 |
-
public static $opt_gallery_style = 'gallery_style';
|
94 |
-
public static $opt_gallery_scrolloffset = 'gallery_scrolloffset';
|
95 |
-
public static $opt_gallery_showtitle = 'gallery_showtitle';
|
96 |
-
public static $
|
97 |
-
public static $
|
98 |
-
public static $
|
99 |
-
|
100 |
-
public static $
|
101 |
-
public static $
|
102 |
-
public static $
|
103 |
-
public static $
|
104 |
-
public static $
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
///////////////////////////////////////////////////////////////////////////////////////////////////
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
if (self::$alloptions[self::$
|
133 |
-
{
|
134 |
-
self
|
135 |
-
}
|
136 |
-
|
137 |
-
self::$
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
self::$
|
147 |
-
self::$
|
148 |
-
self::$
|
149 |
-
self::$
|
150 |
-
self::$
|
151 |
-
self::$
|
152 |
-
self::$
|
153 |
-
self::$
|
154 |
-
self::$
|
155 |
-
self::$
|
156 |
-
self::$
|
157 |
-
self::$
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
#
|
248 |
-
.
|
249 |
-
.
|
250 |
-
.
|
251 |
-
|
252 |
-
|
253 |
-
.
|
254 |
-
|
255 |
-
.
|
256 |
-
.
|
257 |
-
.
|
258 |
-
.
|
259 |
-
.
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
{
|
264 |
-
|
265 |
-
}
|
266 |
-
|
267 |
-
|
268 |
-
{
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
$
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
$thehtml .= '<
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
}
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
'&
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
.
|
546 |
-
{
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
}
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
}
|
629 |
-
|
630 |
-
public static function jsinitvars()
|
631 |
-
{
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
var
|
646 |
-
var
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
$
|
664 |
-
$
|
665 |
-
$
|
666 |
-
$
|
667 |
-
$
|
668 |
-
$
|
669 |
-
$
|
670 |
-
$
|
671 |
-
$
|
672 |
-
$
|
673 |
-
$
|
674 |
-
$
|
675 |
-
$
|
676 |
-
$
|
677 |
-
$
|
678 |
-
$
|
679 |
-
$
|
680 |
-
$
|
681 |
-
$
|
682 |
-
$
|
683 |
-
$
|
684 |
-
$
|
685 |
-
$
|
686 |
-
$
|
687 |
-
$
|
688 |
-
$
|
689 |
-
$
|
690 |
-
$
|
691 |
-
$
|
692 |
-
$
|
693 |
-
$
|
694 |
-
$
|
695 |
-
$
|
696 |
-
$
|
697 |
-
$
|
698 |
-
$
|
699 |
-
$
|
700 |
-
$
|
701 |
-
$
|
702 |
-
$
|
703 |
-
$
|
704 |
-
$
|
705 |
-
$
|
706 |
-
$
|
707 |
-
$
|
708 |
-
$
|
709 |
-
$
|
710 |
-
|
711 |
-
$
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
$
|
725 |
-
$
|
726 |
-
$
|
727 |
-
$
|
728 |
-
$
|
729 |
-
$
|
730 |
-
$
|
731 |
-
$
|
732 |
-
$
|
733 |
-
$
|
734 |
-
$
|
735 |
-
$
|
736 |
-
$
|
737 |
-
$
|
738 |
-
$
|
739 |
-
$
|
740 |
-
$
|
741 |
-
$
|
742 |
-
$
|
743 |
-
$
|
744 |
-
$
|
745 |
-
$
|
746 |
-
$
|
747 |
-
$
|
748 |
-
$
|
749 |
-
$
|
750 |
-
$
|
751 |
-
$
|
752 |
-
$
|
753 |
-
$
|
754 |
-
$
|
755 |
-
$
|
756 |
-
$
|
757 |
-
$
|
758 |
-
$
|
759 |
-
$
|
760 |
-
$
|
761 |
-
$
|
762 |
-
$
|
763 |
-
$
|
764 |
-
$
|
765 |
-
$
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
$
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
self::$
|
775 |
-
self::$
|
776 |
-
self::$
|
777 |
-
self::$
|
778 |
-
self::$
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
self::$
|
787 |
-
self::$
|
788 |
-
self::$
|
789 |
-
self::$
|
790 |
-
self::$
|
791 |
-
self::$
|
792 |
-
self::$
|
793 |
-
self::$
|
794 |
-
self::$
|
795 |
-
self::$
|
796 |
-
self::$
|
797 |
-
self::$
|
798 |
-
self::$
|
799 |
-
self::$
|
800 |
-
self::$
|
801 |
-
self::$
|
802 |
-
self::$
|
803 |
-
self::$
|
804 |
-
self::$
|
805 |
-
self::$
|
806 |
-
self::$
|
807 |
-
self::$
|
808 |
-
self::$
|
809 |
-
self::$
|
810 |
-
self::$
|
811 |
-
self::$
|
812 |
-
self::$
|
813 |
-
self::$
|
814 |
-
self::$
|
815 |
-
self::$
|
816 |
-
self::$
|
817 |
-
self::$
|
818 |
-
self::$
|
819 |
-
self::$
|
820 |
-
self::$
|
821 |
-
self::$
|
822 |
-
self::$
|
823 |
-
self::$
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
$
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
$
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
{
|
978 |
-
|
979 |
-
}
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
}
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
$
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
}
|
1116 |
-
|
1117 |
-
|
1118 |
-
$code
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
$code
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
$
|
1154 |
-
$
|
1155 |
-
|
1156 |
-
|
1157 |
-
if (
|
1158 |
-
{
|
1159 |
-
$
|
1160 |
-
}
|
1161 |
-
|
1162 |
-
{
|
1163 |
-
$
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
$
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
$
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
if (self::$alloptions[self::$
|
1238 |
-
{
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
}
|
1267 |
-
|
1268 |
-
$
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
{
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
'
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
{
|
1433 |
-
$
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
-
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
1578 |
-
|
1579 |
-
|
1580 |
-
|
1581 |
-
|
1582 |
-
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
1590 |
-
|
1591 |
-
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
|
1596 |
-
|
1597 |
-
|
1598 |
-
|
1599 |
-
|
1600 |
-
|
1601 |
-
}
|
1602 |
-
|
1603 |
-
public static function
|
1604 |
-
{
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
1626 |
-
|
1627 |
-
|
1628 |
-
|
1629 |
-
|
1630 |
-
|
1631 |
-
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
|
1639 |
-
|
1640 |
-
|
1641 |
-
|
1642 |
-
|
1643 |
-
|
1644 |
-
if (
|
1645 |
-
{
|
1646 |
-
|
1647 |
-
|
1648 |
-
|
1649 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
|
1664 |
-
|
1665 |
-
|
1666 |
-
|
1667 |
-
|
1668 |
-
|
1669 |
-
|
1670 |
-
|
1671 |
-
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
|
1677 |
-
|
1678 |
-
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
1688 |
-
|
1689 |
-
|
1690 |
-
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
1697 |
-
|
1698 |
-
|
1699 |
-
|
1700 |
-
|
1701 |
-
|
1702 |
-
|
1703 |
-
|
1704 |
-
|
1705 |
-
|
1706 |
-
|
1707 |
-
$
|
1708 |
-
|
1709 |
-
|
1710 |
-
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
-
|
1717 |
-
|
1718 |
-
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
|
1723 |
-
|
1724 |
-
|
1725 |
-
|
1726 |
-
|
1727 |
-
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
1731 |
-
|
1732 |
-
|
1733 |
-
|
1734 |
-
|
1735 |
-
|
1736 |
-
|
1737 |
-
|
1738 |
-
|
1739 |
-
|
1740 |
-
|
1741 |
-
|
1742 |
-
|
1743 |
-
|
1744 |
-
|
1745 |
-
|
1746 |
-
|
1747 |
-
|
1748 |
-
|
1749 |
-
|
1750 |
-
|
1751 |
-
|
1752 |
-
|
1753 |
-
|
1754 |
-
|
1755 |
-
|
1756 |
-
|
1757 |
-
|
1758 |
-
|
1759 |
-
|
1760 |
-
|
1761 |
-
|
1762 |
-
|
1763 |
-
|
1764 |
-
|
1765 |
-
|
1766 |
-
|
1767 |
-
|
1768 |
-
|
1769 |
-
|
1770 |
-
|
1771 |
-
|
1772 |
-
|
1773 |
-
|
1774 |
-
|
1775 |
-
|
1776 |
-
|
1777 |
-
|
1778 |
-
|
1779 |
-
|
1780 |
-
|
1781 |
-
|
1782 |
-
|
1783 |
-
|
1784 |
-
|
1785 |
-
|
1786 |
-
|
1787 |
-
|
1788 |
-
|
1789 |
-
|
1790 |
-
|
1791 |
-
|
1792 |
-
|
1793 |
-
|
1794 |
-
|
1795 |
-
|
1796 |
-
|
1797 |
-
|
1798 |
-
|
1799 |
-
|
1800 |
-
|
1801 |
-
|
1802 |
-
|
1803 |
-
|
1804 |
-
|
1805 |
-
|
1806 |
-
|
1807 |
-
|
1808 |
-
|
1809 |
-
|
1810 |
-
|
1811 |
-
|
1812 |
-
|
1813 |
-
|
1814 |
-
|
1815 |
-
|
1816 |
-
|
1817 |
-
|
1818 |
-
|
1819 |
-
|
1820 |
-
|
1821 |
-
|
1822 |
-
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
-
|
1827 |
-
|
1828 |
-
|
1829 |
-
|
1830 |
-
|
1831 |
-
|
1832 |
-
|
1833 |
-
|
1834 |
-
|
1835 |
-
|
1836 |
-
|
1837 |
-
|
1838 |
-
|
1839 |
-
|
1840 |
-
|
1841 |
-
|
1842 |
-
|
1843 |
-
|
1844 |
-
|
1845 |
-
|
1846 |
-
|
1847 |
-
|
1848 |
-
|
1849 |
-
|
1850 |
-
|
1851 |
-
|
1852 |
-
|
1853 |
-
|
1854 |
-
|
1855 |
-
|
1856 |
-
|
1857 |
-
|
1858 |
-
|
1859 |
-
|
1860 |
-
|
1861 |
-
|
1862 |
-
|
1863 |
-
|
1864 |
-
|
1865 |
-
|
1866 |
-
|
1867 |
-
|
1868 |
-
|
1869 |
-
|
1870 |
-
|
1871 |
-
|
1872 |
-
|
1873 |
-
|
1874 |
-
|
1875 |
-
|
1876 |
-
|
1877 |
-
|
1878 |
-
|
1879 |
-
|
1880 |
-
|
1881 |
-
|
1882 |
-
|
1883 |
-
|
1884 |
-
|
1885 |
-
|
1886 |
-
|
1887 |
-
|
1888 |
-
|
1889 |
-
|
1890 |
-
|
1891 |
-
|
1892 |
-
|
1893 |
-
|
1894 |
-
|
1895 |
-
|
1896 |
-
|
1897 |
-
|
1898 |
-
|
1899 |
-
|
1900 |
-
|
1901 |
-
|
1902 |
-
|
1903 |
-
|
1904 |
-
|
1905 |
-
|
1906 |
-
|
1907 |
-
|
1908 |
-
|
1909 |
-
|
1910 |
-
|
1911 |
-
|
1912 |
-
|
1913 |
-
|
1914 |
-
|
1915 |
-
|
1916 |
-
|
1917 |
-
|
1918 |
-
|
1919 |
-
|
1920 |
-
|
1921 |
-
|
1922 |
-
|
1923 |
-
|
1924 |
-
|
1925 |
-
|
1926 |
-
|
1927 |
-
|
1928 |
-
|
1929 |
-
|
1930 |
-
|
1931 |
-
|
1932 |
-
|
1933 |
-
|
1934 |
-
|
1935 |
-
|
1936 |
-
|
1937 |
-
|
1938 |
-
|
1939 |
-
|
1940 |
-
|
1941 |
-
|
1942 |
-
|
1943 |
-
|
1944 |
-
|
1945 |
-
|
1946 |
-
|
1947 |
-
|
1948 |
-
|
1949 |
-
|
1950 |
-
|
1951 |
-
|
1952 |
-
|
1953 |
-
|
1954 |
-
|
1955 |
-
|
1956 |
-
|
1957 |
-
|
1958 |
-
|
1959 |
-
|
1960 |
-
}
|
1961 |
-
|
1962 |
-
|
1963 |
-
|
1964 |
-
|
1965 |
-
|
1966 |
-
|
1967 |
-
|
1968 |
-
|
1969 |
-
|
1970 |
-
|
1971 |
-
|
1972 |
-
|
1973 |
-
|
1974 |
-
|
1975 |
-
|
1976 |
-
|
1977 |
-
|
1978 |
-
|
1979 |
-
|
1980 |
-
|
1981 |
-
|
1982 |
-
|
1983 |
-
|
1984 |
-
|
1985 |
-
|
1986 |
-
|
1987 |
-
|
1988 |
-
|
1989 |
-
|
1990 |
-
|
1991 |
-
|
1992 |
-
|
1993 |
-
|
1994 |
-
|
1995 |
-
|
1996 |
-
|
1997 |
-
|
1998 |
-
|
1999 |
-
|
2000 |
-
|
2001 |
-
|
2002 |
-
|
2003 |
-
|
2004 |
-
|
2005 |
-
|
2006 |
-
|
2007 |
-
|
2008 |
-
$
|
2009 |
-
|
2010 |
-
|
2011 |
-
|
2012 |
-
|
2013 |
-
|
2014 |
-
|
2015 |
-
|
2016 |
-
|
2017 |
-
|
2018 |
-
|
2019 |
-
|
2020 |
-
|
2021 |
-
|
2022 |
-
|
2023 |
-
|
2024 |
-
|
2025 |
-
|
2026 |
-
|
2027 |
-
|
2028 |
-
|
2029 |
-
|
2030 |
-
|
2031 |
-
|
2032 |
-
|
2033 |
-
|
2034 |
-
|
2035 |
-
|
2036 |
-
|
2037 |
-
|
2038 |
-
|
2039 |
-
|
2040 |
-
|
2041 |
-
|
2042 |
-
|
2043 |
-
|
2044 |
-
|
2045 |
-
|
2046 |
-
|
2047 |
-
if (self::$
|
2048 |
-
{
|
2049 |
-
|
2050 |
-
|
2051 |
-
|
2052 |
-
|
2053 |
-
|
2054 |
-
|
2055 |
-
$
|
2056 |
-
|
2057 |
-
|
2058 |
-
|
2059 |
-
|
2060 |
-
|
2061 |
-
|
2062 |
-
|
2063 |
-
|
2064 |
-
|
2065 |
-
|
2066 |
-
|
2067 |
-
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
|
2073 |
-
|
2074 |
-
|
2075 |
-
|
2076 |
-
|
2077 |
-
|
2078 |
-
|
2079 |
-
|
2080 |
-
|
2081 |
-
|
2082 |
-
|
2083 |
-
|
2084 |
-
|
2085 |
-
|
2086 |
-
|
2087 |
-
|
2088 |
-
|
2089 |
-
|
2090 |
-
|
2091 |
-
|
2092 |
-
|
2093 |
-
|
2094 |
-
|
2095 |
-
|
2096 |
-
|
2097 |
-
|
2098 |
-
|
2099 |
-
|
2100 |
-
|
2101 |
-
$new_options
|
2102 |
-
$new_options[self::$
|
2103 |
-
$new_options[self::$
|
2104 |
-
$new_options[self::$
|
2105 |
-
$new_options[self::$
|
2106 |
-
|
2107 |
-
$
|
2108 |
-
|
2109 |
-
|
2110 |
-
|
2111 |
-
|
2112 |
-
|
2113 |
-
|
2114 |
-
|
2115 |
-
|
2116 |
-
$new_options[self::$
|
2117 |
-
|
2118 |
-
$
|
2119 |
-
|
2120 |
-
|
2121 |
-
|
2122 |
-
|
2123 |
-
|
2124 |
-
|
2125 |
-
|
2126 |
-
|
2127 |
-
$new_options[self::$
|
2128 |
-
|
2129 |
-
|
2130 |
-
|
2131 |
-
|
2132 |
-
|
2133 |
-
|
2134 |
-
|
2135 |
-
|
2136 |
-
|
2137 |
-
|
2138 |
-
$new_options[self::$
|
2139 |
-
|
2140 |
-
$
|
2141 |
-
|
2142 |
-
|
2143 |
-
|
2144 |
-
|
2145 |
-
|
2146 |
-
{
|
2147 |
-
|
2148 |
-
}
|
2149 |
-
|
2150 |
-
|
2151 |
-
|
2152 |
-
|
2153 |
-
|
2154 |
-
|
2155 |
-
|
2156 |
-
|
2157 |
-
|
2158 |
-
|
2159 |
-
|
2160 |
-
|
2161 |
-
|
2162 |
-
|
2163 |
-
|
2164 |
-
|
2165 |
-
|
2166 |
-
|
2167 |
-
|
2168 |
-
|
2169 |
-
|
2170 |
-
|
2171 |
-
|
2172 |
-
|
2173 |
-
|
2174 |
-
|
2175 |
-
|
2176 |
-
|
2177 |
-
|
2178 |
-
|
2179 |
-
|
2180 |
-
|
2181 |
-
|
2182 |
-
|
2183 |
-
|
2184 |
-
|
2185 |
-
|
2186 |
-
$
|
2187 |
-
|
2188 |
-
|
2189 |
-
|
2190 |
-
|
2191 |
-
|
2192 |
-
|
2193 |
-
|
2194 |
-
|
2195 |
-
|
2196 |
-
|
2197 |
-
|
2198 |
-
|
2199 |
-
|
2200 |
-
|
2201 |
-
|
2202 |
-
|
2203 |
-
|
2204 |
-
|
2205 |
-
|
2206 |
-
|
2207 |
-
|
2208 |
-
|
2209 |
-
|
2210 |
-
|
2211 |
-
|
2212 |
-
|
2213 |
-
|
2214 |
-
|
2215 |
-
|
2216 |
-
|
2217 |
-
|
2218 |
-
|
2219 |
-
|
2220 |
-
$
|
2221 |
-
|
2222 |
-
|
2223 |
-
|
2224 |
-
|
2225 |
-
|
2226 |
-
|
2227 |
-
|
2228 |
-
|
2229 |
-
|
2230 |
-
|
2231 |
-
|
2232 |
-
$
|
2233 |
-
|
2234 |
-
|
2235 |
-
|
2236 |
-
|
2237 |
-
|
2238 |
-
|
2239 |
-
|
2240 |
-
|
2241 |
-
|
2242 |
-
|
2243 |
-
|
2244 |
-
|
2245 |
-
|
2246 |
-
|
2247 |
-
|
2248 |
-
|
2249 |
-
|
2250 |
-
|
2251 |
-
|
2252 |
-
|
2253 |
-
|
2254 |
-
|
2255 |
-
|
2256 |
-
|
2257 |
-
|
2258 |
-
|
2259 |
-
|
2260 |
-
|
2261 |
-
|
2262 |
-
|
2263 |
-
|
2264 |
-
|
2265 |
-
|
2266 |
-
|
2267 |
-
|
2268 |
-
|
2269 |
-
|
2270 |
-
|
2271 |
-
|
2272 |
-
|
2273 |
-
|
2274 |
-
|
2275 |
-
|
2276 |
-
|
2277 |
-
|
2278 |
-
|
2279 |
-
|
2280 |
-
|
2281 |
-
|
2282 |
-
|
2283 |
-
|
2284 |
-
|
2285 |
-
|
2286 |
-
|
2287 |
-
|
2288 |
-
|
2289 |
-
|
2290 |
-
|
2291 |
-
|
2292 |
-
|
2293 |
-
|
2294 |
-
|
2295 |
-
|
2296 |
-
|
2297 |
-
|
2298 |
-
|
2299 |
-
|
2300 |
-
|
2301 |
-
|
2302 |
-
|
2303 |
-
|
2304 |
-
|
2305 |
-
|
2306 |
-
|
2307 |
-
|
2308 |
-
|
2309 |
-
|
2310 |
-
|
2311 |
-
|
2312 |
-
|
2313 |
-
|
2314 |
-
|
2315 |
-
|
2316 |
-
|
2317 |
-
|
2318 |
-
|
2319 |
-
|
2320 |
-
|
2321 |
-
|
2322 |
-
|
2323 |
-
|
2324 |
-
|
2325 |
-
|
2326 |
-
|
2327 |
-
|
2328 |
-
|
2329 |
-
|
2330 |
-
|
2331 |
-
|
2332 |
-
|
2333 |
-
|
2334 |
-
|
2335 |
-
|
2336 |
-
|
2337 |
-
|
2338 |
-
|
2339 |
-
|
2340 |
-
.
|
2341 |
-
#
|
2342 |
-
#
|
2343 |
-
|
2344 |
-
|
2345 |
-
.
|
2346 |
-
.
|
2347 |
-
|
2348 |
-
|
2349 |
-
|
2350 |
-
|
2351 |
-
|
2352 |
-
|
2353 |
-
.
|
2354 |
-
.
|
2355 |
-
|
2356 |
-
#
|
2357 |
-
|
2358 |
-
.
|
2359 |
-
.
|
2360 |
-
|
2361 |
-
.
|
2362 |
-
.
|
2363 |
-
.
|
2364 |
-
.
|
2365 |
-
|
2366 |
-
|
2367 |
-
|
2368 |
-
|
2369 |
-
|
2370 |
-
|
2371 |
-
|
2372 |
-
|
2373 |
-
|
2374 |
-
|
2375 |
-
|
2376 |
-
|
2377 |
-
|
2378 |
-
|
2379 |
-
|
2380 |
-
|
2381 |
-
|
2382 |
-
|
2383 |
-
|
2384 |
-
|
2385 |
-
|
2386 |
-
|
2387 |
-
|
2388 |
-
|
2389 |
-
|
2390 |
-
|
2391 |
-
|
2392 |
-
|
2393 |
-
|
2394 |
-
|
2395 |
-
|
2396 |
-
|
2397 |
-
|
2398 |
-
|
2399 |
-
|
2400 |
-
|
2401 |
-
|
2402 |
-
|
2403 |
-
|
2404 |
-
|
2405 |
-
|
2406 |
-
|
2407 |
-
|
2408 |
-
|
2409 |
-
|
2410 |
-
|
2411 |
-
|
2412 |
-
|
2413 |
-
|
2414 |
-
|
2415 |
-
|
2416 |
-
|
2417 |
-
|
2418 |
-
|
2419 |
-
|
2420 |
-
|
2421 |
-
|
2422 |
-
|
2423 |
-
|
2424 |
-
|
2425 |
-
|
2426 |
-
|
2427 |
-
|
2428 |
-
|
2429 |
-
|
2430 |
-
|
2431 |
-
|
2432 |
-
|
2433 |
-
|
2434 |
-
|
2435 |
-
|
2436 |
-
|
2437 |
-
|
2438 |
-
<
|
2439 |
-
|
2440 |
-
|
2441 |
-
</
|
2442 |
-
|
2443 |
-
<
|
2444 |
-
|
2445 |
-
|
2446 |
-
|
2447 |
-
|
2448 |
-
|
2449 |
-
|
2450 |
-
|
2451 |
-
|
2452 |
-
<
|
2453 |
-
|
2454 |
-
|
2455 |
-
</
|
2456 |
-
<
|
2457 |
-
|
2458 |
-
|
2459 |
-
</
|
2460 |
-
|
2461 |
-
|
2462 |
-
|
2463 |
-
|
2464 |
-
|
2465 |
-
|
2466 |
-
|
2467 |
-
|
2468 |
-
|
2469 |
-
|
2470 |
-
|
2471 |
-
|
2472 |
-
<
|
2473 |
-
|
2474 |
-
|
2475 |
-
</
|
2476 |
-
|
2477 |
-
|
2478 |
-
|
2479 |
-
|
2480 |
-
|
2481 |
-
|
2482 |
-
|
2483 |
-
|
2484 |
-
<
|
2485 |
-
|
2486 |
-
|
2487 |
-
|
2488 |
-
|
2489 |
-
|
2490 |
-
|
2491 |
-
|
2492 |
-
|
2493 |
-
|
2494 |
-
|
2495 |
-
|
2496 |
-
|
2497 |
-
|
2498 |
-
|
2499 |
-
|
2500 |
-
|
2501 |
-
|
2502 |
-
|
2503 |
-
|
2504 |
-
|
2505 |
-
|
2506 |
-
|
2507 |
-
|
2508 |
-
|
2509 |
-
|
2510 |
-
|
2511 |
-
<
|
2512 |
-
|
2513 |
-
|
2514 |
-
|
2515 |
-
<
|
2516 |
-
|
2517 |
-
|
2518 |
-
|
2519 |
-
<
|
2520 |
-
|
2521 |
-
|
2522 |
-
|
2523 |
-
|
2524 |
-
<
|
2525 |
-
|
2526 |
-
|
2527 |
-
|
2528 |
-
<label for="<?php echo self::$
|
2529 |
-
|
2530 |
-
|
2531 |
-
|
2532 |
-
|
2533 |
-
|
2534 |
-
|
2535 |
-
|
2536 |
-
|
2537 |
-
|
2538 |
-
|
2539 |
-
|
2540 |
-
|
2541 |
-
|
2542 |
-
|
2543 |
-
|
2544 |
-
</label>
|
2545 |
-
</p>
|
2546 |
-
|
2547 |
-
<input name="<?php echo self::$
|
2548 |
-
<label for="<?php echo self::$
|
2549 |
-
|
2550 |
-
|
2551 |
-
|
2552 |
-
|
2553 |
-
|
2554 |
-
|
2555 |
-
<
|
2556 |
-
|
2557 |
-
|
2558 |
-
|
2559 |
-
|
2560 |
-
|
2561 |
-
|
2562 |
-
|
2563 |
-
|
2564 |
-
|
2565 |
-
|
2566 |
-
|
2567 |
-
|
2568 |
-
|
2569 |
-
<
|
2570 |
-
|
2571 |
-
|
2572 |
-
|
2573 |
-
<label for="<?php echo self::$
|
2574 |
-
|
2575 |
-
|
2576 |
-
|
2577 |
-
<
|
2578 |
-
|
2579 |
-
|
2580 |
-
|
2581 |
-
|
2582 |
-
|
2583 |
-
|
2584 |
-
|
2585 |
-
|
2586 |
-
|
2587 |
-
|
2588 |
-
|
2589 |
-
|
2590 |
-
</label>
|
2591 |
-
</p>
|
2592 |
-
|
2593 |
-
|
2594 |
-
<
|
2595 |
-
|
2596 |
-
|
2597 |
-
|
2598 |
-
|
2599 |
-
|
2600 |
-
|
2601 |
-
|
2602 |
-
|
2603 |
-
|
2604 |
-
</
|
2605 |
-
|
2606 |
-
|
2607 |
-
<
|
2608 |
-
|
2609 |
-
|
2610 |
-
|
2611 |
-
|
2612 |
-
|
2613 |
-
|
2614 |
-
|
2615 |
-
|
2616 |
-
|
2617 |
-
|
2618 |
-
|
2619 |
-
|
2620 |
-
|
2621 |
-
|
2622 |
-
|
2623 |
-
|
2624 |
-
|
2625 |
-
|
2626 |
-
|
2627 |
-
<
|
2628 |
-
|
2629 |
-
|
2630 |
-
|
2631 |
-
|
2632 |
-
|
2633 |
-
|
2634 |
-
|
2635 |
-
|
2636 |
-
|
2637 |
-
|
2638 |
-
|
2639 |
-
|
2640 |
-
|
2641 |
-
|
2642 |
-
|
2643 |
-
|
2644 |
-
|
2645 |
-
|
2646 |
-
|
2647 |
-
|
2648 |
-
|
2649 |
-
|
2650 |
-
|
2651 |
-
|
2652 |
-
|
2653 |
-
|
2654 |
-
|
2655 |
-
|
2656 |
-
|
2657 |
-
|
2658 |
-
|
2659 |
-
|
2660 |
-
|
2661 |
-
|
2662 |
-
|
2663 |
-
|
2664 |
-
|
2665 |
-
|
2666 |
-
|
2667 |
-
<input name="<?php echo self::$
|
2668 |
-
|
2669 |
-
|
2670 |
-
|
2671 |
-
|
2672 |
-
|
2673 |
-
|
2674 |
-
|
2675 |
-
|
2676 |
-
|
2677 |
-
|
2678 |
-
|
2679 |
-
|
2680 |
-
|
2681 |
-
|
2682 |
-
|
2683 |
-
|
2684 |
-
|
2685 |
-
|
2686 |
-
|
2687 |
-
|
2688 |
-
|
2689 |
-
|
2690 |
-
|
2691 |
-
|
2692 |
-
|
2693 |
-
|
2694 |
-
|
2695 |
-
<
|
2696 |
-
<
|
2697 |
-
<
|
2698 |
-
|
2699 |
-
|
2700 |
-
|
2701 |
-
|
2702 |
-
|
2703 |
-
|
2704 |
-
|
2705 |
-
|
2706 |
-
|
2707 |
-
|
2708 |
-
|
2709 |
-
|
2710 |
-
|
2711 |
-
|
2712 |
-
|
2713 |
-
|
2714 |
-
|
2715 |
-
|
2716 |
-
|
2717 |
-
|
2718 |
-
|
2719 |
-
|
2720 |
-
|
2721 |
-
|
2722 |
-
|
2723 |
-
|
2724 |
-
|
2725 |
-
|
2726 |
-
|
2727 |
-
|
2728 |
-
|
2729 |
-
|
2730 |
-
|
2731 |
-
|
2732 |
-
|
2733 |
-
|
2734 |
-
|
2735 |
-
|
2736 |
-
|
2737 |
-
<
|
2738 |
-
|
2739 |
-
|
2740 |
-
|
2741 |
-
|
2742 |
-
|
2743 |
-
|
2744 |
-
|
2745 |
-
|
2746 |
-
|
2747 |
-
|
2748 |
-
|
2749 |
-
|
2750 |
-
|
2751 |
-
|
2752 |
-
|
2753 |
-
|
2754 |
-
|
2755 |
-
|
2756 |
-
|
2757 |
-
<
|
2758 |
-
|
2759 |
-
<input name="<?php echo self::$
|
2760 |
-
|
2761 |
-
|
2762 |
-
|
2763 |
-
|
2764 |
-
|
2765 |
-
|
2766 |
-
|
2767 |
-
|
2768 |
-
|
2769 |
-
|
2770 |
-
|
2771 |
-
|
2772 |
-
|
2773 |
-
|
2774 |
-
|
2775 |
-
|
2776 |
-
|
2777 |
-
|
2778 |
-
|
2779 |
-
|
2780 |
-
|
2781 |
-
|
2782 |
-
|
2783 |
-
|
2784 |
-
|
2785 |
-
|
2786 |
-
|
2787 |
-
|
2788 |
-
<
|
2789 |
-
|
2790 |
-
|
2791 |
-
|
2792 |
-
|
2793 |
-
|
2794 |
-
|
2795 |
-
|
2796 |
-
<label for="<?php echo self::$
|
2797 |
-
<b>(PRO)</b>
|
2798 |
-
|
2799 |
-
|
2800 |
-
</label>
|
2801 |
-
</p>
|
2802 |
-
|
2803 |
-
|
2804 |
-
|
2805 |
-
|
2806 |
-
|
2807 |
-
|
2808 |
-
|
2809 |
-
|
2810 |
-
|
2811 |
-
|
2812 |
-
|
2813 |
-
|
2814 |
-
<
|
2815 |
-
|
2816 |
-
|
2817 |
-
|
2818 |
-
</label>
|
2819 |
-
|
2820 |
-
|
2821 |
-
|
2822 |
-
|
2823 |
-
|
2824 |
-
|
2825 |
-
|
2826 |
-
|
2827 |
-
|
2828 |
-
|
2829 |
-
|
2830 |
-
|
2831 |
-
|
2832 |
-
|
2833 |
-
</
|
2834 |
-
</div>
|
2835 |
-
</p>
|
2836 |
-
<div class="hr"></div>
|
2837 |
-
|
2838 |
-
|
2839 |
-
|
2840 |
-
<
|
2841 |
-
|
2842 |
-
|
2843 |
-
|
2844 |
-
|
2845 |
-
|
2846 |
-
|
2847 |
-
|
2848 |
-
|
2849 |
-
|
2850 |
-
|
2851 |
-
|
2852 |
-
|
2853 |
-
|
2854 |
-
|
2855 |
-
|
2856 |
-
|
2857 |
-
|
2858 |
-
|
2859 |
-
|
2860 |
-
|
2861 |
-
|
2862 |
-
|
2863 |
-
|
2864 |
-
|
2865 |
-
|
2866 |
-
|
2867 |
-
|
2868 |
-
|
2869 |
-
|
2870 |
-
|
2871 |
-
|
2872 |
-
|
2873 |
-
|
2874 |
-
|
2875 |
-
|
2876 |
-
|
2877 |
-
|
2878 |
-
|
2879 |
-
|
2880 |
-
|
2881 |
-
|
2882 |
-
|
2883 |
-
|
2884 |
-
|
2885 |
-
|
2886 |
-
|
2887 |
-
|
2888 |
-
|
2889 |
-
|
2890 |
-
|
2891 |
-
|
2892 |
-
|
2893 |
-
|
2894 |
-
|
2895 |
-
|
2896 |
-
|
2897 |
-
|
2898 |
-
|
2899 |
-
|
2900 |
-
|
2901 |
-
|
2902 |
-
|
2903 |
-
|
2904 |
-
|
2905 |
-
|
2906 |
-
|
2907 |
-
|
2908 |
-
|
2909 |
-
|
2910 |
-
|
2911 |
-
|
2912 |
-
|
2913 |
-
|
2914 |
-
|
2915 |
-
|
2916 |
-
|
2917 |
-
|
2918 |
-
|
2919 |
-
|
2920 |
-
|
2921 |
-
|
2922 |
-
|
2923 |
-
|
2924 |
-
|
2925 |
-
|
2926 |
-
|
2927 |
-
|
2928 |
-
|
2929 |
-
|
2930 |
-
|
2931 |
-
|
2932 |
-
|
2933 |
-
|
2934 |
-
|
2935 |
-
|
2936 |
-
|
2937 |
-
|
2938 |
-
|
2939 |
-
|
2940 |
-
|
2941 |
-
|
2942 |
-
|
2943 |
-
|
2944 |
-
|
2945 |
-
|
2946 |
-
|
2947 |
-
|
2948 |
-
|
2949 |
-
|
2950 |
-
|
2951 |
-
|
2952 |
-
|
2953 |
-
|
2954 |
-
|
2955 |
-
|
2956 |
-
|
2957 |
-
|
2958 |
-
<
|
2959 |
-
|
2960 |
-
|
2961 |
-
|
2962 |
-
|
2963 |
-
|
2964 |
-
|
2965 |
-
|
2966 |
-
<
|
2967 |
-
|
2968 |
-
|
2969 |
-
|
2970 |
-
|
2971 |
-
|
2972 |
-
|
2973 |
-
|
2974 |
-
|
2975 |
-
|
2976 |
-
|
2977 |
-
|
2978 |
-
|
2979 |
-
|
2980 |
-
<
|
2981 |
-
|
2982 |
-
|
2983 |
-
|
2984 |
-
|
2985 |
-
|
2986 |
-
|
2987 |
-
|
2988 |
-
|
2989 |
-
|
2990 |
-
|
2991 |
-
|
2992 |
-
|
2993 |
-
|
2994 |
-
|
2995 |
-
|
2996 |
-
|
2997 |
-
|
2998 |
-
|
2999 |
-
|
3000 |
-
|
3001 |
-
|
3002 |
-
|
3003 |
-
|
3004 |
-
|
3005 |
-
|
3006 |
-
|
3007 |
-
|
3008 |
-
|
3009 |
-
|
3010 |
-
|
3011 |
-
|
3012 |
-
|
3013 |
-
|
3014 |
-
|
3015 |
-
|
3016 |
-
|
3017 |
-
|
3018 |
-
</
|
3019 |
-
<
|
3020 |
-
<
|
3021 |
-
<
|
3022 |
-
|
3023 |
-
|
3024 |
-
|
3025 |
-
|
3026 |
-
|
3027 |
-
|
3028 |
-
|
3029 |
-
|
3030 |
-
|
3031 |
-
|
3032 |
-
|
3033 |
-
|
3034 |
-
|
3035 |
-
|
3036 |
-
|
3037 |
-
|
3038 |
-
|
3039 |
-
|
3040 |
-
|
3041 |
-
|
3042 |
-
|
3043 |
-
|
3044 |
-
|
3045 |
-
|
3046 |
-
|
3047 |
-
|
3048 |
-
|
3049 |
-
|
3050 |
-
|
3051 |
-
|
3052 |
-
|
3053 |
-
|
3054 |
-
|
3055 |
-
|
3056 |
-
|
3057 |
-
|
3058 |
-
|
3059 |
-
|
3060 |
-
|
3061 |
-
|
3062 |
-
|
3063 |
-
|
3064 |
-
|
3065 |
-
|
3066 |
-
|
3067 |
-
|
3068 |
-
|
3069 |
-
|
3070 |
-
|
3071 |
-
|
3072 |
-
|
3073 |
-
|
3074 |
-
|
3075 |
-
|
3076 |
-
|
3077 |
-
|
3078 |
-
|
3079 |
-
|
3080 |
-
|
3081 |
-
|
3082 |
-
|
3083 |
-
|
3084 |
-
|
3085 |
-
|
3086 |
-
|
3087 |
-
|
3088 |
-
|
3089 |
-
|
3090 |
-
|
3091 |
-
|
3092 |
-
|
3093 |
-
|
3094 |
-
|
3095 |
-
|
3096 |
-
|
3097 |
-
|
3098 |
-
|
3099 |
-
|
3100 |
-
|
3101 |
-
|
3102 |
-
|
3103 |
-
|
3104 |
-
|
3105 |
-
|
3106 |
-
|
3107 |
-
|
3108 |
-
|
3109 |
-
|
3110 |
-
|
3111 |
-
|
3112 |
-
|
3113 |
-
|
3114 |
-
|
3115 |
-
|
3116 |
-
|
3117 |
-
|
3118 |
-
|
3119 |
-
|
3120 |
-
|
3121 |
-
|
3122 |
-
|
3123 |
-
|
3124 |
-
|
3125 |
-
|
3126 |
-
|
3127 |
-
|
3128 |
-
|
3129 |
-
|
3130 |
-
|
3131 |
-
|
3132 |
-
|
3133 |
-
|
3134 |
-
|
3135 |
-
|
3136 |
-
|
3137 |
-
|
3138 |
-
|
3139 |
-
|
3140 |
-
|
3141 |
-
|
3142 |
-
|
3143 |
-
|
3144 |
-
|
3145 |
-
|
3146 |
-
|
3147 |
-
|
3148 |
-
|
3149 |
-
|
3150 |
-
|
3151 |
-
|
3152 |
-
|
3153 |
-
|
3154 |
-
|
3155 |
-
|
3156 |
-
|
3157 |
-
|
3158 |
-
|
3159 |
-
|
3160 |
-
|
3161 |
-
|
3162 |
-
|
3163 |
-
|
3164 |
-
|
3165 |
-
|
3166 |
-
|
3167 |
-
|
3168 |
-
|
3169 |
-
|
3170 |
-
|
3171 |
-
|
3172 |
-
|
3173 |
-
|
3174 |
-
|
3175 |
-
|
3176 |
-
|
3177 |
-
|
3178 |
-
|
3179 |
-
|
3180 |
-
|
3181 |
-
|
3182 |
-
|
3183 |
-
|
3184 |
-
|
3185 |
-
|
3186 |
-
|
3187 |
-
|
3188 |
-
|
3189 |
-
|
3190 |
-
|
3191 |
-
|
3192 |
-
|
3193 |
-
|
3194 |
-
|
3195 |
-
|
3196 |
-
|
3197 |
-
|
3198 |
-
|
3199 |
-
|
3200 |
-
|
3201 |
-
|
3202 |
-
|
3203 |
-
|
3204 |
-
|
3205 |
-
|
3206 |
-
|
3207 |
-
|
3208 |
-
|
3209 |
-
|
3210 |
-
|
3211 |
-
|
3212 |
-
|
3213 |
-
|
3214 |
-
|
3215 |
-
|
3216 |
-
|
3217 |
-
|
3218 |
-
|
3219 |
-
|
3220 |
-
|
3221 |
-
|
3222 |
-
|
3223 |
-
|
3224 |
-
|
3225 |
-
{
|
3226 |
-
|
3227 |
-
|
3228 |
-
|
3229 |
-
|
3230 |
-
|
3231 |
-
|
3232 |
-
|
3233 |
-
|
3234 |
-
|
3235 |
-
|
3236 |
-
|
3237 |
-
|
3238 |
-
|
3239 |
-
|
3240 |
-
}
|
3241 |
-
}
|
3242 |
-
|
3243 |
-
|
3244 |
-
|
3245 |
-
|
3246 |
-
|
3247 |
-
|
3248 |
-
|
3249 |
-
|
3250 |
-
}
|
3251 |
-
|
3252 |
-
|
3253 |
-
|
3254 |
-
|
3255 |
-
|
3256 |
-
|
3257 |
-
|
3258 |
-
|
3259 |
-
|
3260 |
-
|
3261 |
-
|
3262 |
-
|
3263 |
-
|
3264 |
-
|
3265 |
-
|
3266 |
-
|
3267 |
-
|
3268 |
-
|
3269 |
-
|
3270 |
-
|
3271 |
-
|
3272 |
-
|
3273 |
-
|
3274 |
-
|
3275 |
-
|
3276 |
-
|
3277 |
-
|
3278 |
-
|
3279 |
-
|
3280 |
-
|
3281 |
-
|
3282 |
-
|
3283 |
-
|
3284 |
-
|
3285 |
-
|
3286 |
-
|
3287 |
-
|
3288 |
-
|
3289 |
-
|
3290 |
-
|
3291 |
-
|
3292 |
-
|
3293 |
-
{
|
3294 |
-
|
3295 |
-
|
3296 |
-
|
3297 |
-
}
|
3298 |
-
|
3299 |
-
|
3300 |
-
|
3301 |
-
|
3302 |
-
|
3303 |
-
|
3304 |
-
|
3305 |
-
|
3306 |
-
|
3307 |
-
|
3308 |
-
|
3309 |
-
|
3310 |
-
|
3311 |
-
|
3312 |
-
|
3313 |
-
|
3314 |
-
|
3315 |
-
|
3316 |
-
|
3317 |
-
|
3318 |
-
|
3319 |
-
|
3320 |
-
|
3321 |
-
|
3322 |
-
|
3323 |
-
|
3324 |
-
|
3325 |
-
|
3326 |
-
jQuery.
|
3327 |
-
|
3328 |
-
|
3329 |
-
|
3330 |
-
|
3331 |
-
|
3332 |
-
|
3333 |
-
|
3334 |
-
|
3335 |
-
|
3336 |
-
|
3337 |
-
|
3338 |
-
|
3339 |
-
|
3340 |
-
|
3341 |
-
|
3342 |
-
|
3343 |
-
|
3344 |
-
|
3345 |
-
|
3346 |
-
|
3347 |
-
|
3348 |
-
|
3349 |
-
|
3350 |
-
|
3351 |
-
|
3352 |
-
|
3353 |
-
|
3354 |
-
|
3355 |
-
|
3356 |
-
|
3357 |
-
|
3358 |
-
|
3359 |
-
|
3360 |
-
|
3361 |
-
|
3362 |
-
|
3363 |
-
|
3364 |
-
|
3365 |
-
jQuery(this).
|
3366 |
-
|
3367 |
-
|
3368 |
-
|
3369 |
-
|
3370 |
-
|
3371 |
-
|
3372 |
-
|
3373 |
-
|
3374 |
-
|
3375 |
-
|
3376 |
-
|
3377 |
-
|
3378 |
-
|
3379 |
-
|
3380 |
-
|
3381 |
-
|
3382 |
-
|
3383 |
-
|
3384 |
-
|
3385 |
-
|
3386 |
-
|
3387 |
-
|
3388 |
-
|
3389 |
-
|
3390 |
-
|
3391 |
-
|
3392 |
-
|
3393 |
-
|
3394 |
-
|
3395 |
-
|
3396 |
-
|
3397 |
-
|
3398 |
-
|
3399 |
-
|
3400 |
-
|
3401 |
-
|
3402 |
-
|
3403 |
-
|
3404 |
-
|
3405 |
-
|
3406 |
-
|
3407 |
-
|
3408 |
-
|
3409 |
-
|
3410 |
-
|
3411 |
-
|
3412 |
-
|
3413 |
-
|
3414 |
-
|
3415 |
-
|
3416 |
-
|
3417 |
-
|
3418 |
-
|
3419 |
-
|
3420 |
-
|
3421 |
-
|
3422 |
-
|
3423 |
-
|
3424 |
-
|
3425 |
-
|
3426 |
-
|
3427 |
-
|
3428 |
-
|
3429 |
-
|
3430 |
-
|
3431 |
-
|
3432 |
-
|
3433 |
-
|
3434 |
-
|
3435 |
-
|
3436 |
-
|
3437 |
-
|
3438 |
-
|
3439 |
-
|
3440 |
-
|
3441 |
-
|
3442 |
-
|
3443 |
-
|
3444 |
-
|
3445 |
-
|
3446 |
-
|
3447 |
-
|
3448 |
-
|
3449 |
-
|
3450 |
-
|
3451 |
-
|
3452 |
-
|
3453 |
-
|
3454 |
-
|
3455 |
-
|
3456 |
-
|
3457 |
-
|
3458 |
-
|
3459 |
-
|
3460 |
-
|
3461 |
-
|
3462 |
-
|
3463 |
-
|
3464 |
-
|
3465 |
-
|
3466 |
-
|
3467 |
-
|
3468 |
-
|
3469 |
-
|
3470 |
-
|
3471 |
-
|
3472 |
-
|
3473 |
-
|
3474 |
-
|
3475 |
-
|
3476 |
-
|
3477 |
-
|
3478 |
-
|
3479 |
-
|
3480 |
-
|
3481 |
-
|
3482 |
-
|
3483 |
-
|
3484 |
-
|
3485 |
-
|
3486 |
-
|
3487 |
-
|
3488 |
-
|
3489 |
-
|
3490 |
-
|
3491 |
-
|
3492 |
-
|
3493 |
-
|
3494 |
-
|
3495 |
-
|
3496 |
-
|
3497 |
-
|
3498 |
-
|
3499 |
-
|
3500 |
-
|
3501 |
-
|
3502 |
-
|
3503 |
-
|
3504 |
-
|
3505 |
-
|
3506 |
-
|
3507 |
-
|
3508 |
-
|
3509 |
-
|
3510 |
-
|
3511 |
-
|
3512 |
-
|
3513 |
-
|
3514 |
-
|
3515 |
-
|
3516 |
-
|
3517 |
-
|
3518 |
-
|
3519 |
-
|
3520 |
-
|
3521 |
-
|
3522 |
-
|
3523 |
-
|
3524 |
-
|
3525 |
-
|
3526 |
-
|
3527 |
-
|
3528 |
-
|
3529 |
-
|
3530 |
-
|
3531 |
-
|
3532 |
-
|
3533 |
-
|
3534 |
-
|
3535 |
-
|
3536 |
-
|
3537 |
-
|
3538 |
-
|
3539 |
-
|
3540 |
-
|
3541 |
-
|
3542 |
-
|
3543 |
-
|
3544 |
-
|
3545 |
-
|
3546 |
-
|
3547 |
-
|
3548 |
-
|
3549 |
-
|
3550 |
-
|
3551 |
-
|
3552 |
-
function
|
3553 |
-
{
|
3554 |
-
|
3555 |
-
|
3556 |
-
|
3557 |
-
|
3558 |
-
|
3559 |
-
|
3560 |
-
|
3561 |
-
|
3562 |
-
|
3563 |
-
|
3564 |
-
|
3565 |
-
|
3566 |
-
|
3567 |
-
|
3568 |
-
|
3569 |
-
|
3570 |
-
|
3571 |
-
|
3572 |
-
|
3573 |
-
|
3574 |
-
|
3575 |
-
|
3576 |
-
|
3577 |
-
|
3578 |
-
|
3579 |
-
|
3580 |
-
|
3581 |
-
|
3582 |
-
|
3583 |
-
|
3584 |
-
|
3585 |
-
|
3586 |
-
|
3587 |
-
|
3588 |
-
|
3589 |
-
|
3590 |
-
|
3591 |
-
|
3592 |
-
|
3593 |
-
|
3594 |
-
|
3595 |
-
|
3596 |
-
|
3597 |
-
|
3598 |
-
|
3599 |
-
|
3600 |
-
|
3601 |
-
|
3602 |
-
|
3603 |
-
|
3604 |
-
|
3605 |
-
|
3606 |
-
|
3607 |
-
|
3608 |
-
|
3609 |
-
|
3610 |
-
|
3611 |
-
|
3612 |
-
|
3613 |
-
|
3614 |
-
|
3615 |
-
|
3616 |
-
|
3617 |
-
|
3618 |
-
}
|
3619 |
-
|
3620 |
-
|
3621 |
-
|
3622 |
-
|
3623 |
-
|
3624 |
-
|
3625 |
-
|
3626 |
-
|
3627 |
-
|
3628 |
-
|
3629 |
-
|
3630 |
-
|
3631 |
-
|
3632 |
-
|
3633 |
-
|
3634 |
-
|
3635 |
-
|
3636 |
-
|
3637 |
-
|
3638 |
-
|
3639 |
-
|
3640 |
-
|
3641 |
-
|
3642 |
-
|
3643 |
-
|
3644 |
-
|
3645 |
-
|
3646 |
-
|
3647 |
-
|
3648 |
-
|
3649 |
-
|
3650 |
-
|
3651 |
-
|
3652 |
-
|
3653 |
-
|
3654 |
-
|
3655 |
-
|
3656 |
-
|
3657 |
-
|
3658 |
-
|
3659 |
-
|
3660 |
-
|
3661 |
-
|
3662 |
-
|
3663 |
-
|
3664 |
-
|
3665 |
-
|
3666 |
-
|
3667 |
-
|
3668 |
-
|
3669 |
-
|
3670 |
-
|
3671 |
-
|
3672 |
-
|
3673 |
-
|
3674 |
-
|
3675 |
-
|
3676 |
-
|
3677 |
-
|
3678 |
-
|
3679 |
-
|
3680 |
-
|
3681 |
-
|
3682 |
-
|
3683 |
-
|
3684 |
-
|
3685 |
-
|
3686 |
-
|
3687 |
-
|
3688 |
-
|
3689 |
-
|
3690 |
-
|
3691 |
-
|
3692 |
-
|
3693 |
-
|
3694 |
-
|
3695 |
-
|
3696 |
-
|
3697 |
-
|
3698 |
-
|
3699 |
-
|
3700 |
-
|
3701 |
-
|
3702 |
-
|
3703 |
-
|
3704 |
-
|
3705 |
-
|
3706 |
-
|
3707 |
-
|
3708 |
-
|
3709 |
-
|
3710 |
-
|
3711 |
-
|
3712 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3713 |
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: YouTube
|
4 |
+
Plugin URI: http://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx
|
5 |
+
Description: YouTube embed plugin. Embed a responsive YouTube video, playlist gallery, or channel gallery. Add video thumbnails, analytics, SEO, caching...
|
6 |
+
Version: 10.8
|
7 |
+
Author: EmbedPlus Team
|
8 |
+
Author URI: http://www.embedplus.com
|
9 |
+
*/
|
10 |
+
|
11 |
+
/*
|
12 |
+
YouTube
|
13 |
+
Copyright (C) 2015 EmbedPlus.com
|
14 |
+
|
15 |
+
This program is free software: you can redistribute it and/or modify
|
16 |
+
it under the terms of the GNU General Public License as published by
|
17 |
+
the Free Software Foundation, either version 3 of the License, or
|
18 |
+
(at your option) any later version.
|
19 |
+
|
20 |
+
This program is distributed in the hope that it will be useful,
|
21 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
22 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
23 |
+
GNU General Public License for more details.
|
24 |
+
|
25 |
+
You should have received a copy of the GNU General Public License
|
26 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
27 |
+
|
28 |
+
*/
|
29 |
+
|
30 |
+
//define('WP_DEBUG', true);
|
31 |
+
|
32 |
+
class YouTubePrefs
|
33 |
+
{
|
34 |
+
|
35 |
+
public static $version = '10.8';
|
36 |
+
public static $opt_version = 'version';
|
37 |
+
public static $optembedwidth = null;
|
38 |
+
public static $optembedheight = null;
|
39 |
+
public static $defaultheight = null;
|
40 |
+
public static $defaultwidth = null;
|
41 |
+
public static $oembeddata = null;
|
42 |
+
public static $opt_center = 'centervid';
|
43 |
+
public static $opt_glance = 'glance';
|
44 |
+
public static $opt_autoplay = 'autoplay';
|
45 |
+
public static $opt_debugmode = 'debugmode';
|
46 |
+
public static $opt_old_script_method = 'old_script_method';
|
47 |
+
public static $opt_cc_load_policy = 'cc_load_policy';
|
48 |
+
public static $opt_iv_load_policy = 'iv_load_policy';
|
49 |
+
public static $opt_loop = 'loop';
|
50 |
+
public static $opt_modestbranding = 'modestbranding';
|
51 |
+
public static $opt_rel = 'rel';
|
52 |
+
public static $opt_showinfo = 'showinfo';
|
53 |
+
public static $opt_playsinline = 'playsinline';
|
54 |
+
public static $opt_autohide = 'autohide';
|
55 |
+
public static $opt_controls = 'controls';
|
56 |
+
public static $opt_theme = 'theme';
|
57 |
+
public static $opt_color = 'color';
|
58 |
+
public static $opt_listType = 'listType';
|
59 |
+
public static $opt_wmode = 'wmode';
|
60 |
+
public static $opt_vq = 'vq';
|
61 |
+
public static $opt_html5 = 'html5';
|
62 |
+
public static $opt_dohl = 'dohl';
|
63 |
+
public static $opt_hl = 'hl';
|
64 |
+
public static $opt_ssl = 'ssl';
|
65 |
+
public static $opt_ogvideo = 'ogvideo';
|
66 |
+
public static $opt_nocookie = 'nocookie';
|
67 |
+
public static $opt_playlistorder = 'playlistorder';
|
68 |
+
public static $opt_acctitle = 'acctitle';
|
69 |
+
public static $opt_pro = 'pro';
|
70 |
+
public static $opt_oldspacing = 'oldspacing';
|
71 |
+
public static $opt_responsive = 'responsive';
|
72 |
+
public static $opt_origin = 'origin';
|
73 |
+
public static $opt_widgetfit = 'widgetfit';
|
74 |
+
public static $opt_defaultdims = 'defaultdims';
|
75 |
+
public static $opt_defaultwidth = 'width';
|
76 |
+
public static $opt_defaultheight = 'height';
|
77 |
+
public static $opt_defaultvol = 'defaultvol';
|
78 |
+
public static $opt_vol = 'vol';
|
79 |
+
public static $opt_apikey = 'apikey';
|
80 |
+
public static $opt_schemaorg = 'schemaorg';
|
81 |
+
public static $opt_ftpostimg = 'ftpostimg';
|
82 |
+
public static $opt_spdc = 'spdc';
|
83 |
+
public static $opt_spdcexp = 'spdcexp';
|
84 |
+
public static $opt_migrate = 'migrate';
|
85 |
+
public static $opt_migrate_youtube = 'migrate_youtube';
|
86 |
+
public static $spdcprefix = 'ytpref';
|
87 |
+
public static $spdcall = 'youtubeprefs_spdcall';
|
88 |
+
public static $opt_dynload = 'dynload';
|
89 |
+
public static $opt_dyntype = 'dyntype';
|
90 |
+
public static $opt_gallery_pagesize = 'gallery_pagesize';
|
91 |
+
public static $opt_gallery_apikey = 'gallery_apikey';
|
92 |
+
public static $opt_gallery_columns = 'gallery_columns';
|
93 |
+
public static $opt_gallery_style = 'gallery_style';
|
94 |
+
public static $opt_gallery_scrolloffset = 'gallery_scrolloffset';
|
95 |
+
public static $opt_gallery_showtitle = 'gallery_showtitle';
|
96 |
+
public static $opt_gallery_customarrows = 'gallery_customarrows';
|
97 |
+
public static $opt_gallery_customprev = 'gallery_customprev';
|
98 |
+
public static $opt_gallery_customnext = 'gallery_customnext';
|
99 |
+
public static $opt_gallery_showdsc = 'gallery_showdsc';
|
100 |
+
public static $opt_admin_off_scripts = 'admin_off_scripts';
|
101 |
+
public static $opt_alloptions = 'youtubeprefs_alloptions';
|
102 |
+
public static $alloptions = null;
|
103 |
+
public static $yt_options = array();
|
104 |
+
//public static $epbase = 'http://localhost:2346';
|
105 |
+
public static $epbase = '//www.embedplus.com';
|
106 |
+
public static $double_plugin = false;
|
107 |
+
public static $scriptsprinted = 0;
|
108 |
+
public static $badentities = array('×', '×', '–', '–', '&', '&', '&');
|
109 |
+
public static $goodliterals = array('x', 'x', '--', '--', '&', '&', '&');
|
110 |
+
///////////////////////////////////////////////////////////////////////////////////////////////////
|
111 |
+
///////////////////////////////////////////////////////////////////////////////////////////////////
|
112 |
+
///////////////////////////////////////////////////////////////////////////////////////////////////
|
113 |
+
///////////////////////////////////////////////////////////////////////////////////////////////////
|
114 |
+
///////////////////////////////////////////////////////////////////////////////////////////////////
|
115 |
+
//public static $ytregex = '@^[\r\n]{0,1}[[:blank:]]*https?://(?:www\.)?(?:(?:youtube.com/watch\?)|(?:youtu.be/))([^\s"]+)[[:blank:]]*[\r\n]{0,1}$@im';
|
116 |
+
public static $oldytregex = '@^\s*https?://(?:www\.)?(?:(?:youtube.com/(?:(?:watch)|(?:embed))/{0,1}\?)|(?:youtu.be/))([^\s"]+)\s*$@im';
|
117 |
+
public static $ytregex = '@^[\r\t ]*https?://(?:www\.)?(?:(?:youtube.com/(?:(?:watch)|(?:embed))/{0,1}\?)|(?:youtu.be/))([^\s"]+)[\r\t ]*$@im';
|
118 |
+
public static $justurlregex = '@https?://(?:www\.)?(?:(?:youtube.com/(?:(?:watch)|(?:embed))/{0,1}\?)|(?:youtu.be/))([^\[\s"]+)@i';
|
119 |
+
|
120 |
+
///////////////////////////////////////////////////////////////////////////////////////////////////
|
121 |
+
///////////////////////////////////////////////////////////////////////////////////////////////////
|
122 |
+
///////////////////////////////////////////////////////////////////////////////////////////////////
|
123 |
+
///////////////////////////////////////////////////////////////////////////////////////////////////
|
124 |
+
///////////////////////////////////////////////////////////////////////////////////////////////////
|
125 |
+
///////////////////////////////////////////////////////////////////////////////////////////////////
|
126 |
+
|
127 |
+
public function __construct()
|
128 |
+
{
|
129 |
+
add_action('admin_init', array("YouTubePrefs", 'check_double_plugin_warning'));
|
130 |
+
|
131 |
+
self::$alloptions = get_option(self::$opt_alloptions);
|
132 |
+
if (self::$alloptions == false || version_compare(self::$alloptions[self::$opt_version], self::$version, '<'))
|
133 |
+
{
|
134 |
+
self::initoptions();
|
135 |
+
}
|
136 |
+
|
137 |
+
if (self::$alloptions[self::$opt_oldspacing] == 1)
|
138 |
+
{
|
139 |
+
self::$ytregex = self::$oldytregex;
|
140 |
+
}
|
141 |
+
|
142 |
+
self::$optembedwidth = intval(get_option('embed_size_w'));
|
143 |
+
self::$optembedheight = intval(get_option('embed_size_h'));
|
144 |
+
|
145 |
+
self::$yt_options = array(
|
146 |
+
self::$opt_autoplay,
|
147 |
+
self::$opt_cc_load_policy,
|
148 |
+
self::$opt_iv_load_policy,
|
149 |
+
self::$opt_loop,
|
150 |
+
self::$opt_modestbranding,
|
151 |
+
self::$opt_rel,
|
152 |
+
self::$opt_showinfo,
|
153 |
+
self::$opt_playsinline,
|
154 |
+
self::$opt_autohide,
|
155 |
+
self::$opt_controls,
|
156 |
+
self::$opt_html5,
|
157 |
+
self::$opt_hl,
|
158 |
+
self::$opt_theme,
|
159 |
+
self::$opt_color,
|
160 |
+
self::$opt_listType,
|
161 |
+
self::$opt_wmode,
|
162 |
+
self::$opt_vq,
|
163 |
+
'index',
|
164 |
+
'list',
|
165 |
+
'start',
|
166 |
+
'end'
|
167 |
+
);
|
168 |
+
|
169 |
+
add_action('media_buttons', 'YouTubePrefs::media_button_wizard', 11);
|
170 |
+
|
171 |
+
|
172 |
+
self::do_ytprefs();
|
173 |
+
add_action('admin_menu', 'YouTubePrefs::ytprefs_plugin_menu');
|
174 |
+
if (!is_admin())
|
175 |
+
{
|
176 |
+
|
177 |
+
|
178 |
+
if (self::$alloptions[self::$opt_old_script_method] == 1)
|
179 |
+
{
|
180 |
+
add_action('wp_print_scripts', array('YouTubePrefs', 'jsvars'));
|
181 |
+
add_action('wp_enqueue_scripts', array('YouTubePrefs', 'jsvars'));
|
182 |
+
}
|
183 |
+
|
184 |
+
add_action('wp_enqueue_scripts', array('YouTubePrefs', 'ytprefsscript'), 100);
|
185 |
+
add_action('wp_enqueue_scripts', array('YouTubePrefs', 'fitvids'));
|
186 |
+
|
187 |
+
|
188 |
+
|
189 |
+
if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0 && self::$alloptions[self::$opt_ogvideo] == 1)
|
190 |
+
{
|
191 |
+
add_action('wp_head', array('YouTubePrefs', 'do_ogvideo'));
|
192 |
+
}
|
193 |
+
}
|
194 |
+
}
|
195 |
+
|
196 |
+
public static function show_glance_list()
|
197 |
+
{
|
198 |
+
$glancehref = self::show_glance();
|
199 |
+
$cnt = self::get_glance_count();
|
200 |
+
|
201 |
+
//display via list
|
202 |
+
return
|
203 |
+
'<li class="page-count">
|
204 |
+
<a href="' . $glancehref . '" class="thickbox ytprefs_glance_button" id="ytprefs_glance_button" title="YouTube Embeds At a Glance">
|
205 |
+
' . number_format_i18n($cnt) . ' With YouTube
|
206 |
+
</a>
|
207 |
+
</li>';
|
208 |
+
}
|
209 |
+
|
210 |
+
public static function show_glance_table()
|
211 |
+
{
|
212 |
+
$glancehref = self::show_glance();
|
213 |
+
$cnt = self::get_glance_count();
|
214 |
+
return
|
215 |
+
'<tr>
|
216 |
+
<td class="first b"><a title="YouTube Embeds At a Glance" href="' . $glancehref . '" class="thickbox ytprefs_glance_button">' . number_format_i18n($cnt) . '</a></td>
|
217 |
+
<td class="t"><a title="YouTube Embeds At a Glance" href="' . $glancehref . '" id="ytprefs_glance_button" class="thickbox ytprefs_glance_button">With YouTube</a></td>
|
218 |
+
</tr>';
|
219 |
+
}
|
220 |
+
|
221 |
+
public static function get_glance_count()
|
222 |
+
{
|
223 |
+
global $wpdb;
|
224 |
+
$query_sql = "
|
225 |
+
SELECT count(*) as mytotal
|
226 |
+
FROM $wpdb->posts
|
227 |
+
WHERE (post_content LIKE '%youtube.com/%' OR post_content LIKE '%youtu.be/%')
|
228 |
+
AND post_status = 'publish'";
|
229 |
+
|
230 |
+
$query_result = $wpdb->get_results($query_sql, OBJECT);
|
231 |
+
|
232 |
+
return intval($query_result[0]->mytotal);
|
233 |
+
}
|
234 |
+
|
235 |
+
public static function show_glance()
|
236 |
+
{
|
237 |
+
$glancehref = admin_url('admin.php?page=youtube-ep-glance') . '&random=' . rand(1, 1000) . '&TB_iframe=true&width=780&height=800';
|
238 |
+
return $glancehref;
|
239 |
+
}
|
240 |
+
|
241 |
+
public static function glance_page()
|
242 |
+
{
|
243 |
+
?>
|
244 |
+
<div class="wrap">
|
245 |
+
<style type="text/css">
|
246 |
+
#wphead {display:none;}
|
247 |
+
#wpbody{margin-left: 0px;}
|
248 |
+
.wrap {font-family: Arial; padding: 0px 10px 0px 10px; line-height: 180%;}
|
249 |
+
.bold {font-weight: bold;}
|
250 |
+
.orange {color: #f85d00;}
|
251 |
+
#adminmenuback {display: none;}
|
252 |
+
#adminmenu, adminmenuwrap {display: none;}
|
253 |
+
#wpcontent, .auto-fold #wpcontent {margin-left: 0px;}
|
254 |
+
#wpadminbar {display:none;}
|
255 |
+
html.wp-toolbar {padding: 0px;}
|
256 |
+
#footer, #wpfooter, .auto-fold #wpfooter {display: none;}
|
257 |
+
.acctitle {background-color: #dddddd; border-radius: 5px; padding: 7px 15px 7px 15px; cursor: pointer; margin: 10px; font-weight: bold; font-size: 12px;}
|
258 |
+
.acctitle:hover {background-color: #cccccc;}
|
259 |
+
.accbox {display: none; position: relative; margin: 5px 8px 30px 15px; clear: both; line-height: 180%;}
|
260 |
+
.accclose {position: absolute; top: -38px; right: 5px; cursor: pointer; width: 24px; height: 24px;}
|
261 |
+
.accloader {padding-right: 20px;}
|
262 |
+
.accthumb {display: block; width: 300px; float: left; margin-right: 25px;}
|
263 |
+
.accinfo {width: 300px; float: left;}
|
264 |
+
.accvidtitle {font-weight: bold; font-size: 16px;}
|
265 |
+
.accthumb img {width: 300px; height: auto; display: block;}
|
266 |
+
.clearboth {clear: both;}
|
267 |
+
.pad20 {padding: 20px;}
|
268 |
+
.center {text-align: center;}
|
269 |
+
</style>
|
270 |
+
<script type="text/javascript">
|
271 |
+
function accclose(ele)
|
272 |
+
{
|
273 |
+
jQuery(ele).parent('.accbox').hide(400);
|
274 |
+
}
|
275 |
+
|
276 |
+
(function ($j)
|
277 |
+
{
|
278 |
+
$j(document).ready(function () {
|
279 |
+
|
280 |
+
|
281 |
+
$j('.acctitle').click(function () {
|
282 |
+
var $acctitle = $j(this);
|
283 |
+
var $accbox = $j(this).parent().children('.accbox');
|
284 |
+
var pid = $accbox.attr("data-postid");
|
285 |
+
|
286 |
+
$acctitle.prepend('<img class="accloader" src="<?php echo plugins_url('images/ajax-loader.gif', __FILE__) ?>" />');
|
287 |
+
jQuery.ajax({
|
288 |
+
type: "post",
|
289 |
+
dataType: "json",
|
290 |
+
timeout: 30000,
|
291 |
+
url: wpajaxurl,
|
292 |
+
data: {action: 'my_embedplus_glance_vids', postid: pid},
|
293 |
+
success: function (response) {
|
294 |
+
if (response.type == "success") {
|
295 |
+
$accbox.html(response.data),
|
296 |
+
$accbox.show(400);
|
297 |
+
}
|
298 |
+
else {
|
299 |
+
}
|
300 |
+
},
|
301 |
+
error: function (xhr, ajaxOptions, thrownError) {
|
302 |
+
|
303 |
+
},
|
304 |
+
complete: function () {
|
305 |
+
$acctitle.children('.accloader').remove();
|
306 |
+
}
|
307 |
+
|
308 |
+
});
|
309 |
+
|
310 |
+
|
311 |
+
});
|
312 |
+
});
|
313 |
+
})(jQuery);
|
314 |
+
|
315 |
+
|
316 |
+
</script>
|
317 |
+
<?php
|
318 |
+
global $wpdb;
|
319 |
+
$query_sql = "
|
320 |
+
SELECT SQL_CALC_FOUND_ROWS *
|
321 |
+
FROM $wpdb->posts
|
322 |
+
WHERE (post_content LIKE '%youtube.com/%' OR post_content LIKE '%youtu.be/%')
|
323 |
+
AND post_status = 'publish'
|
324 |
+
order by post_date DESC LIMIT 0, 10";
|
325 |
+
|
326 |
+
$query_result = $wpdb->get_results($query_sql, OBJECT);
|
327 |
+
|
328 |
+
if ($query_result !== null)
|
329 |
+
{
|
330 |
+
$total = $wpdb->get_var("SELECT FOUND_ROWS();");
|
331 |
+
global $post;
|
332 |
+
echo '<h2><img src="' . plugins_url('images/youtubeicon16.png', __FILE__) . '" /> 10 Latest Posts/Pages with YouTube Videos (' . $total . ' Total)</h2>';
|
333 |
+
?>
|
334 |
+
|
335 |
+
We recommend using this page as an easy way to check the results of the global default settings you make (e.g. hide annotations) on your recent embeds. Or, simply use it as an index to jump right to your posts that contain YouTube embeds.
|
336 |
+
|
337 |
+
<?php
|
338 |
+
if ($total > 0)
|
339 |
+
{
|
340 |
+
echo '<ul class="accord">';
|
341 |
+
foreach ($query_result as $post)
|
342 |
+
{
|
343 |
+
echo '<li>';
|
344 |
+
setup_postdata($post);
|
345 |
+
the_title('<div class="acctitle">', ' »</div>');
|
346 |
+
echo '<div class="accbox" data-postid="' . $post->ID . '"></div><div class="clearboth"></div></li>';
|
347 |
+
}
|
348 |
+
echo '</ul>';
|
349 |
+
}
|
350 |
+
else
|
351 |
+
{
|
352 |
+
echo '<p class="center bold orange">You currently do not have any YouTube embeds yet.</p>';
|
353 |
+
}
|
354 |
+
}
|
355 |
+
|
356 |
+
wp_reset_postdata();
|
357 |
+
?>
|
358 |
+
To remove this feature from your dashboard, simply uncheck <i>Show "At a Glance" Embed Links</i> in the <a target="_blank" href="<?php echo admin_url('admin.php?page=youtube-my-preferences#jumpdefaults') ?>">plugin settings page »</a>.
|
359 |
+
|
360 |
+
</div>
|
361 |
+
<?php
|
362 |
+
}
|
363 |
+
|
364 |
+
public static function my_embedplus_glance_vids()
|
365 |
+
{
|
366 |
+
$result = array();
|
367 |
+
if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')
|
368 |
+
{
|
369 |
+
$postid = intval($_REQUEST['postid']);
|
370 |
+
$currpost = get_post($postid);
|
371 |
+
|
372 |
+
$thehtml = '<img class="accclose" onclick="accclose(this)" src="' . plugins_url('images/accclose.png', __FILE__) . '" />';
|
373 |
+
|
374 |
+
$matches = Array();
|
375 |
+
$ismatch = preg_match_all(self::$justurlregex, $currpost->post_content, $matches);
|
376 |
+
|
377 |
+
if ($ismatch)
|
378 |
+
{
|
379 |
+
foreach ($matches[0] as $match)
|
380 |
+
{
|
381 |
+
$link = trim(preg_replace('/&/i', '&', $match));
|
382 |
+
$link = preg_replace('/\s/', '', $link);
|
383 |
+
$link = trim(str_replace(self::$badentities, self::$goodliterals, $link));
|
384 |
+
|
385 |
+
$linkparamstemp = explode('?', $link);
|
386 |
+
|
387 |
+
$linkparams = array();
|
388 |
+
if (count($linkparamstemp) > 1)
|
389 |
+
{
|
390 |
+
$linkparams = self::keyvalue($linkparamstemp[1], true);
|
391 |
+
}
|
392 |
+
if (strpos($linkparamstemp[0], 'youtu.be') !== false && !isset($linkparams['v']))
|
393 |
+
{
|
394 |
+
$vtemp = explode('/', $linkparamstemp[0]);
|
395 |
+
$linkparams['v'] = array_pop($vtemp);
|
396 |
+
}
|
397 |
+
|
398 |
+
$vidid = $linkparams['v'];
|
399 |
+
|
400 |
+
if ($vidid != null)
|
401 |
+
{
|
402 |
+
try
|
403 |
+
{
|
404 |
+
$odata = self::get_oembed('http://youtube.com/watch?v=' . $vidid, 1920, 1280);
|
405 |
+
$postlink = get_permalink($postid);
|
406 |
+
if ($odata != null && !is_wp_error($odata))
|
407 |
+
{
|
408 |
+
$_name = esc_attr(sanitize_text_field($odata->title));
|
409 |
+
$_description = esc_attr(sanitize_text_field($odata->author_name));
|
410 |
+
$_thumbnailUrl = esc_url("//i.ytimg.com/vi/" . $vidid . "/0.jpg");
|
411 |
+
|
412 |
+
$thehtml .= '<a target="_blank" href="' . $postlink . '" class="accthumb"><img src="' . $_thumbnailUrl . '" /></a>';
|
413 |
+
$thehtml .= '<div class="accinfo">';
|
414 |
+
$thehtml .= '<a target="_blank" href="' . $postlink . '" class="accvidtitle">' . $_name . '</a>';
|
415 |
+
$thehtml .= '<div class="accdesc">' . (strlen($_description) > 400 ? substr($_description, 0, 400) . "..." : $_description) . '</div>';
|
416 |
+
$thehtml .= '</div>';
|
417 |
+
$thehtml .= '<div class="clearboth pad20"></div>';
|
418 |
+
}
|
419 |
+
else
|
420 |
+
{
|
421 |
+
$thehtml .= '<p class="center bold orange">This <a target="_blank" href="' . $postlink . '">post/page</a> contains a video that has been removed from YouTube.';
|
422 |
+
|
423 |
+
if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
|
424 |
+
{
|
425 |
+
$thehtml .='<br><a target="_blank" href="https://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx">Activate delete video tracking to catch these cases »</a>';
|
426 |
+
}
|
427 |
+
$thehtml .= '</strong>';
|
428 |
+
}
|
429 |
+
}
|
430 |
+
catch (Exception $ex)
|
431 |
+
{
|
432 |
+
|
433 |
+
}
|
434 |
+
}
|
435 |
+
else if (false)
|
436 |
+
{ // if playlist
|
437 |
+
}
|
438 |
+
}
|
439 |
+
}
|
440 |
+
|
441 |
+
|
442 |
+
|
443 |
+
if ($currpost != null)
|
444 |
+
{
|
445 |
+
$result['type'] = 'success';
|
446 |
+
$result['data'] = $thehtml;
|
447 |
+
}
|
448 |
+
else
|
449 |
+
{
|
450 |
+
$result['type'] = 'error';
|
451 |
+
}
|
452 |
+
echo json_encode($result);
|
453 |
+
}
|
454 |
+
else
|
455 |
+
{
|
456 |
+
$result['type'] = 'error';
|
457 |
+
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
458 |
+
}
|
459 |
+
die();
|
460 |
+
}
|
461 |
+
|
462 |
+
public static function my_embedplus_glance_count()
|
463 |
+
{
|
464 |
+
$result = array();
|
465 |
+
if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')
|
466 |
+
{
|
467 |
+
$thehtml = '';
|
468 |
+
|
469 |
+
try
|
470 |
+
{
|
471 |
+
if (version_compare(get_bloginfo('version'), '3.8', '>='))
|
472 |
+
{
|
473 |
+
$result['container'] = '#dashboard_right_now ul';
|
474 |
+
$thehtml .= self::show_glance_list();
|
475 |
+
}
|
476 |
+
else
|
477 |
+
{
|
478 |
+
$result['container'] = '#dashboard_right_now .table_content table tbody';
|
479 |
+
$thehtml .= self::show_glance_table();
|
480 |
+
}
|
481 |
+
$result['type'] = 'success';
|
482 |
+
$result['data'] = $thehtml;
|
483 |
+
}
|
484 |
+
catch (Exception $e)
|
485 |
+
{
|
486 |
+
$result['type'] = 'error';
|
487 |
+
}
|
488 |
+
|
489 |
+
echo json_encode($result);
|
490 |
+
}
|
491 |
+
else
|
492 |
+
{
|
493 |
+
$result['type'] = 'error';
|
494 |
+
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
495 |
+
}
|
496 |
+
die();
|
497 |
+
}
|
498 |
+
|
499 |
+
public static function media_button_wizard()
|
500 |
+
{
|
501 |
+
add_thickbox();
|
502 |
+
|
503 |
+
$wizhref = self::$epbase . '/wpembedcode-simple-search.aspx?pluginversion=' . YouTubePrefs::$version .
|
504 |
+
'&wpversion=' . get_bloginfo('version') .
|
505 |
+
'&settingsurl=' . urlencode(admin_url('admin.php?page=youtube-my-preferences#jumpdefaults')) .
|
506 |
+
'&dashurl=' . urlencode(admin_url('admin.php?page=youtube-ep-analytics-dashboard')) .
|
507 |
+
'&blogwidth=' . YouTubePrefs::get_blogwidth() .
|
508 |
+
'&domain=' . urlencode(site_url()) .
|
509 |
+
'&prokey=' . urlencode(YouTubePrefs::$alloptions[YouTubePrefs::$opt_pro]) .
|
510 |
+
'&myytdefaults=' . urlencode(http_build_query(YouTubePrefs::$alloptions)) .
|
511 |
+
'&random=' . rand(1, 1000) .
|
512 |
+
'&TB_iframe=true&width=950&height=800';
|
513 |
+
?>
|
514 |
+
<a href="<?php echo $wizhref; ?>" class="thickbox button ytprefs_media_link" id="ytprefs_wiz_button" title="Visual YouTube Search Tool and Wizard - An easier embedding option"><span></span> YouTube</a>
|
515 |
+
<?php
|
516 |
+
}
|
517 |
+
|
518 |
+
public static function check_double_plugin_warning()
|
519 |
+
{
|
520 |
+
if (is_plugin_active('embedplus-for-wordpress/embedplus.php'))
|
521 |
+
{
|
522 |
+
add_action('admin_notices', array("YouTubePrefs", "double_plugin_warning"));
|
523 |
+
//self::$double_plugin = true;
|
524 |
+
}
|
525 |
+
}
|
526 |
+
|
527 |
+
public static function double_plugin_warning()
|
528 |
+
{
|
529 |
+
global $pagenow;
|
530 |
+
$user_id = get_current_user_id();
|
531 |
+
if ($pagenow != 'plugins.php' || get_user_meta($user_id, 'embedplus_double_plugin_warning', true) != 1)
|
532 |
+
{
|
533 |
+
//echo '<div class="error">' . $_SERVER['QUERY_STRING'] .'</div>';
|
534 |
+
if ($pagenow == 'plugins.php' || strpos($_SERVER['QUERY_STRING'], 'youtube-my-preferences') !== false ||
|
535 |
+
strpos($_SERVER['QUERY_STRING'], 'embedplus-video-analytics-dashboard') !== false ||
|
536 |
+
strpos($_SERVER['QUERY_STRING'], 'youtube-ep-analytics-dashboard') !== false ||
|
537 |
+
strpos($_SERVER['QUERY_STRING'], 'embedplus-official-options') !== false)
|
538 |
+
{
|
539 |
+
?>
|
540 |
+
<style type="text/css">
|
541 |
+
.embedpluswarning img
|
542 |
+
{
|
543 |
+
vertical-align: text-bottom;
|
544 |
+
}
|
545 |
+
div.bgyellow {background-color: #FCFC94; position: relative;}
|
546 |
+
a.epxout, a.epxout:hover {font-weight: bold; color: #ffffff; background-color: #ff8888; text-decoration: none;
|
547 |
+
border-radius: 20px; font-size: 15px; position: absolute; top: 3px; right: 3px;
|
548 |
+
line-height: 20px; text-align: center; width: 20px; height: 20px; display: block; cursor: pointer;}
|
549 |
+
</style>
|
550 |
+
<div class="error bgyellow embedpluswarningbox">
|
551 |
+
<p class="embedpluswarning">
|
552 |
+
<?php
|
553 |
+
if ($pagenow == 'plugins.php')
|
554 |
+
{
|
555 |
+
echo '<a class="epxout">×</a>';
|
556 |
+
}
|
557 |
+
?>
|
558 |
+
Seems like you have two different YouTube plugins by the EmbedPlus Team installed: <b><img src="<?php echo plugins_url('images/youtubeicon16.png', __FILE__) ?>" /> YouTube</b> and <b><img src="<?php echo plugins_url('images/btn_embedpluswiz.png', __FILE__) ?>" /> Advanced YouTube Embed.</b> We strongly suggest keeping only the one you prefer, so that they don't conflict with each other while trying to create your embeds.</p>
|
559 |
+
</div>
|
560 |
+
<iframe allowTransparency="true" src="<?php echo self::$epbase . '/both-plugins-conflict.aspx' ?>" style="width:2px; height: 2px;" ></iframe>
|
561 |
+
<script type="text/javascript">
|
562 |
+
(function ($) {
|
563 |
+
$(document).ready(function () {
|
564 |
+
$('.epxout').click(function () {
|
565 |
+
$.ajax({
|
566 |
+
type: "post",
|
567 |
+
dataType: "json",
|
568 |
+
timeout: 30000,
|
569 |
+
url: wpajaxurl,
|
570 |
+
data: {action: 'my_embedplus_dismiss_double_plugin_warning'},
|
571 |
+
success: function (response) {
|
572 |
+
if (response.type == "success") {
|
573 |
+
$(".embedpluswarningbox").hide();
|
574 |
+
}
|
575 |
+
},
|
576 |
+
error: function (xhr, ajaxOptions, thrownError) {
|
577 |
+
},
|
578 |
+
complete: function () {
|
579 |
+
}
|
580 |
+
});
|
581 |
+
});
|
582 |
+
|
583 |
+
});
|
584 |
+
})(jQuery);
|
585 |
+
</script>
|
586 |
+
<?php
|
587 |
+
}
|
588 |
+
}
|
589 |
+
}
|
590 |
+
|
591 |
+
public static function my_embedplus_dismiss_double_plugin_warning()
|
592 |
+
{
|
593 |
+
$result = array();
|
594 |
+
if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')
|
595 |
+
{
|
596 |
+
$user_id = get_current_user_id();
|
597 |
+
update_user_meta($user_id, 'embedplus_double_plugin_warning', 1);
|
598 |
+
$result['type'] = 'success';
|
599 |
+
echo json_encode($result);
|
600 |
+
}
|
601 |
+
else
|
602 |
+
{
|
603 |
+
$result['type'] = 'error';
|
604 |
+
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
605 |
+
}
|
606 |
+
die();
|
607 |
+
}
|
608 |
+
|
609 |
+
public static function jsvars()
|
610 |
+
{
|
611 |
+
$loggedin = current_user_can('edit_posts');
|
612 |
+
if (!($loggedin && self::$alloptions[self::$opt_admin_off_scripts]))
|
613 |
+
{
|
614 |
+
?>
|
615 |
+
<script data-cfasync="false">
|
616 |
+
window._EPYT_ = window._EPYT_ || {
|
617 |
+
ajaxurl: "<?php echo admin_url('admin-ajax.php'); ?>",
|
618 |
+
security: "<?php echo wp_create_nonce('embedplus-nonce'); ?>",
|
619 |
+
gallery_scrolloffset: <?php echo intval(self::$alloptions[self::$opt_gallery_scrolloffset]) ?>,
|
620 |
+
eppathtoscripts: "<?php echo plugins_url('scripts/', __FILE__); ?>",
|
621 |
+
epresponsiveselector: <?php echo self::get_responsiveselector(); ?>,
|
622 |
+
version: "<?php echo self::$alloptions[self::$opt_version] ?>",
|
623 |
+
epdovol: true
|
624 |
+
};
|
625 |
+
</script>
|
626 |
+
<?php
|
627 |
+
}
|
628 |
+
}
|
629 |
+
|
630 |
+
public static function jsinitvars()
|
631 |
+
{ // NOT USED
|
632 |
+
//https://support.cloudflare.com/hc/en-us/articles/200169436-How-can-I-have-Rocket-Loader-ignore-my-script-s-in-Automatic-Mode-
|
633 |
+
$responsiveselector = '[]';
|
634 |
+
if (self::$alloptions[self::$opt_widgetfit] == 1)
|
635 |
+
{
|
636 |
+
$responsiveselector = '["iframe.__youtube_prefs_widget__"]';
|
637 |
+
}
|
638 |
+
if (self::$alloptions[self::$opt_responsive] == 1)
|
639 |
+
{
|
640 |
+
$responsiveselector = '["iframe[src*=\'youtube.com\']","iframe[src*=\'youtube-nocookie.com\']","iframe[data-ep-src*=\'youtube.com\']","iframe[data-ep-src*=\'youtube-nocookie.com\']","iframe[data-ep-gallerysrc*=\'youtube.com\']"]';
|
641 |
+
}
|
642 |
+
?>
|
643 |
+
<script data-cfasync="false">
|
644 |
+
var eppathtoscripts = "<?php echo plugins_url('scripts/', __FILE__); ?>";
|
645 |
+
var epresponsiveselector = <?php echo $responsiveselector; ?>;
|
646 |
+
var epdovol = true; //<?php echo (self::$alloptions[self::$opt_defaultvol] == 1 ? 'true' : 'false') ?>;
|
647 |
+
</script>
|
648 |
+
<?php
|
649 |
+
}
|
650 |
+
|
651 |
+
public static function fitvids()
|
652 |
+
{
|
653 |
+
$loggedin = current_user_can('edit_posts');
|
654 |
+
if (!($loggedin && self::$alloptions[self::$opt_admin_off_scripts]))
|
655 |
+
{
|
656 |
+
wp_enqueue_script('__ytprefsfitvids__', plugins_url('scripts/fitvids.min.js', __FILE__), false, false, true);
|
657 |
+
}
|
658 |
+
}
|
659 |
+
|
660 |
+
public static function initoptions()
|
661 |
+
{
|
662 |
+
//vanilla defaults
|
663 |
+
$_center = 0;
|
664 |
+
$_glance = 1;
|
665 |
+
$_autoplay = get_option('youtubeprefs_autoplay', 0);
|
666 |
+
$_cc_load_policy = get_option('youtubeprefs_cc_load_policy', 0);
|
667 |
+
$_iv_load_policy = get_option('youtubeprefs_iv_load_policy', 1);
|
668 |
+
$_loop = get_option('youtubeprefs_loop', 0);
|
669 |
+
$_modestbranding = get_option('youtubeprefs_modestbranding', 0);
|
670 |
+
$_rel = get_option('youtubeprefs_rel', 1);
|
671 |
+
$_showinfo = get_option('youtubeprefs_showinfo', 1);
|
672 |
+
$_html5 = get_option('youtubeprefs_html5', 0);
|
673 |
+
$_theme = get_option('youtubeprefs_theme', 'dark');
|
674 |
+
$_color = get_option('youtubeprefs_color', 'red');
|
675 |
+
$_vq = get_option('youtubeprefs_vq', '');
|
676 |
+
$_autohide = 2;
|
677 |
+
$_pro = '';
|
678 |
+
$_ssl = 0;
|
679 |
+
$_nocookie = 0;
|
680 |
+
$_playlistorder = 0;
|
681 |
+
$_acctitle = 0;
|
682 |
+
$_ogvideo = 0;
|
683 |
+
$_migrate = 0;
|
684 |
+
$_migrate_youtube = 0;
|
685 |
+
$_controls = 2;
|
686 |
+
$_oldspacing = 1;
|
687 |
+
$_responsive = 0;
|
688 |
+
$_widgetfit = 1;
|
689 |
+
$_schemaorg = 0;
|
690 |
+
$_ftpostimg = 0;
|
691 |
+
$_spdc = 0;
|
692 |
+
$_spdcexp = 24;
|
693 |
+
$_dynload = 0;
|
694 |
+
$_dyntype = '';
|
695 |
+
$_wmode = 'opaque';
|
696 |
+
$_defaultdims = 0;
|
697 |
+
$_defaultwidth = '';
|
698 |
+
$_defaultheight = '';
|
699 |
+
$_playsinline = 0;
|
700 |
+
$_origin = 0;
|
701 |
+
$_defaultvol = 0;
|
702 |
+
$_vol = '';
|
703 |
+
$_apikey = '';
|
704 |
+
$_hl = '';
|
705 |
+
$_dohl = 0;
|
706 |
+
$_gallery_columns = 3;
|
707 |
+
$_gallery_scrolloffset = 20;
|
708 |
+
$_gallery_showtitle = 1;
|
709 |
+
$_gallery_customarrows = 0;
|
710 |
+
$_gallery_customprev = 'Prev';
|
711 |
+
$_gallery_customnext = 'Next';
|
712 |
+
$_gallery_pagesize = 15;
|
713 |
+
$_gallery_style = 'grid';
|
714 |
+
$_gallery_showdsc = 0;
|
715 |
+
$_debugmode = 0;
|
716 |
+
$_admin_off_scripts = 0;
|
717 |
+
$_old_script_method = 0;
|
718 |
+
|
719 |
+
$arroptions = get_option(self::$opt_alloptions);
|
720 |
+
|
721 |
+
//update vanilla to previous settings if exists
|
722 |
+
if ($arroptions !== false)
|
723 |
+
{
|
724 |
+
$_center = self::tryget($arroptions, self::$opt_center, 0);
|
725 |
+
$_glance = self::tryget($arroptions, self::$opt_glance, 1);
|
726 |
+
$_autoplay = self::tryget($arroptions, self::$opt_autoplay, 0);
|
727 |
+
$_debugmode = self::tryget($arroptions, self::$opt_debugmode, 0);
|
728 |
+
$_old_script_method = self::tryget($arroptions, self::$opt_old_script_method, 0);
|
729 |
+
$_cc_load_policy = self::tryget($arroptions, self::$opt_cc_load_policy, 0);
|
730 |
+
$_iv_load_policy = self::tryget($arroptions, self::$opt_iv_load_policy, 1);
|
731 |
+
$_loop = self::tryget($arroptions, self::$opt_loop, 0);
|
732 |
+
$_modestbranding = self::tryget($arroptions, self::$opt_modestbranding, 0);
|
733 |
+
$_rel = self::tryget($arroptions, self::$opt_rel, 1);
|
734 |
+
$_showinfo = self::tryget($arroptions, self::$opt_showinfo, 1);
|
735 |
+
$_playsinline = self::tryget($arroptions, self::$opt_playsinline, 0);
|
736 |
+
$_origin = self::tryget($arroptions, self::$opt_origin, 0);
|
737 |
+
$_html5 = self::tryget($arroptions, self::$opt_html5, 0);
|
738 |
+
$_hl = self::tryget($arroptions, self::$opt_hl, '');
|
739 |
+
$_dohl = self::tryget($arroptions, self::$opt_dohl, 0);
|
740 |
+
$_theme = self::tryget($arroptions, self::$opt_theme, 'dark');
|
741 |
+
$_color = self::tryget($arroptions, self::$opt_color, 'red');
|
742 |
+
$_wmode = self::tryget($arroptions, self::$opt_wmode, 'opaque');
|
743 |
+
$_vq = self::tryget($arroptions, self::$opt_vq, '');
|
744 |
+
$_pro = self::tryget($arroptions, self::$opt_pro, '');
|
745 |
+
$_ssl = self::tryget($arroptions, self::$opt_ssl, 0);
|
746 |
+
$_nocookie = self::tryget($arroptions, self::$opt_nocookie, 0);
|
747 |
+
$_playlistorder = self::tryget($arroptions, self::$opt_playlistorder, 0);
|
748 |
+
$_acctitle = self::tryget($arroptions, self::$opt_acctitle, 0);
|
749 |
+
$_ogvideo = self::tryget($arroptions, self::$opt_ogvideo, 0);
|
750 |
+
$_migrate = self::tryget($arroptions, self::$opt_migrate, 0);
|
751 |
+
$_migrate_youtube = self::tryget($arroptions, self::$opt_migrate_youtube, 0);
|
752 |
+
$_controls = self::tryget($arroptions, self::$opt_controls, 2);
|
753 |
+
$_autohide = self::tryget($arroptions, self::$opt_autohide, 2);
|
754 |
+
$_oldspacing = self::tryget($arroptions, self::$opt_oldspacing, 1);
|
755 |
+
$_responsive = self::tryget($arroptions, self::$opt_responsive, 0);
|
756 |
+
$_widgetfit = self::tryget($arroptions, self::$opt_widgetfit, 1);
|
757 |
+
$_schemaorg = self::tryget($arroptions, self::$opt_schemaorg, 0);
|
758 |
+
$_ftpostimg = self::tryget($arroptions, self::$opt_ftpostimg, 0);
|
759 |
+
$_spdc = self::tryget($arroptions, self::$opt_spdc, 0);
|
760 |
+
$_spdcexp = self::tryget($arroptions, self::$opt_spdcexp, 24);
|
761 |
+
$_dynload = self::tryget($arroptions, self::$opt_dynload, 0);
|
762 |
+
$_dyntype = self::tryget($arroptions, self::$opt_dyntype, '');
|
763 |
+
$_defaultdims = self::tryget($arroptions, self::$opt_defaultdims, 0);
|
764 |
+
$_defaultwidth = self::tryget($arroptions, self::$opt_defaultwidth, '');
|
765 |
+
$_defaultheight = self::tryget($arroptions, self::$opt_defaultheight, '');
|
766 |
+
$_defaultvol = self::tryget($arroptions, self::$opt_defaultvol, 0);
|
767 |
+
$_vol = self::tryget($arroptions, self::$opt_vol, '');
|
768 |
+
$_apikey = self::tryget($arroptions, self::$opt_apikey, '');
|
769 |
+
$_gallery_pagesize = self::tryget($arroptions, self::$opt_gallery_pagesize, 15);
|
770 |
+
$_gallery_columns = self::tryget($arroptions, self::$opt_gallery_columns, 3);
|
771 |
+
$_gallery_scrolloffset = self::tryget($arroptions, self::$opt_gallery_scrolloffset, 20);
|
772 |
+
$_gallery_showtitle = self::tryget($arroptions, self::$opt_gallery_showtitle, 1);
|
773 |
+
$_gallery_style = self::tryget($arroptions, self::$opt_gallery_style, 'grid');
|
774 |
+
$_gallery_customarrows = self::tryget($arroptions, self::$opt_gallery_customarrows, $_gallery_customarrows);
|
775 |
+
$_gallery_customnext = self::tryget($arroptions, self::$opt_gallery_customnext, $_gallery_customnext);
|
776 |
+
$_gallery_customprev = self::tryget($arroptions, self::$opt_gallery_customprev, $_gallery_customprev);
|
777 |
+
$_gallery_showdsc = self::tryget($arroptions, self::$opt_gallery_showdsc, $_gallery_showdsc);
|
778 |
+
$_admin_off_scripts = self::tryget($arroptions, self::$opt_admin_off_scripts, $_admin_off_scripts);
|
779 |
+
}
|
780 |
+
else
|
781 |
+
{
|
782 |
+
$_oldspacing = 0;
|
783 |
+
}
|
784 |
+
|
785 |
+
$all = array(
|
786 |
+
self::$opt_version => self::$version,
|
787 |
+
self::$opt_center => $_center,
|
788 |
+
self::$opt_glance => $_glance,
|
789 |
+
self::$opt_autoplay => $_autoplay,
|
790 |
+
self::$opt_cc_load_policy => $_cc_load_policy,
|
791 |
+
self::$opt_iv_load_policy => $_iv_load_policy,
|
792 |
+
self::$opt_loop => $_loop,
|
793 |
+
self::$opt_modestbranding => $_modestbranding,
|
794 |
+
self::$opt_rel => $_rel,
|
795 |
+
self::$opt_showinfo => $_showinfo,
|
796 |
+
self::$opt_playsinline => $_playsinline,
|
797 |
+
self::$opt_origin => $_origin,
|
798 |
+
self::$opt_autohide => $_autohide,
|
799 |
+
self::$opt_html5 => $_html5,
|
800 |
+
self::$opt_hl => $_hl,
|
801 |
+
self::$opt_dohl => $_dohl,
|
802 |
+
self::$opt_theme => $_theme,
|
803 |
+
self::$opt_color => $_color,
|
804 |
+
self::$opt_wmode => $_wmode,
|
805 |
+
self::$opt_vq => $_vq,
|
806 |
+
self::$opt_pro => $_pro,
|
807 |
+
self::$opt_ssl => $_ssl,
|
808 |
+
self::$opt_nocookie => $_nocookie,
|
809 |
+
self::$opt_playlistorder => $_playlistorder,
|
810 |
+
self::$opt_acctitle => $_acctitle,
|
811 |
+
self::$opt_ogvideo => $_ogvideo,
|
812 |
+
self::$opt_migrate => $_migrate,
|
813 |
+
self::$opt_migrate_youtube => $_migrate_youtube,
|
814 |
+
self::$opt_controls => $_controls,
|
815 |
+
self::$opt_oldspacing => $_oldspacing,
|
816 |
+
self::$opt_responsive => $_responsive,
|
817 |
+
self::$opt_widgetfit => $_widgetfit,
|
818 |
+
self::$opt_schemaorg => $_schemaorg,
|
819 |
+
self::$opt_ftpostimg => $_ftpostimg,
|
820 |
+
self::$opt_spdc => $_spdc,
|
821 |
+
self::$opt_spdcexp => $_spdcexp,
|
822 |
+
self::$opt_dynload => $_dynload,
|
823 |
+
self::$opt_dyntype => $_dyntype,
|
824 |
+
self::$opt_defaultdims => $_defaultdims,
|
825 |
+
self::$opt_defaultwidth => $_defaultwidth,
|
826 |
+
self::$opt_defaultheight => $_defaultheight,
|
827 |
+
self::$opt_defaultvol => $_defaultvol,
|
828 |
+
self::$opt_vol => $_vol,
|
829 |
+
self::$opt_apikey => $_apikey,
|
830 |
+
self::$opt_gallery_columns => $_gallery_columns,
|
831 |
+
self::$opt_gallery_scrolloffset => $_gallery_scrolloffset,
|
832 |
+
self::$opt_gallery_showtitle => $_gallery_showtitle,
|
833 |
+
self::$opt_gallery_customarrows => $_gallery_customarrows,
|
834 |
+
self::$opt_gallery_customnext => $_gallery_customnext,
|
835 |
+
self::$opt_gallery_customprev => $_gallery_customprev,
|
836 |
+
self::$opt_gallery_showdsc => $_gallery_showdsc,
|
837 |
+
self::$opt_gallery_style => $_gallery_style,
|
838 |
+
self::$opt_gallery_pagesize => $_gallery_pagesize,
|
839 |
+
self::$opt_debugmode => $_debugmode,
|
840 |
+
self::$opt_admin_off_scripts => $_admin_off_scripts,
|
841 |
+
self::$opt_old_script_method => $_old_script_method
|
842 |
+
);
|
843 |
+
|
844 |
+
update_option(self::$opt_alloptions, $all);
|
845 |
+
update_option('embed_autourls', 1);
|
846 |
+
self::$alloptions = get_option(self::$opt_alloptions);
|
847 |
+
}
|
848 |
+
|
849 |
+
public static function tryget($array, $key, $default = null)
|
850 |
+
{
|
851 |
+
return isset($array[$key]) ? $array[$key] : $default;
|
852 |
+
}
|
853 |
+
|
854 |
+
public static function wp_above_version($ver)
|
855 |
+
{
|
856 |
+
global $wp_version;
|
857 |
+
if (version_compare($wp_version, $ver, '>='))
|
858 |
+
{
|
859 |
+
return true;
|
860 |
+
}
|
861 |
+
return false;
|
862 |
+
}
|
863 |
+
|
864 |
+
public static function do_ytprefs()
|
865 |
+
{
|
866 |
+
add_filter('autoptimize_filter_js_exclude', 'YouTubePrefs::ao_override_jsexclude', 10, 1);
|
867 |
+
if (!is_admin())
|
868 |
+
{
|
869 |
+
add_filter('the_content', 'YouTubePrefs::apply_prefs_content', 1);
|
870 |
+
add_filter('widget_text', 'YouTubePrefs::apply_prefs_widget', 1);
|
871 |
+
add_shortcode('embedyt', array('YouTubePrefs', 'apply_prefs_shortcode'));
|
872 |
+
if (self::$alloptions[self::$opt_migrate] == 1)
|
873 |
+
{
|
874 |
+
if (self::$alloptions[self::$opt_migrate_youtube] == 1)
|
875 |
+
{
|
876 |
+
add_shortcode('youtube', array('YouTubePrefs', 'apply_prefs_shortcode_youtube'));
|
877 |
+
add_shortcode('youtube_video', array('YouTubePrefs', 'apply_prefs_shortcode_youtube'));
|
878 |
+
}
|
879 |
+
}
|
880 |
+
}
|
881 |
+
else
|
882 |
+
{
|
883 |
+
if (self::$alloptions[self::$opt_ftpostimg] == 1 && self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0)
|
884 |
+
{
|
885 |
+
add_action('save_post', array('YouTubePrefs', 'doftpostimg'), 110, 3);
|
886 |
+
}
|
887 |
+
}
|
888 |
+
}
|
889 |
+
|
890 |
+
public static function ao_override_jsexclude($exclude)
|
891 |
+
{
|
892 |
+
if (strpos($exclude, 'ytprefs.min.js') === false)
|
893 |
+
{
|
894 |
+
return $exclude . ",ytprefs.min.js,__ytprefs__";
|
895 |
+
}
|
896 |
+
return $exclude;
|
897 |
+
}
|
898 |
+
|
899 |
+
public static function apply_prefs_shortcode($atts, $content = null)
|
900 |
+
{
|
901 |
+
$content = trim($content);
|
902 |
+
$currfilter = current_filter();
|
903 |
+
if (preg_match(self::$justurlregex, $content))
|
904 |
+
{
|
905 |
+
return self::get_html(array($content), $currfilter == 'widget_text' ? false : true);
|
906 |
+
}
|
907 |
+
return '';
|
908 |
+
}
|
909 |
+
|
910 |
+
public static function apply_prefs_shortcode_youtube($atts, $content = null)
|
911 |
+
{
|
912 |
+
$content = 'http://www.youtube.com/watch?v=' . trim($content);
|
913 |
+
$currfilter = current_filter();
|
914 |
+
if (preg_match(self::$justurlregex, $content))
|
915 |
+
{
|
916 |
+
return self::get_html(array($content), $currfilter == 'widget_text' ? false : true);
|
917 |
+
}
|
918 |
+
return '';
|
919 |
+
}
|
920 |
+
|
921 |
+
public static function apply_prefs_content($content)
|
922 |
+
{
|
923 |
+
$content = preg_replace_callback(self::$ytregex, "YouTubePrefs::get_html_content", $content);
|
924 |
+
return $content;
|
925 |
+
}
|
926 |
+
|
927 |
+
public static function apply_prefs_widget($content)
|
928 |
+
{
|
929 |
+
$content = preg_replace_callback(self::$ytregex, "YouTubePrefs::get_html_widget", $content);
|
930 |
+
return $content;
|
931 |
+
}
|
932 |
+
|
933 |
+
public static function get_html_content($m)
|
934 |
+
{
|
935 |
+
return self::get_html($m, true);
|
936 |
+
}
|
937 |
+
|
938 |
+
public static function get_html_widget($m)
|
939 |
+
{
|
940 |
+
return self::get_html($m, false);
|
941 |
+
}
|
942 |
+
|
943 |
+
//public static function get_gallery_page($playlistId, $pageToken, $pageSize, $columns, $style, $apiKey)
|
944 |
+
public static function get_gallery_page($options)
|
945 |
+
{
|
946 |
+
$options->pageSize = min(intval($options->pageSize), 50);
|
947 |
+
$options->columns = intval($options->columns);
|
948 |
+
$options->showTitle = intval($options->showTitle);
|
949 |
+
$options->showDsc = intval($options->showDsc);
|
950 |
+
|
951 |
+
if (empty($options->apiKey))
|
952 |
+
{
|
953 |
+
return '<div>Please enter your YouTube API key to embed galleries.</div>';
|
954 |
+
}
|
955 |
+
|
956 |
+
$apiEndpoint = 'https://www.googleapis.com/youtube/v3/playlistItems?part=snippet,status&playlistId=' . $options->playlistId
|
957 |
+
. '&maxResults=' . $options->pageSize
|
958 |
+
. '&key=' . $options->apiKey;
|
959 |
+
if ($options->pageToken != null)
|
960 |
+
{
|
961 |
+
$apiEndpoint .= '&pageToken=' . $options->pageToken;
|
962 |
+
}
|
963 |
+
$spdckey = '';
|
964 |
+
if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0 && self::$alloptions[self::$opt_spdc] == 1)
|
965 |
+
{
|
966 |
+
try
|
967 |
+
{
|
968 |
+
$spdckey = self::$spdcprefix . '_' . md5($apiEndpoint . $options->columns . $options->style . $options->showTitle . $options->showDsc);
|
969 |
+
$spdcval = get_transient($spdckey);
|
970 |
+
if (!empty($spdcval))
|
971 |
+
{
|
972 |
+
//self::debuglog((microtime(true) - $time_start) . "\t" . $spdckey . "\t" . $spdcval . "\r\n");
|
973 |
+
return $spdcval;
|
974 |
+
}
|
975 |
+
}
|
976 |
+
catch (Exception $ex)
|
977 |
+
{
|
978 |
+
|
979 |
+
}
|
980 |
+
}
|
981 |
+
|
982 |
+
$code = '';
|
983 |
+
|
984 |
+
$apiResult = wp_remote_get($apiEndpoint);
|
985 |
+
if (self::$alloptions[self::$opt_debugmode] == 1 && current_user_can('manage_options'))
|
986 |
+
{
|
987 |
+
$redactedEndpoint = preg_replace('@&key=[^&]+@i', '&key=PRIVATE', $apiEndpoint);
|
988 |
+
return '<pre onclick="_EPADashboard_.selectText(this);" class="epyt-debug">CLICK this debug text to auto-select all. Then, COPY the selection.' . "\n\n" . $redactedEndpoint . "\n\n" . print_r($apiResult, true) . '</pre>';
|
989 |
+
}
|
990 |
+
|
991 |
+
$jsonResult = json_decode($apiResult['body']);
|
992 |
+
|
993 |
+
if (isset($jsonResult->error))
|
994 |
+
{
|
995 |
+
if (isset($jsonResult->error->message))
|
996 |
+
{
|
997 |
+
return '<div>Sorry, there was a YouTube API error: <em>' . strip_tags($jsonResult->error->message) . '</em></div>';
|
998 |
+
}
|
999 |
+
return '<div>Sorry, there may be an issue with your YouTube API key. Please enter a valid key to embed galleries.</div>';
|
1000 |
+
}
|
1001 |
+
|
1002 |
+
|
1003 |
+
|
1004 |
+
$resultsPerPage = $options->pageSize; // $jsonResult->pageInfo->resultsPerPage;
|
1005 |
+
$totalResults = $jsonResult->pageInfo->totalResults;
|
1006 |
+
|
1007 |
+
$nextPageToken = '';
|
1008 |
+
$prevPageToken = '';
|
1009 |
+
if (isset($jsonResult->nextPageToken))
|
1010 |
+
{
|
1011 |
+
$nextPageToken = $jsonResult->nextPageToken;
|
1012 |
+
}
|
1013 |
+
|
1014 |
+
if (isset($jsonResult->prevPageToken))
|
1015 |
+
{
|
1016 |
+
$prevPageToken = $jsonResult->prevPageToken;
|
1017 |
+
}
|
1018 |
+
|
1019 |
+
$cnt = 0;
|
1020 |
+
$code.= '<div class="epyt-gallery-allthumbs">';
|
1021 |
+
if (isset($jsonResult->items) && $jsonResult->items != null && is_array($jsonResult->items))
|
1022 |
+
{
|
1023 |
+
|
1024 |
+
foreach ($jsonResult->items as $item)
|
1025 |
+
{
|
1026 |
+
|
1027 |
+
$thumb = new stdClass();
|
1028 |
+
|
1029 |
+
$thumb->id = isset($item->snippet->resourceId->videoId) ? $item->snippet->resourceId->videoId : null;
|
1030 |
+
$thumb->id = $thumb->id ? $thumb->id : $item->id->videoId;
|
1031 |
+
$thumb->title = $options->showTitle ? $item->snippet->title : '';
|
1032 |
+
$thumb->privacyStatus = isset($item->status->privacyStatus) ? $item->status->privacyStatus : null;
|
1033 |
+
|
1034 |
+
if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0 && $options->style == 'listview')
|
1035 |
+
{
|
1036 |
+
$thumb->dsc = $options->showDsc ? $item->snippet->description : '';
|
1037 |
+
}
|
1038 |
+
|
1039 |
+
if ($thumb->privacyStatus == 'private')
|
1040 |
+
{
|
1041 |
+
$thumb->img = plugins_url('/images/private.png', __FILE__);
|
1042 |
+
$thumb->quality = 'medium';
|
1043 |
+
}
|
1044 |
+
else
|
1045 |
+
{
|
1046 |
+
if (isset($item->snippet->thumbnails->high->url))
|
1047 |
+
{
|
1048 |
+
$thumb->img = $item->snippet->thumbnails->high->url;
|
1049 |
+
$thumb->quality = 'high';
|
1050 |
+
}
|
1051 |
+
elseif (isset($item->snippet->thumbnails->default->url))
|
1052 |
+
{
|
1053 |
+
$thumb->img = $item->snippet->thumbnails->default->url;
|
1054 |
+
$thumb->quality = 'default';
|
1055 |
+
}
|
1056 |
+
else
|
1057 |
+
{
|
1058 |
+
$thumb->img = $item->snippet->thumbnails->medium->url;
|
1059 |
+
$thumb->quality = 'medium';
|
1060 |
+
}
|
1061 |
+
}
|
1062 |
+
|
1063 |
+
$code .= self::get_thumbnail_html($thumb, $options);
|
1064 |
+
$cnt++;
|
1065 |
+
|
1066 |
+
if ($cnt % $options->columns === 0 && $options->style !== 'carousel')
|
1067 |
+
{
|
1068 |
+
$code .= '<div class="epyt-gallery-rowbreak"></div>';
|
1069 |
+
}
|
1070 |
+
}
|
1071 |
+
}
|
1072 |
+
|
1073 |
+
$code .= '<div class="epyt-gallery-clear"></div></div>';
|
1074 |
+
|
1075 |
+
if ($options->style === 'carousel' && $options->showTitle)
|
1076 |
+
{
|
1077 |
+
$code .= '<div class="epyt-gallery-rowtitle"></div>';
|
1078 |
+
}
|
1079 |
+
|
1080 |
+
|
1081 |
+
$totalPages = ceil($totalResults / $resultsPerPage);
|
1082 |
+
$pagination = '<div class="epyt-pagination">';
|
1083 |
+
//if ($totalPages > 1)
|
1084 |
+
{
|
1085 |
+
//if (!empty($prevPageToken))
|
1086 |
+
{
|
1087 |
+
$txtprev = self::$alloptions[self::$opt_gallery_customarrows] ? self::$alloptions[self::$opt_gallery_customprev] : _('Prev');
|
1088 |
+
$pagination .= '<div class="epyt-pagebutton epyt-prev ' . (empty($prevPageToken) ? ' hide ' : '') . '" data-playlistid="' . esc_attr($options->playlistId)
|
1089 |
+
. '" data-pagesize="' . intval($options->pageSize)
|
1090 |
+
. '" data-pagetoken="' . esc_attr($prevPageToken)
|
1091 |
+
. '" data-style="' . esc_attr($options->style)
|
1092 |
+
. '" data-columns="' . intval($options->columns)
|
1093 |
+
. '" data-showtitle="' . intval($options->showTitle)
|
1094 |
+
. ((self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0 && $options->style == 'listview' && $options->showDsc) ? '" data-showdsc="' . intval($options->showDsc) : '')
|
1095 |
+
. '"><div class="arrow">«</div> <div>' . $txtprev . '</div></div>';
|
1096 |
+
}
|
1097 |
+
|
1098 |
+
$pagination .= '<div class="epyt-pagenumbers ' . ($totalPages > 1 ? '' : 'hide') . '">';
|
1099 |
+
$pagination .= '<div class="epyt-current">1</div><div class="epyt-pageseparator"> / </div><div class="epyt-totalpages">' . $totalPages . '</div>';
|
1100 |
+
$pagination .= '</div>';
|
1101 |
+
|
1102 |
+
//if (!empty($nextPageToken))
|
1103 |
+
{
|
1104 |
+
$txtnext = self::$alloptions[self::$opt_gallery_customarrows] ? self::$alloptions[self::$opt_gallery_customnext] : _('Next');
|
1105 |
+
$pagination .= '<div class="epyt-pagebutton epyt-next' . (empty($nextPageToken) ? ' hide ' : '') . '" data-playlistid="' . esc_attr($options->playlistId)
|
1106 |
+
. '" data-pagesize="' . intval($options->pageSize)
|
1107 |
+
. '" data-pagetoken="' . esc_attr($nextPageToken)
|
1108 |
+
. '" data-style="' . esc_attr($options->style)
|
1109 |
+
. '" data-columns="' . intval($options->columns)
|
1110 |
+
. '" data-showtitle="' . intval($options->showTitle)
|
1111 |
+
. ((self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0 && $options->style == 'listview' && $options->showDsc) ? '" data-showdsc="' . intval($options->showDsc) : '')
|
1112 |
+
. '"><div>' . $txtnext . '</div> <div class="arrow">»</div></div>';
|
1113 |
+
}
|
1114 |
+
$pagination .= '<div class="epyt-loader"><img src="' . plugins_url('images/gallery-page-loader.gif', __FILE__) . '"></div>';
|
1115 |
+
}
|
1116 |
+
$pagination .= '</div>';
|
1117 |
+
|
1118 |
+
$code = $pagination . $code . $pagination;
|
1119 |
+
|
1120 |
+
if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0 && self::$alloptions[self::$opt_spdc] == 1)
|
1121 |
+
{
|
1122 |
+
$daysecs = self::$alloptions[self::$opt_spdcexp] * 60 * 60;
|
1123 |
+
set_transient($spdckey, $code, $daysecs);
|
1124 |
+
$allk = get_option(self::$spdcall, array());
|
1125 |
+
$allk[] = $spdckey;
|
1126 |
+
update_option(self::$spdcall, $allk);
|
1127 |
+
|
1128 |
+
//self::debuglog((microtime(true) - $time_start) . "\t" . $spdckey . "\t" . $code . "\r\n");
|
1129 |
+
}
|
1130 |
+
return $code;
|
1131 |
+
}
|
1132 |
+
|
1133 |
+
public static function get_thumbnail_html($thumb, $options)
|
1134 |
+
{
|
1135 |
+
$escId = esc_attr($thumb->id);
|
1136 |
+
$code = '';
|
1137 |
+
$styleclass = '';
|
1138 |
+
$rawstyle = '';
|
1139 |
+
$dschtml = '';
|
1140 |
+
if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0)
|
1141 |
+
{
|
1142 |
+
if ($options->style == 'listview')
|
1143 |
+
{
|
1144 |
+
$styleclass = 'epyt-listview';
|
1145 |
+
$dschtml = isset($thumb->dsc) && !empty($thumb->dsc) ? '<div class="epyt-gallery-dsc">' . $thumb->dsc . '</div>' : '';
|
1146 |
+
}
|
1147 |
+
else if ($options->style == 'carousel')
|
1148 |
+
{
|
1149 |
+
$rawstyle = ' style="width: ' . (100.0 / floatval($options->pageSize)) . '%;" ';
|
1150 |
+
}
|
1151 |
+
}
|
1152 |
+
|
1153 |
+
$code .= '<div data-videoid="' . $escId . '" class="epyt-gallery-thumb ' . $styleclass . '" ' . $rawstyle . '>';
|
1154 |
+
$code .= '<div class="epyt-gallery-img-box"><div class="epyt-gallery-img" style="background-image: url(' . esc_attr($thumb->img) . ')">' .
|
1155 |
+
'<div class="epyt-gallery-playhover"><img class="epyt-play-img" src="' . plugins_url('images/playhover.png', __FILE__) . '" /><div class="epyt-gallery-playcrutch"></div></div>' .
|
1156 |
+
'</div></div>';
|
1157 |
+
if ($options->style != 'carousel' && !empty($thumb->title))
|
1158 |
+
{
|
1159 |
+
$code .= '<div class="epyt-gallery-title">' . esc_html($thumb->title) . '</div>';
|
1160 |
+
}
|
1161 |
+
else
|
1162 |
+
{
|
1163 |
+
$code .= '<div class="epyt-gallery-notitle"><span>' . esc_html($thumb->title) . '</span></div>';
|
1164 |
+
}
|
1165 |
+
$code .= $dschtml . '</div>';
|
1166 |
+
|
1167 |
+
|
1168 |
+
return $code;
|
1169 |
+
}
|
1170 |
+
|
1171 |
+
public static function my_embedplus_gallery_page()
|
1172 |
+
{
|
1173 |
+
if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')
|
1174 |
+
{
|
1175 |
+
check_ajax_referer('embedplus-nonce', 'security');
|
1176 |
+
$options = (object) $_POST['options'];
|
1177 |
+
$options->apiKey = self::$alloptions[self::$opt_apikey];
|
1178 |
+
echo self::get_gallery_page($options);
|
1179 |
+
die();
|
1180 |
+
}
|
1181 |
+
}
|
1182 |
+
|
1183 |
+
public static function get_html($m, $iscontent)
|
1184 |
+
{
|
1185 |
+
//$time_start = microtime(true);
|
1186 |
+
|
1187 |
+
$link = trim(str_replace(self::$badentities, self::$goodliterals, $m[0]));
|
1188 |
+
|
1189 |
+
$link = preg_replace('/\s/', '', $link);
|
1190 |
+
$linkparamstemp = explode('?', $link);
|
1191 |
+
|
1192 |
+
$linkparams = array();
|
1193 |
+
if (count($linkparamstemp) > 1)
|
1194 |
+
{
|
1195 |
+
$linkparams = self::keyvalue($linkparamstemp[1], true);
|
1196 |
+
}
|
1197 |
+
if (strpos($linkparamstemp[0], 'youtu.be') !== false && !isset($linkparams['v']))
|
1198 |
+
{
|
1199 |
+
$vtemp = explode('/', $linkparamstemp[0]);
|
1200 |
+
$linkparams['v'] = array_pop($vtemp);
|
1201 |
+
}
|
1202 |
+
|
1203 |
+
//$linkscheme = 'http';
|
1204 |
+
$youtubebaseurl = 'youtube';
|
1205 |
+
$schemaorgoutput = '';
|
1206 |
+
$voloutput = '';
|
1207 |
+
$dynsrc = '';
|
1208 |
+
$dyntype = '';
|
1209 |
+
$acctitle = '';
|
1210 |
+
|
1211 |
+
$finalparams = $linkparams + self::$alloptions;
|
1212 |
+
|
1213 |
+
$spdckey = '';
|
1214 |
+
if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0 && self::$alloptions[self::$opt_spdc] == 1)
|
1215 |
+
{
|
1216 |
+
try
|
1217 |
+
{
|
1218 |
+
$kparams = $finalparams;
|
1219 |
+
ksort($kparams);
|
1220 |
+
$jparams = json_encode($kparams);
|
1221 |
+
$spdckey = self::$spdcprefix . '_' . md5($jparams);
|
1222 |
+
$spdcval = get_transient($spdckey);
|
1223 |
+
if (!empty($spdcval))
|
1224 |
+
{
|
1225 |
+
//self::debuglog((microtime(true) - $time_start) . "\t" . $spdckey . "\t" . $spdcval . "\r\n");
|
1226 |
+
return $spdcval;
|
1227 |
+
}
|
1228 |
+
}
|
1229 |
+
catch (Exception $ex)
|
1230 |
+
{
|
1231 |
+
|
1232 |
+
}
|
1233 |
+
}
|
1234 |
+
|
1235 |
+
self::init_dimensions($link, $linkparams, $finalparams);
|
1236 |
+
|
1237 |
+
if (self::$alloptions[self::$opt_nocookie] == 1)
|
1238 |
+
{
|
1239 |
+
$youtubebaseurl = 'youtube-nocookie';
|
1240 |
+
}
|
1241 |
+
|
1242 |
+
|
1243 |
+
// if (self::$alloptions[self::$opt_ssl] == 1)
|
1244 |
+
// {
|
1245 |
+
// $linkscheme = 'https';
|
1246 |
+
// }
|
1247 |
+
|
1248 |
+
if (self::$alloptions[self::$opt_defaultvol] == 1)
|
1249 |
+
{
|
1250 |
+
$voloutput = ' data-vol="' . self::$alloptions[self::$opt_vol] . '" ';
|
1251 |
+
}
|
1252 |
+
|
1253 |
+
|
1254 |
+
// if (!(self::$alloptions[self::$opt_dohl] == 1 && isset($finalparams[self::$opt_hl]) && strlen($finalparams[self::$opt_hl]) == 2))
|
1255 |
+
// {
|
1256 |
+
// unset($finalparams[self::$opt_hl]);
|
1257 |
+
// }
|
1258 |
+
if (self::$alloptions[self::$opt_dohl] == 1)
|
1259 |
+
{
|
1260 |
+
$locale = get_locale();
|
1261 |
+
$finalparams[self::$opt_hl] = $locale;
|
1262 |
+
}
|
1263 |
+
else
|
1264 |
+
{
|
1265 |
+
unset($finalparams[self::$opt_hl]);
|
1266 |
+
}
|
1267 |
+
|
1268 |
+
if (isset($finalparams[self::$opt_html5]) && $finalparams[self::$opt_html5] == 0)
|
1269 |
+
{
|
1270 |
+
unset($finalparams[self::$opt_html5]);
|
1271 |
+
}
|
1272 |
+
|
1273 |
+
if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0)
|
1274 |
+
{
|
1275 |
+
|
1276 |
+
if (self::$alloptions[self::$opt_schemaorg] == 1 && isset($finalparams['v']))
|
1277 |
+
{
|
1278 |
+
$schemaorgoutput = self::getschemaorgoutput($finalparams['v']);
|
1279 |
+
}
|
1280 |
+
|
1281 |
+
|
1282 |
+
|
1283 |
+
if (self::$alloptions[self::$opt_dynload] == 1
|
1284 |
+
//&& $finalparams[self::$opt_autoplay] != 1
|
1285 |
+
)
|
1286 |
+
{
|
1287 |
+
$dynsrc = 'data-ep-';
|
1288 |
+
$dyntype = ' data-ep-a="' . self::$alloptions[self::$opt_dyntype] . '" ';
|
1289 |
+
}
|
1290 |
+
|
1291 |
+
if (isset($linkparams[self::$opt_vol]) && is_numeric(trim($linkparams[self::$opt_vol])))
|
1292 |
+
{
|
1293 |
+
$voloutput = ' data-vol="' . $linkparams[self::$opt_vol] . '" ';
|
1294 |
+
}
|
1295 |
+
}
|
1296 |
+
else
|
1297 |
+
{
|
1298 |
+
if (isset($finalparams[self::$opt_vol]))
|
1299 |
+
{
|
1300 |
+
unset($finalparams[self::$opt_vol]);
|
1301 |
+
}
|
1302 |
+
}
|
1303 |
+
|
1304 |
+
$centercode = '';
|
1305 |
+
if ($finalparams[self::$opt_center] == 1)
|
1306 |
+
{
|
1307 |
+
$centercode = ' style="display: block; margin: 0px auto;" ';
|
1308 |
+
}
|
1309 |
+
|
1310 |
+
if (self::$alloptions[self::$opt_acctitle] == 1)
|
1311 |
+
{
|
1312 |
+
try
|
1313 |
+
{
|
1314 |
+
//attr escape
|
1315 |
+
if (self::$oembeddata)
|
1316 |
+
{
|
1317 |
+
$acctitle = self::$oembeddata->title;
|
1318 |
+
}
|
1319 |
+
else
|
1320 |
+
{
|
1321 |
+
$odata = self::get_oembed('http://youtube.com/watch?v=' . $linkparams['v'], 1920, 1280);
|
1322 |
+
$acctitle = $odata->title;
|
1323 |
+
}
|
1324 |
+
|
1325 |
+
if ($acctitle)
|
1326 |
+
{
|
1327 |
+
$acctitle = ' title="' . esc_attr($acctitle) . '" ';
|
1328 |
+
}
|
1329 |
+
}
|
1330 |
+
catch (Exception $e)
|
1331 |
+
{
|
1332 |
+
|
1333 |
+
}
|
1334 |
+
}
|
1335 |
+
|
1336 |
+
// playlist cleanup
|
1337 |
+
$videoidoutput = isset($linkparams['v']) ? $linkparams['v'] : '';
|
1338 |
+
|
1339 |
+
if ((self::$alloptions[self::$opt_playlistorder] == 1 || isset($finalparams['plindex'])) && isset($finalparams['list']))
|
1340 |
+
{
|
1341 |
+
try
|
1342 |
+
{
|
1343 |
+
$videoidoutput = '';
|
1344 |
+
$finalparams['index'] = intval($finalparams['plindex']);
|
1345 |
+
}
|
1346 |
+
catch (Exception $ex)
|
1347 |
+
{
|
1348 |
+
|
1349 |
+
}
|
1350 |
+
}
|
1351 |
+
|
1352 |
+
$galleryWrapper1 = '';
|
1353 |
+
$galleryWrapper2 = '';
|
1354 |
+
$galleryCode = '';
|
1355 |
+
if (
|
1356 |
+
isset($finalparams['layout']) && strtolower($finalparams['layout']) == 'gallery' && isset($finalparams['list'])
|
1357 |
+
)
|
1358 |
+
{
|
1359 |
+
$gallery_options = new stdClass();
|
1360 |
+
$gallery_options->playlistId = $finalparams['list'];
|
1361 |
+
$gallery_options->pageToken = null;
|
1362 |
+
$gallery_options->pageSize = $finalparams[self::$opt_gallery_pagesize];
|
1363 |
+
$gallery_options->columns = intval($finalparams[self::$opt_gallery_columns]);
|
1364 |
+
$gallery_options->showTitle = intval($finalparams[self::$opt_gallery_showtitle]);
|
1365 |
+
$gallery_options->showDsc = intval($finalparams[self::$opt_gallery_showdsc]);
|
1366 |
+
$gallery_options->style = $finalparams[self::$opt_gallery_style];
|
1367 |
+
$gallery_options->apiKey = self::$alloptions[self::$opt_apikey];
|
1368 |
+
|
1369 |
+
$dynsrc = 'data-ep-gallery';
|
1370 |
+
$galleryWrapper1 = '<div class="epyt-gallery" data-currpage="1">';
|
1371 |
+
$galleryWrapper2 = '</div>';
|
1372 |
+
$galleryCode = '<div class="epyt-gallery-list epyt-gallery-style-' . esc_attr($gallery_options->style) . '">' .
|
1373 |
+
self::get_gallery_page($gallery_options) .
|
1374 |
+
'</div>';
|
1375 |
+
$videoidoutput = 'GALLERYVIDEOID';
|
1376 |
+
}
|
1377 |
+
|
1378 |
+
$code1 = '<iframe ' . $dyntype . $centercode . ' id="_ytid_' . rand(10000, 99999) . '" width="' . self::$defaultwidth . '" height="' . self::$defaultheight .
|
1379 |
+
'" ' . $dynsrc . 'src="//www.' . $youtubebaseurl . '.com/embed/' . $videoidoutput . '?';
|
1380 |
+
$code2 = '" frameborder="0" type="text/html" class="__youtube_prefs__' . ($iscontent ? '' : ' __youtube_prefs_widget__') .
|
1381 |
+
'"' . $voloutput . $acctitle . ' allowfullscreen webkitallowfullscreen mozallowfullscreen ></iframe>' . $schemaorgoutput;
|
1382 |
+
|
1383 |
+
$origin = '';
|
1384 |
+
|
1385 |
+
try
|
1386 |
+
{
|
1387 |
+
if (self::$alloptions[self::$opt_origin] == 1)
|
1388 |
+
{
|
1389 |
+
$url_parts = parse_url(site_url());
|
1390 |
+
$origin = 'origin=' . $url_parts['scheme'] . '://' . $url_parts['host'] . '&';
|
1391 |
+
}
|
1392 |
+
}
|
1393 |
+
catch (Exception $e)
|
1394 |
+
{
|
1395 |
+
$origin = '';
|
1396 |
+
}
|
1397 |
+
$finalsrc = 'enablejsapi=1&' . $origin;
|
1398 |
+
|
1399 |
+
if (count($finalparams) > 1)
|
1400 |
+
{
|
1401 |
+
foreach ($finalparams as $key => $value)
|
1402 |
+
{
|
1403 |
+
if (in_array($key, self::$yt_options))
|
1404 |
+
{
|
1405 |
+
if (!empty($galleryCode) && ($key == 'listType' || $key == 'list'))
|
1406 |
+
{
|
1407 |
+
|
1408 |
+
}
|
1409 |
+
else
|
1410 |
+
{
|
1411 |
+
$finalsrc .= htmlspecialchars($key) . '=' . htmlspecialchars($value) . '&';
|
1412 |
+
if ($key == 'loop' && $value == 1 && !isset($finalparams['list']))
|
1413 |
+
{
|
1414 |
+
$finalsrc .= 'playlist=' . $finalparams['v'] . '&';
|
1415 |
+
}
|
1416 |
+
}
|
1417 |
+
}
|
1418 |
+
}
|
1419 |
+
}
|
1420 |
+
|
1421 |
+
$code = $galleryWrapper1 . $code1 . $finalsrc . $code2 . $galleryCode . $galleryWrapper2; //. '<!--' . $m[0] . '-->';
|
1422 |
+
// reset static vals for next embed
|
1423 |
+
self::$defaultheight = null;
|
1424 |
+
self::$defaultwidth = null;
|
1425 |
+
self::$oembeddata = null;
|
1426 |
+
|
1427 |
+
|
1428 |
+
|
1429 |
+
|
1430 |
+
|
1431 |
+
if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0 && self::$alloptions[self::$opt_spdc] == 1)
|
1432 |
+
{
|
1433 |
+
$daysecs = self::$alloptions[self::$opt_spdcexp] * 60 * 60;
|
1434 |
+
set_transient($spdckey, $code, $daysecs);
|
1435 |
+
$allk = get_option(self::$spdcall, array());
|
1436 |
+
$allk[] = $spdckey;
|
1437 |
+
update_option(self::$spdcall, $allk);
|
1438 |
+
|
1439 |
+
//self::debuglog((microtime(true) - $time_start) . "\t" . $spdckey . "\t" . $code . "\r\n");
|
1440 |
+
}
|
1441 |
+
return $code;
|
1442 |
+
}
|
1443 |
+
|
1444 |
+
public static function debuglog($str)
|
1445 |
+
{
|
1446 |
+
$handle = fopen(__DIR__ . "\\debug.txt", "a+");
|
1447 |
+
fwrite($handle, $str);
|
1448 |
+
fclose($handle);
|
1449 |
+
}
|
1450 |
+
|
1451 |
+
public static function spdcpurge()
|
1452 |
+
{
|
1453 |
+
$allk = get_option(self::$spdcall, array());
|
1454 |
+
if (is_array($allk))
|
1455 |
+
{
|
1456 |
+
foreach ($allk as $t)
|
1457 |
+
{
|
1458 |
+
$success = delete_transient($t);
|
1459 |
+
}
|
1460 |
+
}
|
1461 |
+
update_option(self::$spdcall, array());
|
1462 |
+
}
|
1463 |
+
|
1464 |
+
public static function keyvalue($qry, $includev)
|
1465 |
+
{
|
1466 |
+
$ytvars = explode('&', $qry);
|
1467 |
+
$ytkvp = array();
|
1468 |
+
foreach ($ytvars as $k => $v)
|
1469 |
+
{
|
1470 |
+
$kvp = explode('=', $v);
|
1471 |
+
if (count($kvp) == 2 && ($includev || strtolower($kvp[0]) != 'v'))
|
1472 |
+
{
|
1473 |
+
$ytkvp[$kvp[0]] = $kvp[1];
|
1474 |
+
}
|
1475 |
+
}
|
1476 |
+
|
1477 |
+
return $ytkvp;
|
1478 |
+
}
|
1479 |
+
|
1480 |
+
public static function getschemaorgoutput($vidid)
|
1481 |
+
{
|
1482 |
+
$schemaorgcode = '';
|
1483 |
+
try
|
1484 |
+
{
|
1485 |
+
$ytapilink = 'https://www.googleapis.com/youtube/v3/videos?id=' . $vidid . '&part=contentDetails,snippet&key=' . self::$alloptions[self::$opt_apikey];
|
1486 |
+
|
1487 |
+
|
1488 |
+
$apidata = wp_remote_get($ytapilink);
|
1489 |
+
if (!is_wp_error($apidata))
|
1490 |
+
{
|
1491 |
+
$raw = wp_remote_retrieve_body($apidata);
|
1492 |
+
if (!empty($raw))
|
1493 |
+
{
|
1494 |
+
$json = json_decode($raw, true);
|
1495 |
+
if (is_array($json))
|
1496 |
+
{
|
1497 |
+
$_name = esc_attr(sanitize_text_field(str_replace("@", "@", $json['items'][0]['snippet']['title'])));
|
1498 |
+
$_description = esc_attr(sanitize_text_field(str_replace("@", "@", $json['items'][0]['snippet']['description'])));
|
1499 |
+
$_thumbnailUrl = esc_url("http://i.ytimg.com/vi/" . $vidid . "/0.jpg");
|
1500 |
+
$_duration = $json['items'][0]['contentDetails']['duration']; // "T0H9M35S" "PT9M35S"
|
1501 |
+
$_uploadDate = sanitize_text_field($json['items'][0]['snippet']['publishedAt']); // "2014-10-03T15:30:12.000Z"
|
1502 |
+
|
1503 |
+
$schemaorgcode = '<span itemprop="video" itemscope itemtype="http://schema.org/VideoObject">';
|
1504 |
+
$schemaorgcode .= '<meta itemprop="embedURL" content="http://www.youtube.com/embed/' . $vidid . '">';
|
1505 |
+
$schemaorgcode .= '<meta itemprop="name" content="' . $_name . '">';
|
1506 |
+
$schemaorgcode .= '<meta itemprop="description" content="' . $_description . '">';
|
1507 |
+
$schemaorgcode .= '<meta itemprop="thumbnailUrl" content="' . $_thumbnailUrl . '">';
|
1508 |
+
$schemaorgcode .= '<meta itemprop="duration" content="' . $_duration . '">';
|
1509 |
+
$schemaorgcode .= '<meta itemprop="uploadDate" content="' . $_uploadDate . '">';
|
1510 |
+
$schemaorgcode .= '</span>';
|
1511 |
+
}
|
1512 |
+
}
|
1513 |
+
}
|
1514 |
+
}
|
1515 |
+
catch (Exception $ex)
|
1516 |
+
{
|
1517 |
+
|
1518 |
+
}
|
1519 |
+
return $schemaorgcode;
|
1520 |
+
}
|
1521 |
+
|
1522 |
+
public static function secondsToDuration($seconds)
|
1523 |
+
{
|
1524 |
+
$remaining = $seconds;
|
1525 |
+
$parts = array();
|
1526 |
+
$multipliers = array(
|
1527 |
+
'hours' => 3600,
|
1528 |
+
'minutes' => 60,
|
1529 |
+
'seconds' => 1
|
1530 |
+
);
|
1531 |
+
|
1532 |
+
foreach ($multipliers as $type => $m)
|
1533 |
+
{
|
1534 |
+
$parts[$type] = (int) ($remaining / $m);
|
1535 |
+
$remaining -= ($parts[$type] * $m);
|
1536 |
+
}
|
1537 |
+
|
1538 |
+
return $parts;
|
1539 |
+
}
|
1540 |
+
|
1541 |
+
public static function formatDuration($parts)
|
1542 |
+
{
|
1543 |
+
$default = array(
|
1544 |
+
'hours' => 0,
|
1545 |
+
'minutes' => 0,
|
1546 |
+
'seconds' => 0
|
1547 |
+
);
|
1548 |
+
|
1549 |
+
extract(array_merge($default, $parts));
|
1550 |
+
|
1551 |
+
return "T{$hours}H{$minutes}M{$seconds}S";
|
1552 |
+
}
|
1553 |
+
|
1554 |
+
public static function init_dimensions($url, $urlkvp, $finalparams)
|
1555 |
+
{
|
1556 |
+
// get default dimensions; try embed size in settings, then try theme's content width, then just 480px
|
1557 |
+
if (self::$defaultwidth == null)
|
1558 |
+
{
|
1559 |
+
global $content_width;
|
1560 |
+
if (empty($content_width))
|
1561 |
+
{
|
1562 |
+
$content_width = $GLOBALS['content_width'];
|
1563 |
+
}
|
1564 |
+
|
1565 |
+
if (isset($urlkvp['width']) && is_numeric($urlkvp['width']))
|
1566 |
+
{
|
1567 |
+
self::$defaultwidth = $urlkvp['width'];
|
1568 |
+
}
|
1569 |
+
else if (self::$alloptions[self::$opt_defaultdims] == 1 && (isset(self::$alloptions[self::$opt_defaultwidth]) && is_numeric(self::$alloptions[self::$opt_defaultwidth])))
|
1570 |
+
{
|
1571 |
+
self::$defaultwidth = self::$alloptions[self::$opt_defaultwidth];
|
1572 |
+
}
|
1573 |
+
else if (self::$optembedwidth)
|
1574 |
+
{
|
1575 |
+
self::$defaultwidth = self::$optembedwidth;
|
1576 |
+
}
|
1577 |
+
else if ($content_width)
|
1578 |
+
{
|
1579 |
+
self::$defaultwidth = $content_width;
|
1580 |
+
}
|
1581 |
+
else
|
1582 |
+
{
|
1583 |
+
self::$defaultwidth = 480;
|
1584 |
+
}
|
1585 |
+
|
1586 |
+
|
1587 |
+
|
1588 |
+
if (isset($urlkvp['height']) && is_numeric($urlkvp['height']))
|
1589 |
+
{
|
1590 |
+
self::$defaultheight = $urlkvp['height'];
|
1591 |
+
}
|
1592 |
+
else if (self::$alloptions[self::$opt_defaultdims] == 1 && (isset(self::$alloptions[self::$opt_defaultheight]) && is_numeric(self::$alloptions[self::$opt_defaultheight])))
|
1593 |
+
{
|
1594 |
+
self::$defaultheight = self::$alloptions[self::$opt_defaultheight];
|
1595 |
+
}
|
1596 |
+
else
|
1597 |
+
{
|
1598 |
+
self::$defaultheight = self::get_aspect_height($url, $urlkvp, $finalparams);
|
1599 |
+
}
|
1600 |
+
}
|
1601 |
+
}
|
1602 |
+
|
1603 |
+
public static function get_oembed($url, $height, $width)
|
1604 |
+
{
|
1605 |
+
require_once( ABSPATH . WPINC . '/class-oembed.php' );
|
1606 |
+
$oembed = _wp_oembed_get_object();
|
1607 |
+
$args = array();
|
1608 |
+
$args['width'] = $width;
|
1609 |
+
$args['height'] = $height;
|
1610 |
+
$args['discover'] = false;
|
1611 |
+
self::$oembeddata = $oembed->fetch('https://www.youtube.com/oembed', $url, $args);
|
1612 |
+
return self::$oembeddata;
|
1613 |
+
}
|
1614 |
+
|
1615 |
+
public static function get_aspect_height($url, $urlkvp, $finalparams)
|
1616 |
+
{
|
1617 |
+
|
1618 |
+
// attempt to get aspect ratio correct height from oEmbed
|
1619 |
+
$aspectheight = round((self::$defaultwidth * 9) / 16, 0);
|
1620 |
+
|
1621 |
+
|
1622 |
+
if ($url)
|
1623 |
+
{
|
1624 |
+
$odata = self::get_oembed($url, self::$defaultwidth, self::$defaultwidth);
|
1625 |
+
|
1626 |
+
if ($odata)
|
1627 |
+
{
|
1628 |
+
$aspectheight = $odata->height;
|
1629 |
+
}
|
1630 |
+
}
|
1631 |
+
|
1632 |
+
if ($finalparams[self::$opt_controls] != 0 && $finalparams[self::$opt_autohide] != 1)
|
1633 |
+
{
|
1634 |
+
//add 28 for YouTube's own bar
|
1635 |
+
$aspectheight += 28;
|
1636 |
+
}
|
1637 |
+
return $aspectheight;
|
1638 |
+
}
|
1639 |
+
|
1640 |
+
public static function doftpostimg($postid, $post, $update)
|
1641 |
+
{
|
1642 |
+
if (current_user_can('edit_posts'))
|
1643 |
+
{
|
1644 |
+
if ((defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) || !in_array($post->post_status, array('publish', 'pending', 'draft', 'future', 'private')))
|
1645 |
+
{
|
1646 |
+
return;
|
1647 |
+
}
|
1648 |
+
try
|
1649 |
+
{
|
1650 |
+
self::doftpostimgfor($post);
|
1651 |
+
}
|
1652 |
+
catch (Exception $ex)
|
1653 |
+
{
|
1654 |
+
// display error message
|
1655 |
+
}
|
1656 |
+
}
|
1657 |
+
}
|
1658 |
+
|
1659 |
+
public static function doftpostimgfor($post)
|
1660 |
+
{
|
1661 |
+
$search_content = isset($post->post_content) ? $post->post_content : '';
|
1662 |
+
$search_content = substr(wp_strip_all_tags($search_content), 0, 4000);
|
1663 |
+
|
1664 |
+
$search_content = apply_filters('youtube_embedplus_video_content', $search_content);
|
1665 |
+
|
1666 |
+
$vid_match = null;
|
1667 |
+
if ($search_content && $post->ID && !has_post_thumbnail($post->ID) && preg_match(self::$justurlregex, $search_content, $vid_match)
|
1668 |
+
)
|
1669 |
+
{
|
1670 |
+
|
1671 |
+
$first_vid_link = trim(str_replace(self::$badentities, self::$goodliterals, $vid_match[0]));
|
1672 |
+
|
1673 |
+
$first_vid_link = preg_replace('/\s/', '', $first_vid_link);
|
1674 |
+
$linkparamstemp = explode('?', $first_vid_link);
|
1675 |
+
|
1676 |
+
$linkparams = array();
|
1677 |
+
if (count($linkparamstemp) > 1)
|
1678 |
+
{
|
1679 |
+
$linkparams = self::keyvalue($linkparamstemp[1], true);
|
1680 |
+
}
|
1681 |
+
if (strpos($linkparamstemp[0], 'youtu.be') !== false && !isset($linkparams['v']))
|
1682 |
+
{
|
1683 |
+
$vtemp = explode('/', $linkparamstemp[0]);
|
1684 |
+
$linkparams['v'] = array_pop($vtemp);
|
1685 |
+
}
|
1686 |
+
|
1687 |
+
|
1688 |
+
|
1689 |
+
$just_id = $linkparams['v'];
|
1690 |
+
$ftimgurl = null;
|
1691 |
+
if ($just_id)
|
1692 |
+
{
|
1693 |
+
require_once( ABSPATH . WPINC . '/class-oembed.php' );
|
1694 |
+
$oembed = _wp_oembed_get_object();
|
1695 |
+
$args = array();
|
1696 |
+
$args['width'] = 1920;
|
1697 |
+
$args['height'] = 1080;
|
1698 |
+
$args['discover'] = false;
|
1699 |
+
$odata = $oembed->fetch('https://www.youtube.com/oembed', 'http://youtube.com/watch?v=' . $just_id, $args);
|
1700 |
+
|
1701 |
+
if ($odata)
|
1702 |
+
{
|
1703 |
+
$ftimgurl = $odata->thumbnail_url;
|
1704 |
+
}
|
1705 |
+
}
|
1706 |
+
|
1707 |
+
$ftimgid = $ftimgurl && !is_wp_error($ftimgurl) ? self::media_sideload($ftimgurl, $post->ID, sanitize_title(preg_replace("/[^a-zA-Z0-9\s]/", "-", $post->title))) : 0;
|
1708 |
+
|
1709 |
+
if (!$ftimgid)
|
1710 |
+
{
|
1711 |
+
return;
|
1712 |
+
}
|
1713 |
+
|
1714 |
+
set_post_thumbnail($post->ID, $ftimgid);
|
1715 |
+
}
|
1716 |
+
}
|
1717 |
+
|
1718 |
+
public static function media_sideload($url, $post_id, $filename = null)
|
1719 |
+
{
|
1720 |
+
if (!$url || !$post_id)
|
1721 |
+
{
|
1722 |
+
return new WP_Error('missing', __('Please provide a valid URL and post ID', ''));
|
1723 |
+
}
|
1724 |
+
|
1725 |
+
$post_title = get_the_title($post_id);
|
1726 |
+
|
1727 |
+
require_once(ABSPATH . 'wp-admin/includes/file.php');
|
1728 |
+
$tmp = download_url($url);
|
1729 |
+
|
1730 |
+
if (is_wp_error($tmp))
|
1731 |
+
{
|
1732 |
+
@unlink($file_array['tmp_name']);
|
1733 |
+
$file_array['tmp_name'] = '';
|
1734 |
+
return $tmp;
|
1735 |
+
}
|
1736 |
+
|
1737 |
+
preg_match('/[^\?]+\.(jpg|JPG|jpe|JPE|jpeg|JPEG|gif|GIF|png|PNG)/', $url, $matches);
|
1738 |
+
$url_filename = basename($matches[0]);
|
1739 |
+
$url_type = wp_check_filetype($url_filename);
|
1740 |
+
|
1741 |
+
if (!empty($filename))
|
1742 |
+
{
|
1743 |
+
$filename = sanitize_file_name($filename);
|
1744 |
+
$tmppath = pathinfo($tmp);
|
1745 |
+
$new = $tmppath['dirname'] . '/' . $filename . '.' . $tmppath['extension'];
|
1746 |
+
rename($tmp, $new);
|
1747 |
+
$tmp = $new;
|
1748 |
+
}
|
1749 |
+
|
1750 |
+
$file_array['tmp_name'] = $tmp;
|
1751 |
+
if (!empty($filename))
|
1752 |
+
{
|
1753 |
+
$file_array['name'] = $filename . '.' . $url_type['ext'];
|
1754 |
+
}
|
1755 |
+
else
|
1756 |
+
{
|
1757 |
+
$file_array['name'] = $url_filename;
|
1758 |
+
}
|
1759 |
+
|
1760 |
+
$post_data = array(
|
1761 |
+
'post_title' => $post_title,
|
1762 |
+
'post_parent' => $post_id,
|
1763 |
+
);
|
1764 |
+
|
1765 |
+
require_once( ABSPATH . 'wp-admin/includes/file.php' );
|
1766 |
+
require_once( ABSPATH . 'wp-admin/includes/media.php' );
|
1767 |
+
require_once( ABSPATH . 'wp-admin/includes/image.php' );
|
1768 |
+
|
1769 |
+
$att_id = media_handle_sideload($file_array, $post_id, null, $post_data);
|
1770 |
+
|
1771 |
+
if (is_wp_error($att_id))
|
1772 |
+
{
|
1773 |
+
@unlink($file_array['tmp_name']);
|
1774 |
+
return $att_id;
|
1775 |
+
}
|
1776 |
+
|
1777 |
+
return $att_id;
|
1778 |
+
}
|
1779 |
+
|
1780 |
+
public static function do_ogvideo()
|
1781 |
+
{
|
1782 |
+
global $wp_query;
|
1783 |
+
$the_content = $wp_query->post->post_content;
|
1784 |
+
$matches = Array();
|
1785 |
+
$ismatch = preg_match_all(self::$justurlregex, $the_content, $matches);
|
1786 |
+
|
1787 |
+
if ($ismatch)
|
1788 |
+
{
|
1789 |
+
$match = $matches[0][0];
|
1790 |
+
|
1791 |
+
$link = trim(preg_replace('/&/i', '&', $match));
|
1792 |
+
$link = preg_replace('/\s/', '', $link);
|
1793 |
+
$link = trim(str_replace(self::$badentities, self::$goodliterals, $link));
|
1794 |
+
|
1795 |
+
$linkparamstemp = explode('?', $link);
|
1796 |
+
|
1797 |
+
$linkparams = array();
|
1798 |
+
if (count($linkparamstemp) > 1)
|
1799 |
+
{
|
1800 |
+
$linkparams = self::keyvalue($linkparamstemp[1], true);
|
1801 |
+
}
|
1802 |
+
if (strpos($linkparamstemp[0], 'youtu.be') !== false && !isset($linkparams['v']))
|
1803 |
+
{
|
1804 |
+
$vtemp = explode('/', $linkparamstemp[0]);
|
1805 |
+
$linkparams['v'] = array_pop($vtemp);
|
1806 |
+
}
|
1807 |
+
?>
|
1808 |
+
<meta property="og:type" content="video">
|
1809 |
+
<meta property="og:video" content="https://www.youtube.com/v/<?php echo $linkparams['v']; ?>?autohide=1&version=3">
|
1810 |
+
<meta property="og:video:type" content="application/x-shockwave-flash">
|
1811 |
+
<meta property="og:video:width" content="480">
|
1812 |
+
<meta property="og:video:height" content="360">
|
1813 |
+
<meta property="og:image" content="https://img.youtube.com/vi/<?php echo $linkparams['v']; ?>/0.jpg">
|
1814 |
+
<?php
|
1815 |
+
}
|
1816 |
+
}
|
1817 |
+
|
1818 |
+
public static function ytprefs_plugin_menu()
|
1819 |
+
{
|
1820 |
+
if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0)
|
1821 |
+
{
|
1822 |
+
add_menu_page('YouTube Settings', 'YouTube PRO', 'manage_options', 'youtube-my-preferences', 'YouTubePrefs::ytprefs_show_options', plugins_url('images/youtubeicon16.png', __FILE__), '10.000392854349');
|
1823 |
+
add_submenu_page('youtube-my-preferences', '', '', 'manage_options', 'youtube-my-preferences', 'YouTubePrefs::ytprefs_show_options');
|
1824 |
+
add_submenu_page('youtube-my-preferences', 'YouTube Analytics Dashboard', '<img style="width: 16px; height: 16px; vertical-align: text-top;" src="' . plugins_url('images/epstats16.png', __FILE__) . '" /> PRO Analytics', 'manage_options', 'youtube-ep-analytics-dashboard', 'YouTubePrefs::epstats_show_options');
|
1825 |
+
}
|
1826 |
+
else
|
1827 |
+
{
|
1828 |
+
add_menu_page('YouTube Settings', 'YouTube Free', 'manage_options', 'youtube-my-preferences', 'YouTubePrefs::ytprefs_show_options', plugins_url('images/youtubeicon16.png', __FILE__), '10.000392854349');
|
1829 |
+
add_submenu_page('youtube-my-preferences', '', '', 'manage_options', 'youtube-my-preferences', 'YouTubePrefs::ytprefs_show_options');
|
1830 |
+
add_submenu_page('youtube-my-preferences', 'YouTube PRO', '<img style="width: 16px; height: 16px; vertical-align: text-top;" src="' . plugins_url('images/iconwizard.png', __FILE__) . '" /> YouTube PRO', 'manage_options', 'youtube-ep-analytics-dashboard', 'YouTubePrefs::epstats_show_options');
|
1831 |
+
}
|
1832 |
+
add_submenu_page(null, 'YouTube Posts', 'YouTube Posts', 'manage_options', 'youtube-ep-glance', 'YouTubePrefs::glance_page');
|
1833 |
+
}
|
1834 |
+
|
1835 |
+
public static function epstats_show_options()
|
1836 |
+
{
|
1837 |
+
|
1838 |
+
if (!current_user_can('manage_options'))
|
1839 |
+
{
|
1840 |
+
wp_die(__('You do not have sufficient permissions to access this page.'));
|
1841 |
+
}
|
1842 |
+
|
1843 |
+
if (self::$double_plugin)
|
1844 |
+
{
|
1845 |
+
//add_action('admin_notices', array("YouTubePrefs", "double_plugin_warning"));
|
1846 |
+
self::double_plugin_warning();
|
1847 |
+
}
|
1848 |
+
|
1849 |
+
|
1850 |
+
// Now display the settings editing screen
|
1851 |
+
?>
|
1852 |
+
<div class="wrap">
|
1853 |
+
<style type="text/css">
|
1854 |
+
.wrap {font-family: Arial;}
|
1855 |
+
.epicon { width: 20px; height: 20px; vertical-align: middle; padding-right: 5px;}
|
1856 |
+
.epindent {padding-left: 25px;}
|
1857 |
+
iframe.shadow {-webkit-box-shadow: 0px 0px 20px 0px #000000; box-shadow: 0px 0px 20px 0px #000000;}
|
1858 |
+
.bold {font-weight: bold;}
|
1859 |
+
.orange {color: #f85d00;}
|
1860 |
+
</style>
|
1861 |
+
<br>
|
1862 |
+
<?php
|
1863 |
+
$thishost = (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : "");
|
1864 |
+
$thiskey = self::$alloptions[self::$opt_pro];
|
1865 |
+
|
1866 |
+
$dashurl = self::$epbase . "/dashboard/pro-easy-video-analytics.aspx?ref=protab&domain=" . $thishost . "&prokey=" . $thiskey;
|
1867 |
+
|
1868 |
+
if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0)
|
1869 |
+
{
|
1870 |
+
//// header
|
1871 |
+
echo "<h2>" . '<img src="' . plugins_url('images/epstats16.png', __FILE__) . '" /> ' . __('YouTube Analytics Dashboard') . "</h2>";
|
1872 |
+
echo '<p><i>Logging you in below... (You can also <a class="button-primary" target="_blank" href="' . $dashurl . '">click here</a> to launch your dashboard in a new tab)</i></p>';
|
1873 |
+
}
|
1874 |
+
else
|
1875 |
+
{
|
1876 |
+
//// header
|
1877 |
+
echo "<h2>" . '<img style="vertical-align: text-bottom;" src="' . plugins_url('images/iconwizard.png', __FILE__) . '" /> ' . __('YouTube Plugin PRO') . "</h2><p class='bold orange'>This tab is here to provide direct access to analytics. Graphs and other data about your site will show below after you activate PRO.</p><br>";
|
1878 |
+
}
|
1879 |
+
?>
|
1880 |
+
<iframe class="shadow" src="<?php echo $dashurl ?>" width="1060" height="3600" scrolling="auto"/>
|
1881 |
+
</div>
|
1882 |
+
<?php
|
1883 |
+
}
|
1884 |
+
|
1885 |
+
public static function my_embedplus_pro_record()
|
1886 |
+
{
|
1887 |
+
$result = array();
|
1888 |
+
if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')
|
1889 |
+
{
|
1890 |
+
$tmppro = preg_replace('/[^A-Za-z0-9-]/i', '', $_REQUEST[self::$opt_pro]);
|
1891 |
+
$new_options = array();
|
1892 |
+
$new_options[self::$opt_pro] = $tmppro;
|
1893 |
+
$all = get_option(self::$opt_alloptions);
|
1894 |
+
$all = $new_options + $all;
|
1895 |
+
update_option(self::$opt_alloptions, $all);
|
1896 |
+
|
1897 |
+
if (strlen($tmppro) > 0)
|
1898 |
+
{
|
1899 |
+
$result['type'] = 'success';
|
1900 |
+
}
|
1901 |
+
else
|
1902 |
+
{
|
1903 |
+
$result['type'] = 'error';
|
1904 |
+
}
|
1905 |
+
echo json_encode($result);
|
1906 |
+
}
|
1907 |
+
else
|
1908 |
+
{
|
1909 |
+
$result['type'] = 'error';
|
1910 |
+
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
1911 |
+
}
|
1912 |
+
die();
|
1913 |
+
}
|
1914 |
+
|
1915 |
+
public static function my_embedplus_clearspdc()
|
1916 |
+
{
|
1917 |
+
$result = array();
|
1918 |
+
if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')
|
1919 |
+
{
|
1920 |
+
try
|
1921 |
+
{
|
1922 |
+
self::spdcpurge();
|
1923 |
+
$result['type'] = 'success';
|
1924 |
+
}
|
1925 |
+
catch (Exception $ex)
|
1926 |
+
{
|
1927 |
+
$result['type'] = 'error';
|
1928 |
+
}
|
1929 |
+
echo json_encode($result);
|
1930 |
+
}
|
1931 |
+
else
|
1932 |
+
{
|
1933 |
+
$result['type'] = 'error';
|
1934 |
+
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
1935 |
+
}
|
1936 |
+
die();
|
1937 |
+
}
|
1938 |
+
|
1939 |
+
public static function custom_admin_pointers_check()
|
1940 |
+
{
|
1941 |
+
//return false; // ooopointer shut all off;
|
1942 |
+
$admin_pointers = self::custom_admin_pointers();
|
1943 |
+
foreach ($admin_pointers as $pointer => $array)
|
1944 |
+
{
|
1945 |
+
if ($array['active'])
|
1946 |
+
return true;
|
1947 |
+
}
|
1948 |
+
}
|
1949 |
+
|
1950 |
+
public static function glance_script()
|
1951 |
+
{
|
1952 |
+
add_thickbox();
|
1953 |
+
?>
|
1954 |
+
<script type="text/javascript">
|
1955 |
+
function widen_ytprefs_glance() {
|
1956 |
+
setTimeout(function () {
|
1957 |
+
jQuery("#TB_window").animate({marginLeft: '-' + parseInt((780 / 2), 10) + 'px', width: '780px'}, 300);
|
1958 |
+
jQuery("#TB_window iframe").animate({width: '780px'}, 300);
|
1959 |
+
}, 15);
|
1960 |
+
}
|
1961 |
+
|
1962 |
+
(function ($j)
|
1963 |
+
{
|
1964 |
+
$j(document).ready(function () {
|
1965 |
+
|
1966 |
+
$j.ajax({
|
1967 |
+
type: "post",
|
1968 |
+
dataType: "json",
|
1969 |
+
timeout: 30000,
|
1970 |
+
url: wpajaxurl,
|
1971 |
+
data: {action: 'my_embedplus_glance_count'},
|
1972 |
+
success: function (response) {
|
1973 |
+
if (response.type == "success") {
|
1974 |
+
$j(response.container).append(response.data);
|
1975 |
+
$j(".ytprefs_glance_button").click(widen_ytprefs_glance);
|
1976 |
+
$j(window).resize(widen_ytprefs_glance);
|
1977 |
+
if (typeof ep_do_pointers == 'function')
|
1978 |
+
{
|
1979 |
+
//ep_do_pointers($j);
|
1980 |
+
}
|
1981 |
+
}
|
1982 |
+
else {
|
1983 |
+
}
|
1984 |
+
},
|
1985 |
+
error: function (xhr, ajaxOptions, thrownError) {
|
1986 |
+
|
1987 |
+
},
|
1988 |
+
complete: function () {
|
1989 |
+
}
|
1990 |
+
});
|
1991 |
+
|
1992 |
+
});
|
1993 |
+
|
1994 |
+
})(jQuery);
|
1995 |
+
</script>
|
1996 |
+
<?php
|
1997 |
+
}
|
1998 |
+
|
1999 |
+
public static function custom_admin_pointers_footer()
|
2000 |
+
{
|
2001 |
+
$admin_pointers = self::custom_admin_pointers();
|
2002 |
+
?>
|
2003 |
+
<script type="text/javascript">
|
2004 |
+
/* <![CDATA[ */
|
2005 |
+
function ep_do_pointers($)
|
2006 |
+
{
|
2007 |
+
<?php
|
2008 |
+
foreach ($admin_pointers as $pointer => $array)
|
2009 |
+
{
|
2010 |
+
if ($array['active'])
|
2011 |
+
{
|
2012 |
+
?>
|
2013 |
+
$('<?php echo $array['anchor_id']; ?>').pointer({
|
2014 |
+
content: '<?php echo $array['content']; ?>',
|
2015 |
+
position: {
|
2016 |
+
edge: '<?php echo $array['edge']; ?>',
|
2017 |
+
align: '<?php echo $array['align']; ?>'
|
2018 |
+
},
|
2019 |
+
close: function () {
|
2020 |
+
$.post(wpajaxurl, {
|
2021 |
+
pointer: '<?php echo $pointer; ?>',
|
2022 |
+
action: 'dismiss-wp-pointer'
|
2023 |
+
});
|
2024 |
+
}
|
2025 |
+
}).pointer('open');
|
2026 |
+
<?php
|
2027 |
+
}
|
2028 |
+
}
|
2029 |
+
?>
|
2030 |
+
}
|
2031 |
+
|
2032 |
+
ep_do_pointers(jQuery); // switch off all pointers via js ooopointer
|
2033 |
+
/* ]]> */
|
2034 |
+
</script>
|
2035 |
+
<?php
|
2036 |
+
}
|
2037 |
+
|
2038 |
+
public static function custom_admin_pointers()
|
2039 |
+
{
|
2040 |
+
$dismissed = explode(',', (string) get_user_meta(get_current_user_id(), 'dismissed_wp_pointers', true));
|
2041 |
+
$version = str_replace('.', '_', self::$version); // replace all periods in version with an underscore
|
2042 |
+
$prefix = 'custom_admin_pointers' . $version . '_';
|
2043 |
+
|
2044 |
+
$new_pointer_content = '<h3>' . __('New Update') . '</h3>'; // ooopointer
|
2045 |
+
|
2046 |
+
$new_pointer_content .= '<p>'; // ooopointer
|
2047 |
+
if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
|
2048 |
+
{
|
2049 |
+
$new_pointer_content .= __("This update improves compatibility and adds features to Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro galleries »</a>");
|
2050 |
+
}
|
2051 |
+
else
|
2052 |
+
{
|
2053 |
+
$new_pointer_content .= __("This update improves compatibility and adds features to Free and Pro galleries.");
|
2054 |
+
}
|
2055 |
+
$new_pointer_content .= '</p>';
|
2056 |
+
|
2057 |
+
return array(
|
2058 |
+
$prefix . 'new_items' => array(
|
2059 |
+
'content' => $new_pointer_content,
|
2060 |
+
'anchor_id' => 'a.toplevel_page_youtube-my-preferences', //'#ytprefs_glance_button',
|
2061 |
+
'edge' => 'top',
|
2062 |
+
'align' => 'left',
|
2063 |
+
'active' => (!in_array($prefix . 'new_items', $dismissed) )
|
2064 |
+
),
|
2065 |
+
);
|
2066 |
+
}
|
2067 |
+
|
2068 |
+
public static function postchecked($idx)
|
2069 |
+
{
|
2070 |
+
return isset($_POST[$idx]) && $_POST[$idx] == (true || 'on');
|
2071 |
+
}
|
2072 |
+
|
2073 |
+
public static function ytprefs_show_options()
|
2074 |
+
{
|
2075 |
+
|
2076 |
+
if (!current_user_can('manage_options'))
|
2077 |
+
{
|
2078 |
+
wp_die(__('You do not have sufficient permissions to access this page.'));
|
2079 |
+
}
|
2080 |
+
|
2081 |
+
if (self::$double_plugin)
|
2082 |
+
{
|
2083 |
+
//add_action('admin_notices', array("YouTubePrefs", "double_plugin_warning"));
|
2084 |
+
self::double_plugin_warning();
|
2085 |
+
}
|
2086 |
+
|
2087 |
+
|
2088 |
+
// variables for the field and option names
|
2089 |
+
$ytprefs_submitted = 'ytprefs_submitted';
|
2090 |
+
|
2091 |
+
// Read in existing option values from database
|
2092 |
+
|
2093 |
+
$all = get_option(self::$opt_alloptions);
|
2094 |
+
|
2095 |
+
// See if the user has posted us some information
|
2096 |
+
// If they did, this hidden field will be set to 'Y'
|
2097 |
+
if (isset($_POST[$ytprefs_submitted]) && $_POST[$ytprefs_submitted] == 'Y')
|
2098 |
+
{
|
2099 |
+
// Read their posted values
|
2100 |
+
|
2101 |
+
$new_options = array();
|
2102 |
+
$new_options[self::$opt_center] = self::postchecked(self::$opt_center) ? 1 : 0;
|
2103 |
+
$new_options[self::$opt_glance] = self::postchecked(self::$opt_glance) ? 1 : 0;
|
2104 |
+
$new_options[self::$opt_autoplay] = self::postchecked(self::$opt_autoplay) ? 1 : 0;
|
2105 |
+
$new_options[self::$opt_debugmode] = self::postchecked(self::$opt_debugmode) ? 1 : 0;
|
2106 |
+
$new_options[self::$opt_admin_off_scripts] = self::postchecked(self::$opt_admin_off_scripts) ? 1 : 0;
|
2107 |
+
$new_options[self::$opt_old_script_method] = self::postchecked(self::$opt_old_script_method) ? 1 : 0;
|
2108 |
+
$new_options[self::$opt_cc_load_policy] = self::postchecked(self::$opt_cc_load_policy) ? 1 : 0;
|
2109 |
+
$new_options[self::$opt_iv_load_policy] = self::postchecked(self::$opt_iv_load_policy) ? 1 : 3;
|
2110 |
+
$new_options[self::$opt_loop] = self::postchecked(self::$opt_loop) ? 1 : 0;
|
2111 |
+
$new_options[self::$opt_modestbranding] = self::postchecked(self::$opt_modestbranding) ? 1 : 0;
|
2112 |
+
$new_options[self::$opt_rel] = self::postchecked(self::$opt_rel) ? 1 : 0;
|
2113 |
+
$new_options[self::$opt_showinfo] = self::postchecked(self::$opt_showinfo) ? 1 : 0;
|
2114 |
+
$new_options[self::$opt_playsinline] = self::postchecked(self::$opt_playsinline) ? 1 : 0;
|
2115 |
+
$new_options[self::$opt_origin] = self::postchecked(self::$opt_origin) ? 1 : 0;
|
2116 |
+
$new_options[self::$opt_controls] = self::postchecked(self::$opt_controls) ? 2 : 0;
|
2117 |
+
$new_options[self::$opt_autohide] = self::postchecked(self::$opt_autohide) ? 1 : 2;
|
2118 |
+
$new_options[self::$opt_html5] = self::postchecked(self::$opt_html5) ? 1 : 0;
|
2119 |
+
$new_options[self::$opt_theme] = self::postchecked(self::$opt_theme) ? 'dark' : 'light';
|
2120 |
+
$new_options[self::$opt_color] = self::postchecked(self::$opt_color) ? 'red' : 'white';
|
2121 |
+
$new_options[self::$opt_wmode] = self::postchecked(self::$opt_wmode) ? 'opaque' : 'transparent';
|
2122 |
+
$new_options[self::$opt_vq] = self::postchecked(self::$opt_vq) ? 'hd720' : '';
|
2123 |
+
$new_options[self::$opt_nocookie] = self::postchecked(self::$opt_nocookie) ? 1 : 0;
|
2124 |
+
$new_options[self::$opt_playlistorder] = self::postchecked(self::$opt_playlistorder) ? 1 : 0;
|
2125 |
+
$new_options[self::$opt_acctitle] = self::postchecked(self::$opt_acctitle) ? 1 : 0;
|
2126 |
+
$new_options[self::$opt_ogvideo] = self::postchecked(self::$opt_ogvideo) ? 1 : 0;
|
2127 |
+
$new_options[self::$opt_migrate] = self::postchecked(self::$opt_migrate) ? 1 : 0;
|
2128 |
+
$new_options[self::$opt_migrate_youtube] = self::postchecked(self::$opt_migrate_youtube) ? 1 : 0;
|
2129 |
+
//$new_options[self::$opt_ssl] = self::postchecked(self::$opt_ssl) ? 1 : 0;
|
2130 |
+
$new_options[self::$opt_oldspacing] = self::postchecked(self::$opt_oldspacing) ? 1 : 0;
|
2131 |
+
$new_options[self::$opt_responsive] = self::postchecked(self::$opt_responsive) ? 1 : 0;
|
2132 |
+
$new_options[self::$opt_widgetfit] = self::postchecked(self::$opt_widgetfit) ? 1 : 0;
|
2133 |
+
$new_options[self::$opt_schemaorg] = self::postchecked(self::$opt_schemaorg) ? 1 : 0;
|
2134 |
+
$new_options[self::$opt_ftpostimg] = self::postchecked(self::$opt_ftpostimg) ? 1 : 0;
|
2135 |
+
$new_options[self::$opt_spdc] = self::postchecked(self::$opt_spdc) ? 1 : 0;
|
2136 |
+
$new_options[self::$opt_dynload] = self::postchecked(self::$opt_dynload) ? 1 : 0;
|
2137 |
+
$new_options[self::$opt_defaultdims] = self::postchecked(self::$opt_defaultdims) ? 1 : 0;
|
2138 |
+
$new_options[self::$opt_defaultvol] = self::postchecked(self::$opt_defaultvol) ? 1 : 0;
|
2139 |
+
$new_options[self::$opt_dohl] = self::postchecked(self::$opt_dohl) ? 1 : 0;
|
2140 |
+
$new_options[self::$opt_gallery_showtitle] = self::postchecked(self::$opt_gallery_showtitle) ? 1 : 0;
|
2141 |
+
$new_options[self::$opt_gallery_customarrows] = self::postchecked(self::$opt_gallery_customarrows) ? 1 : 0;
|
2142 |
+
$new_options[self::$opt_gallery_showdsc] = self::postchecked(self::$opt_gallery_showdsc) ? 1 : 0;
|
2143 |
+
|
2144 |
+
$_defaultwidth = '';
|
2145 |
+
try
|
2146 |
+
{
|
2147 |
+
$_defaultwidth = is_numeric(trim($_POST[self::$opt_defaultwidth])) ? intval(trim($_POST[self::$opt_defaultwidth])) : $_defaultwidth;
|
2148 |
+
}
|
2149 |
+
catch (Exception $ex)
|
2150 |
+
{
|
2151 |
+
|
2152 |
+
}
|
2153 |
+
$new_options[self::$opt_defaultwidth] = $_defaultwidth;
|
2154 |
+
|
2155 |
+
$_defaultheight = '';
|
2156 |
+
try
|
2157 |
+
{
|
2158 |
+
$_defaultheight = is_numeric(trim($_POST[self::$opt_defaultheight])) ? intval(trim($_POST[self::$opt_defaultheight])) : $_defaultheight;
|
2159 |
+
}
|
2160 |
+
catch (Exception $ex)
|
2161 |
+
{
|
2162 |
+
|
2163 |
+
}
|
2164 |
+
$new_options[self::$opt_defaultheight] = $_defaultheight;
|
2165 |
+
|
2166 |
+
$_vol = '';
|
2167 |
+
try
|
2168 |
+
{
|
2169 |
+
$_vol = is_numeric(trim($_POST[self::$opt_vol])) ? intval(trim($_POST[self::$opt_vol])) : $_vol;
|
2170 |
+
}
|
2171 |
+
catch (Exception $ex)
|
2172 |
+
{
|
2173 |
+
|
2174 |
+
}
|
2175 |
+
$new_options[self::$opt_vol] = $_vol;
|
2176 |
+
|
2177 |
+
$_gallery_pagesize = 12;
|
2178 |
+
try
|
2179 |
+
{
|
2180 |
+
$_gallery_pagesize = is_numeric(trim($_POST[self::$opt_gallery_pagesize])) ? intval(trim($_POST[self::$opt_gallery_pagesize])) : $_gallery_pagesize;
|
2181 |
+
}
|
2182 |
+
catch (Exception $ex)
|
2183 |
+
{
|
2184 |
+
|
2185 |
+
}
|
2186 |
+
$new_options[self::$opt_gallery_pagesize] = $_gallery_pagesize;
|
2187 |
+
|
2188 |
+
|
2189 |
+
$_gallery_columns = 3;
|
2190 |
+
try
|
2191 |
+
{
|
2192 |
+
$_gallery_columns = is_numeric(trim($_POST[self::$opt_gallery_columns])) ? intval(trim($_POST[self::$opt_gallery_columns])) : $_gallery_columns;
|
2193 |
+
}
|
2194 |
+
catch (Exception $ex)
|
2195 |
+
{
|
2196 |
+
|
2197 |
+
}
|
2198 |
+
$new_options[self::$opt_gallery_columns] = $_gallery_columns;
|
2199 |
+
|
2200 |
+
$_gallery_scrolloffset = 20;
|
2201 |
+
try
|
2202 |
+
{
|
2203 |
+
$_gallery_scrolloffset = is_numeric(trim($_POST[self::$opt_gallery_scrolloffset])) ? intval(trim($_POST[self::$opt_gallery_scrolloffset])) : $_gallery_scrolloffset;
|
2204 |
+
}
|
2205 |
+
catch (Exception $ex)
|
2206 |
+
{
|
2207 |
+
|
2208 |
+
}
|
2209 |
+
$new_options[self::$opt_gallery_scrolloffset] = $_gallery_scrolloffset;
|
2210 |
+
|
2211 |
+
$_gallery_style = 'grid';
|
2212 |
+
try
|
2213 |
+
{
|
2214 |
+
$_gallery_style = trim(str_replace(array(' ', "'", '"'), array('', '', ''), strip_tags($_POST[self::$opt_gallery_style])));
|
2215 |
+
}
|
2216 |
+
catch (Exception $ex)
|
2217 |
+
{
|
2218 |
+
$_gallery_style = 'grid';
|
2219 |
+
}
|
2220 |
+
$new_options[self::$opt_gallery_style] = $_gallery_style;
|
2221 |
+
|
2222 |
+
|
2223 |
+
$_gallery_custom_prev = 'Prev';
|
2224 |
+
try
|
2225 |
+
{
|
2226 |
+
$_gallery_custom_prev = trim(strip_tags($_POST[self::$opt_gallery_customprev]));
|
2227 |
+
}
|
2228 |
+
catch (Exception $ex)
|
2229 |
+
{
|
2230 |
+
$_gallery_custom_prev = 'Prev';
|
2231 |
+
}
|
2232 |
+
$new_options[self::$opt_gallery_customprev] = $_gallery_custom_prev;
|
2233 |
+
|
2234 |
+
|
2235 |
+
$_gallery_custom_next = 'Next';
|
2236 |
+
try
|
2237 |
+
{
|
2238 |
+
$_gallery_custom_next = trim(strip_tags($_POST[self::$opt_gallery_customnext]));
|
2239 |
+
}
|
2240 |
+
catch (Exception $ex)
|
2241 |
+
{
|
2242 |
+
$_gallery_custom_next = 'Next';
|
2243 |
+
}
|
2244 |
+
$new_options[self::$opt_gallery_customnext] = $_gallery_custom_next;
|
2245 |
+
|
2246 |
+
|
2247 |
+
$_apikey = $all[self::$opt_apikey];
|
2248 |
+
try
|
2249 |
+
{
|
2250 |
+
$_curr_apikey = $all[self::$opt_apikey];
|
2251 |
+
$_schema_apikey = trim(str_replace(array(' ', "'", '"'), array('', '', ''), strip_tags($_POST[self::$opt_apikey])));
|
2252 |
+
$_gallery_apikey = trim(str_replace(array(' ', "'", '"'), array('', '', ''), strip_tags($_POST[self::$opt_gallery_apikey])));
|
2253 |
+
|
2254 |
+
if (!empty($_schema_apikey) && $_schema_apikey != $_curr_apikey)
|
2255 |
+
{
|
2256 |
+
$_apikey = $_schema_apikey;
|
2257 |
+
}
|
2258 |
+
if (!empty($_gallery_apikey) && $_gallery_apikey != $_curr_apikey)
|
2259 |
+
{
|
2260 |
+
$_apikey = $_gallery_apikey;
|
2261 |
+
}
|
2262 |
+
}
|
2263 |
+
catch (Exception $ex)
|
2264 |
+
{
|
2265 |
+
|
2266 |
+
}
|
2267 |
+
$new_options[self::$opt_apikey] = $_apikey;
|
2268 |
+
|
2269 |
+
$_hl = '';
|
2270 |
+
try
|
2271 |
+
{
|
2272 |
+
$temphl = strtolower(trim($_POST[self::$opt_hl]));
|
2273 |
+
$_hl = preg_match('/^[a-z][a-z]$/i', $temphl) ? $temphl : '';
|
2274 |
+
}
|
2275 |
+
catch (Exception $ex)
|
2276 |
+
{
|
2277 |
+
|
2278 |
+
}
|
2279 |
+
$new_options[self::$opt_hl] = $_hl;
|
2280 |
+
|
2281 |
+
$_dyntype = '';
|
2282 |
+
try
|
2283 |
+
{
|
2284 |
+
$tempdyntype = trim($_POST[self::$opt_dyntype]);
|
2285 |
+
$_dyntype = preg_match('/^[a-zA-Z-]+$/i', $tempdyntype) ? $tempdyntype : '';
|
2286 |
+
}
|
2287 |
+
catch (Exception $ex)
|
2288 |
+
{
|
2289 |
+
|
2290 |
+
}
|
2291 |
+
$new_options[self::$opt_dyntype] = $_dyntype;
|
2292 |
+
|
2293 |
+
$_spdcexp = 24;
|
2294 |
+
try
|
2295 |
+
{
|
2296 |
+
$_spdcexp = is_numeric(trim($_POST[self::$opt_spdcexp])) ? intval(trim($_POST[self::$opt_spdcexp])) : $_spdcexp;
|
2297 |
+
}
|
2298 |
+
catch (Exception $ex)
|
2299 |
+
{
|
2300 |
+
|
2301 |
+
}
|
2302 |
+
$new_options[self::$opt_spdcexp] = $_spdcexp;
|
2303 |
+
|
2304 |
+
|
2305 |
+
|
2306 |
+
$all = $new_options + $all;
|
2307 |
+
|
2308 |
+
update_option(self::$opt_alloptions, $all);
|
2309 |
+
|
2310 |
+
try
|
2311 |
+
{
|
2312 |
+
self::spdcpurge();
|
2313 |
+
if ($all[self::$opt_spdc] == 1)
|
2314 |
+
{
|
2315 |
+
wp_remote_get(site_url());
|
2316 |
+
}
|
2317 |
+
}
|
2318 |
+
catch (Exception $ex)
|
2319 |
+
{
|
2320 |
+
|
2321 |
+
}
|
2322 |
+
?>
|
2323 |
+
<div class="updated"><p><strong><?php _e('Changes saved.'); ?></strong></p></div>
|
2324 |
+
<?php
|
2325 |
+
}
|
2326 |
+
|
2327 |
+
|
2328 |
+
// Now display the settings editing screen
|
2329 |
+
|
2330 |
+
echo '<div class="wrap" style="max-width: 1000px;">';
|
2331 |
+
|
2332 |
+
// header
|
2333 |
+
|
2334 |
+
echo "<h2>" . '<img src="' . plugins_url('images/youtubeicon16.png', __FILE__) . '" /> ' . __('YouTube Settings') . "</h2>";
|
2335 |
+
|
2336 |
+
// settings form
|
2337 |
+
?>
|
2338 |
+
|
2339 |
+
<style type="text/css">
|
2340 |
+
.wrap {font-family: Arial; color: #000000;}
|
2341 |
+
#ytform p { line-height: 20px; margin-bottom: 11px; }
|
2342 |
+
#ytform ul li {margin-left: 30px; list-style: disc outside none;}
|
2343 |
+
.ytindent {padding: 0px 0px 0px 20px; font-size: 12px;}
|
2344 |
+
.ytindent ul, .ytindent p {font-size: 12px;}
|
2345 |
+
.shadow {-webkit-box-shadow: 0px 0px 20px 0px #000000; box-shadow: 0px 0px 20px 0px #000000;}
|
2346 |
+
.gopro {margin: 0px;}
|
2347 |
+
.gopro img {vertical-align: middle;
|
2348 |
+
width: 19px;
|
2349 |
+
height: 19px;
|
2350 |
+
padding-bottom: 4px;}
|
2351 |
+
.gopro li {margin-bottom: 0px;}
|
2352 |
+
.orange {color: #f85d00;}
|
2353 |
+
.bold {font-weight: bold;}
|
2354 |
+
.grey{color: #888888;}
|
2355 |
+
#goprobox {border-radius: 15px; padding: 10px 15px 15px 15px; margin-top: 15px; border: 3px solid #CCE5EC; position: relative;}
|
2356 |
+
#salenote {position: absolute; right: 10px; top: 10px; width: 75px; height: 30px;}
|
2357 |
+
#nonprosupport {border-radius: 15px; padding: 10px 15px 20px 15px; border: 3px solid #ff6655;}
|
2358 |
+
.pronon {font-weight: bold; color: #f85d00;}
|
2359 |
+
ul.reglist li {margin: 0px 0px 0px 30px; list-style: disc outside none;}
|
2360 |
+
.procol {width: 475px; float: left;}
|
2361 |
+
.ytindent .procol ul {font-size: 11px;}
|
2362 |
+
.smallnote, .ytindent .smallnote {font-style: italic; font-size: 10px;}
|
2363 |
+
.italic {font-style: italic;}
|
2364 |
+
.ytindent h3 {font-size: 15px; line-height: 22px; margin: 5px 0px 10px 0px;}
|
2365 |
+
#wizleftlink {float: left; display: block; width: 240px; font-style: italic; text-align: center; text-decoration: none;}
|
2366 |
+
.button-primary {font-weight: bold; white-space: nowrap;}
|
2367 |
+
p.submit {margin: 10px 0 0 0; padding: 10px 0 5px 0;}
|
2368 |
+
.wp-core-ui p.submit .button-primary {font-size: 20px; height: 50px; padding: 0 20px 1px;
|
2369 |
+
background: #2ea2cc; /* Old browsers */
|
2370 |
+
background: -moz-linear-gradient(top, #2ea2cc 0%, #007396 98%); /* FF3.6+ */
|
2371 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#2ea2cc), color-stop(98%,#007396)); /* Chrome,Safari4+ */
|
2372 |
+
background: -webkit-linear-gradient(top, #2ea2cc 0%,#007396 98%); /* Chrome10+,Safari5.1+ */
|
2373 |
+
background: -o-linear-gradient(top, #2ea2cc 0%,#007396 98%); /* Opera 11.10+ */
|
2374 |
+
background: -ms-linear-gradient(top, #2ea2cc 0%,#007396 98%); /* IE10+ */
|
2375 |
+
background: linear-gradient(to bottom, #2ea2cc 0%,#007396 98%); /* W3C */
|
2376 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2ea2cc', endColorstr='#007396',GradientType=0 ); /* IE6-9 */
|
2377 |
+
}
|
2378 |
+
p.submit em {display: inline-block; padding-left: 20px; vertical-align: middle; width: 240px; margin-top: -6px;}
|
2379 |
+
#opt_pro {box-shadow: 0px 0px 5px 0px #1870D5; width: 320px;vertical-align: top;}
|
2380 |
+
#goprobox h3 {font-size: 13px;}
|
2381 |
+
.chx {border-left: 5px solid rgba(100, 100, 100,.1);}
|
2382 |
+
.chx p {margin: 0px 0px 5px 0px;}
|
2383 |
+
.cuz {background-image: linear-gradient(to bottom,#4983FF,#0C5597) !important; color: #ffffff;}
|
2384 |
+
.brightpro {background-image: linear-gradient(to bottom,#ff5500,#cc2200) !important; color: #ffffff;}
|
2385 |
+
#boxdefaultdims {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_defaultdims] ? '' : 'display: none;' ?>}
|
2386 |
+
#boxcustomarrows {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_gallery_customarrows] ? '' : 'display: none;' ?>}
|
2387 |
+
.textinput {border-width: 2px !important;}
|
2388 |
+
h3.sect {border-radius: 10px; background-color: #D9E9F7; padding: 5px 5px 5px 10px; position: relative; font-weight: bold;}
|
2389 |
+
h3.sect a {text-decoration: none; color: #E20000;}
|
2390 |
+
h3.sect a.button-primary {color: #ffffff;}
|
2391 |
+
h4.sect {border-radius: 10px; background-color: #D9E9F7; padding: 5px 5px 5px 10px; position: relative; font-weight: bold;}
|
2392 |
+
|
2393 |
+
.ytnav {margin-bottom: 15px;}
|
2394 |
+
.ytnav a {font-weight: bold; display: inline-block; padding: 5px 10px; margin: 0px 20px 0px 0px; border: 1px solid #cccccc; border-radius: 6px;
|
2395 |
+
text-decoration: none; background-color: #ffffff;}
|
2396 |
+
.jumper {height: 25px;}
|
2397 |
+
.ssschema {float: right; width: 350px; height: auto; margin-right: 10px;}
|
2398 |
+
.ssfb {float: right; height: auto; margin-right: 10px; margin-left: 15px; margin-bottom: 10px;}
|
2399 |
+
.totop {position: absolute; right: 20px; top: 5px; color: #444444; font-size: 10px;}
|
2400 |
+
input[type=checkbox] {border: 1px solid #000000;}
|
2401 |
+
.chktitle {display: inline-block; padding: 1px 5px 1px 5px; border-radius: 3px; background-color: #ffffff; border: 1px solid #dddddd;}
|
2402 |
+
b, strong {font-weight: bold;}
|
2403 |
+
input.checkbox[disabled] {border: 1px dashed #444444;}
|
2404 |
+
.pad10 {padding: 10px;}
|
2405 |
+
#boxdohl {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_dohl] ? '' : 'display: none;' ?>}
|
2406 |
+
#boxdyn {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_dynload] ? '' : 'display: none;' ?>}
|
2407 |
+
#boxspdc {padding: 0px 10px; <?php echo $all[self::$opt_spdc] ? '' : 'display: none;' ?>}
|
2408 |
+
#boxdefaultvol {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_defaultvol] ? '' : 'display: none;' ?>}
|
2409 |
+
.vol-output {display: none; width: 30px; color: #008800;}
|
2410 |
+
.vol-range {background-color: #dddddd; border-radius: 3px; cursor: pointer;}
|
2411 |
+
input#vol {vertical-align: middle;}
|
2412 |
+
.vol-seeslider {display: none;}
|
2413 |
+
input#spdcexp {width: 70px;}
|
2414 |
+
.indent-option {margin-left: 25px;}
|
2415 |
+
#boxschemaorg {font-weight: bold; padding: 7px 0; <?php echo $all[self::$opt_schemaorg] ? 'display: block;' : 'display: none;' ?>}
|
2416 |
+
#boxmigratelist { <?php echo $all[self::$opt_migrate] ? '' : 'display: none;' ?>}
|
2417 |
+
.apikey-msg {display: inline-block; width: 45%; vertical-align: top;}
|
2418 |
+
.apikey-video{margin-left: 3%; display: inline-block; width: 50%; position: relative; padding-top: 29%}
|
2419 |
+
.apikey-video iframe{display: block; width: 100%; height: 100%; position: absolute; top: 0; left: 0;}
|
2420 |
+
#boxnocookie {display: inline-block; border-radius: 3px; padding: 2px 4px 2px 4px; color: red; background-color: yellow; font-weight: bold; <?php echo $all[self::$opt_nocookie] ? '' : 'display: none;' ?>}
|
2421 |
+
.strike {text-decoration: line-through;}
|
2422 |
+
.upgchecks { padding: 20px; border-radius: 15px; border: 1px dotted #777777; background-color: #fcfcfc; }
|
2423 |
+
.clearboth {clear: both;}
|
2424 |
+
div.hr {clear: both; border-bottom: 1px dotted #A8BDD8; margin: 20px 0 20px 0;}
|
2425 |
+
.wp-pointer-buttons a.close {margin-top: 0 !important;}
|
2426 |
+
.pad20{padding: 20px 0 20px 0;}
|
2427 |
+
.ssgallery {float: right; width: 130px; height: auto; margin-left: 15px; border: 3px solid #ffffff;}
|
2428 |
+
.ssaltgallery {float: right; height: auto; margin-right: 10px; margin-left: 15px; margin-bottom: 10px; width: 350px;}
|
2429 |
+
.save-changes-follow {position: fixed; z-index: 10000; bottom: 0; right: 0; background-color: #ffffff; padding: 0 20px; border-top-left-radius: 20px; border: 2px solid #aaaaaa; border-right-width: 0; border-bottom-width: 0;
|
2430 |
+
-webkit-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75);
|
2431 |
+
-moz-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75);
|
2432 |
+
box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75); }
|
2433 |
+
</style>
|
2434 |
+
<div class="ytindent">
|
2435 |
+
<br>
|
2436 |
+
<div id="jumphowto"></div>
|
2437 |
+
<div class="ytnav">
|
2438 |
+
<a href="#jumphowto">How To Embed</a>
|
2439 |
+
<a href="#jumpwiz">Visual Wizard</a>
|
2440 |
+
<a href="#jumpdefaults">Defaults</a>
|
2441 |
+
<a href="#jumpcompat">Compatibility</a>
|
2442 |
+
<a href="#jumpgallery">Gallery Settings</a>
|
2443 |
+
<a href="#jumpoverride">How To Override Defaults</a>
|
2444 |
+
<a target="_blank" href="<?php echo self::$epbase . "/dashboard/pro-easy-video-analytics.aspx?ref=protab" ?>" style="border-color: #888888;">Upgrade?</a>
|
2445 |
+
<a href="#jumpsupport">Support</a>
|
2446 |
+
</div>
|
2447 |
+
|
2448 |
+
<form name="form1" method="post" action="" id="ytform">
|
2449 |
+
<input type="hidden" name="<?php echo $ytprefs_submitted; ?>" value="Y">
|
2450 |
+
|
2451 |
+
<h3 class="sect">
|
2452 |
+
How to Insert a YouTube Video or Playlist <a class="smallnote" href="#jumpgallery">(For gallery directions, go here »)</a>
|
2453 |
+
</h3>
|
2454 |
+
<p>
|
2455 |
+
<b>For videos:</b> <i>Method 1 - </i> Do you already have a URL to the video you want to embed in a post, page, or even a widget? All you have to do is paste it on its own line, as shown below (including the http:// part). Easy, eh?<br>
|
2456 |
+
<i>Method 2 - </i> If you want to do some formatting (e.g. add HTML to center a video) or have two or more videos next to each other on the same line, wrap each link with the <code>[embedyt]...[/embedyt]</code> shortcode. <b>Tip for embedding videos on the same line:</b> As shown in the example image below, decrease the size of each video so that they fit together on the same line (See the "How To Override Defaults" section for height and width instructions).
|
2457 |
+
</p>
|
2458 |
+
<p>
|
2459 |
+
<b>For playlists:</b> Go to the page for the playlist that lists all of its videos (<a target="_blank" href="http://www.youtube.com/playlist?list=PL70DEC2B0568B5469">Example »</a>). Click on the video that you want the playlist to start with. Copy and paste that browser URL into your blog on its own line. If you want the first video to always be the latest video in your playlist, check the option "Playlist Ordering" in the settings down below (you will also see this option available if you use the Pro Wizard). If you want to have two or more playlists next to each other on the same line, wrap each link with the <code>[embedyt]...[/embedyt]</code> shortcode.
|
2460 |
+
</p>
|
2461 |
+
<p>
|
2462 |
+
<b>For channel playlists:</b> At your editor, click on the <img style="vertical-align: text-bottom;" src="<?php echo plugins_url('images/wizbuttonbig.png', __FILE__) ?>"> wizard button and choose the option <i>Search for a video or channel to insert in my editor.</i> Then, click on the <i>channel playlist</i> option there (instead of <i>single video</i>). Search for the channel username and follow the rest of the directions there.
|
2463 |
+
</p>
|
2464 |
+
<p>
|
2465 |
+
<b>Examples:</b><br><br>
|
2466 |
+
<img style="width: 900px; height: auto;" class="shadow" src="<?php echo plugins_url('images/sshowto.png', __FILE__) ?>" />
|
2467 |
+
</p>
|
2468 |
+
<p>
|
2469 |
+
Always follow these rules for any URL:
|
2470 |
+
</p>
|
2471 |
+
<ul class="reglist">
|
2472 |
+
<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>
|
2473 |
+
<li>Make sure the URL is <strong>not</strong> an active hyperlink (i.e., it should just be plain text). Otherwise, highlight the URL and click the "unlink" button in your editor: <img src="<?php echo plugins_url('images/unlink.png', __FILE__) ?>"/></li>
|
2474 |
+
<li>Make sure you did <strong>not</strong> format or align the URL in any way. If your URL still appears in your actual post instead of a video, highlight it and click the "remove formatting" button (formatting can be invisible sometimes): <img src="<?php echo plugins_url('images/erase.png', __FILE__) ?>"/></li>
|
2475 |
+
<li>If you really want to align the video, try wrapping the link with the shortcode first. For example: <code>[embedyt]http://www.youtube.com/watch?v=ABCDEFGHIJK[/embedyt]</code> Using the shortcode also allows you to have two or more videos next to each other on the same line. Just put the shortcoded links together on the same line. For example:<br>
|
2476 |
+
<code>[embedyt]http://www.youtube.com/watch?v=ABCDEF[/embedyt] [embedyt]http://www.youtube.com/watch?v=GHIJK[/embedyt]</code>
|
2477 |
+
</ul>
|
2478 |
+
|
2479 |
+
<div class="jumper" id="jumpwiz"></div>
|
2480 |
+
<h3 class="sect">Visual YouTube Wizard <a href="#top" class="totop">▲ top</a></h3>
|
2481 |
+
|
2482 |
+
<p>
|
2483 |
+
Let's say you don't know the exact URL of the video you wish to embed. Well, we've made the ability to directly search YouTube and insert videos right from your editor tab as a free feature to all users.
|
2484 |
+
Simply click the <img style="vertical-align: text-bottom;" src="<?php echo plugins_url('images/wizbuttonbig.png', __FILE__) ?>"> wizard button found above
|
2485 |
+
your editor to start the wizard (see image above to locate this button). There, you'll be given the option to enter your search terms.
|
2486 |
+
Click the "Search" button to view the results. Each result will have an <span class="button-primary cuz">▼ Insert Into Editor</span> button that
|
2487 |
+
you can click to directly embed the desired video link to your post without having to copy and paste.
|
2488 |
+
</p>
|
2489 |
+
<p>
|
2490 |
+
The ability to read the latest Internet discussions about the videos you want to embed is now free to all users.
|
2491 |
+
</p>
|
2492 |
+
<p>
|
2493 |
+
<b class="orange">Even more options are available to PRO users!</b> Simply click the <a href="<?php echo self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=protab' ?>" target="_blank" class="button-primary cuz">► Customize</a> button on the wizard to further personalize your embeds without having to enter special codes yourself.
|
2494 |
+
<br>
|
2495 |
+
<br>
|
2496 |
+
|
2497 |
+
<a href="<?php echo self::$epbase ?>/dashboard/pro-easy-video-analytics.aspx" target="_blank" style="text-decoration: none;"><img style="width: 500px; margin: 0 auto; display: block;" src="<?php echo plugins_url('images/ssprowizard.png', __FILE__) ?>" ></a>
|
2498 |
+
|
2499 |
+
</p>
|
2500 |
+
<div class="jumper" id="jumpdefaults"></div>
|
2501 |
+
<h3 class="sect">
|
2502 |
+
<?php _e("Default YouTube Options") ?> <a href="#top" class="totop">▲ top</a>
|
2503 |
+
</h3>
|
2504 |
+
<p>
|
2505 |
+
<?php _e("One of the benefits of using this plugin is that you can set site-wide default options for all your videos (click \"Save Changes\" when finished). However, you can also override them (and more) on a per-video basis. Directions on how to do that are in the next section.") ?>
|
2506 |
+
</p>
|
2507 |
+
<?php // self::save_changes_button(); ?>
|
2508 |
+
|
2509 |
+
<div class="ytindent chx">
|
2510 |
+
<p>
|
2511 |
+
<input name="<?php echo self::$opt_glance; ?>" id="<?php echo self::$opt_glance; ?>" <?php checked($all[self::$opt_glance], 1); ?> type="checkbox" class="checkbox">
|
2512 |
+
<label for="<?php echo self::$opt_glance; ?>"><?php _e('<b class="chktitle">At a glance:</b> Show "At a Glance" Embed Links on the dashboard homepage.') ?></label>
|
2513 |
+
</p>
|
2514 |
+
<p>
|
2515 |
+
<input name="<?php echo self::$opt_center; ?>" id="<?php echo self::$opt_center; ?>" <?php checked($all[self::$opt_center], 1); ?> type="checkbox" class="checkbox">
|
2516 |
+
<label for="<?php echo self::$opt_center; ?>"><?php _e('<b class="chktitle">Centering:</b> Automatically center all your videos (not necessary if all your videos span the whole width of your blog).') ?></label>
|
2517 |
+
</p>
|
2518 |
+
<p>
|
2519 |
+
<input name="<?php echo self::$opt_autoplay; ?>" id="<?php echo self::$opt_autoplay; ?>" <?php checked($all[self::$opt_autoplay], 1); ?> type="checkbox" class="checkbox">
|
2520 |
+
<label for="<?php echo self::$opt_autoplay; ?>"><?php _e('<b class="chktitle">Autoplay:</b> Automatically start playing your videos.') ?></label>
|
2521 |
+
</p>
|
2522 |
+
<p>
|
2523 |
+
<input name="<?php echo self::$opt_iv_load_policy; ?>" id="<?php echo self::$opt_iv_load_policy; ?>" <?php checked($all[self::$opt_iv_load_policy], 1); ?> type="checkbox" class="checkbox">
|
2524 |
+
<label for="<?php echo self::$opt_iv_load_policy; ?>"><?php _e('<b class="chktitle">Annotations:</b> Show annotations by default.') ?></label>
|
2525 |
+
</p>
|
2526 |
+
<p>
|
2527 |
+
<input name="<?php echo self::$opt_loop; ?>" id="<?php echo self::$opt_loop; ?>" <?php checked($all[self::$opt_loop], 1); ?> type="checkbox" class="checkbox">
|
2528 |
+
<label for="<?php echo self::$opt_loop; ?>"><?php _e('<b class="chktitle">Looping:</b> Loop all your videos.') ?></label>
|
2529 |
+
</p>
|
2530 |
+
<p>
|
2531 |
+
<input name="<?php echo self::$opt_modestbranding; ?>" id="<?php echo self::$opt_modestbranding; ?>" <?php checked($all[self::$opt_modestbranding], 1); ?> type="checkbox" class="checkbox">
|
2532 |
+
<label for="<?php echo self::$opt_modestbranding; ?>"><?php _e('<b class="chktitle">Modest Branding:</b> No YouTube logo will be shown on the control bar. Instead, the logo will only show as a watermark when the video is paused/stopped.') ?></label>
|
2533 |
+
</p>
|
2534 |
+
<p>
|
2535 |
+
<input name="<?php echo self::$opt_rel; ?>" id="<?php echo self::$opt_rel; ?>" <?php checked($all[self::$opt_rel], 1); ?> type="checkbox" class="checkbox">
|
2536 |
+
<label for="<?php echo self::$opt_rel; ?>"><?php _e('<b class="chktitle">Related Videos:</b> Show related videos at the end.') ?></label>
|
2537 |
+
</p>
|
2538 |
+
<p>
|
2539 |
+
<input name="<?php echo self::$opt_showinfo; ?>" id="<?php echo self::$opt_showinfo; ?>" <?php checked($all[self::$opt_showinfo], 1); ?> type="checkbox" class="checkbox">
|
2540 |
+
<label for="<?php echo self::$opt_showinfo; ?>"><?php _e('<b class="chktitle">Show Title:</b> Show the video title and other info.') ?></label>
|
2541 |
+
</p>
|
2542 |
+
<p>
|
2543 |
+
<input name="<?php echo self::$opt_acctitle; ?>" id="<?php echo self::$opt_acctitle; ?>" <?php checked($all[self::$opt_acctitle], 1); ?> type="checkbox" class="checkbox">
|
2544 |
+
<label for="<?php echo self::$opt_acctitle; ?>"><b class="chktitle">Accessible Title Attributes: </b> Improve accessibility by using title attributes for screen reader support. It should help your site pass functional accessibility evaluations (FAE). </label>
|
2545 |
+
</p>
|
2546 |
+
<p>
|
2547 |
+
<input name="<?php echo self::$opt_theme; ?>" id="<?php echo self::$opt_theme; ?>" <?php checked($all[self::$opt_theme], 'dark'); ?> type="checkbox" class="checkbox">
|
2548 |
+
<label for="<?php echo self::$opt_theme; ?>"><?php _e('<b class="chktitle">Dark Theme:</b> Use the dark theme (uncheck to use light theme).') ?></label>
|
2549 |
+
</p>
|
2550 |
+
<p>
|
2551 |
+
<input name="<?php echo self::$opt_color; ?>" id="<?php echo self::$opt_color; ?>" <?php checked($all[self::$opt_color], 'red'); ?> type="checkbox" class="checkbox">
|
2552 |
+
<label for="<?php echo self::$opt_color; ?>"><?php _e('<b class="chktitle">Red Progress Bar:</b> Use the red progress bar (uncheck to use a white progress bar). Note: Using white will disable the modestbranding option.') ?></label>
|
2553 |
+
</p>
|
2554 |
+
<p>
|
2555 |
+
<input name="<?php echo self::$opt_vq; ?>" id="<?php echo self::$opt_vq; ?>" <?php checked($all[self::$opt_vq], 'hd720'); ?> type="checkbox" class="checkbox">
|
2556 |
+
<label for="<?php echo self::$opt_vq; ?>"><?php _e('<b class="chktitle strike">HD Quality:</b> Force HD quality when available. <b>NOTE: YouTube has deprecated this unofficially supported option.</b>') ?> </label>
|
2557 |
+
</p>
|
2558 |
+
<p>
|
2559 |
+
<input name="<?php echo self::$opt_wmode; ?>" id="<?php echo self::$opt_wmode; ?>" <?php checked($all[self::$opt_wmode], 'opaque'); ?> type="checkbox" class="checkbox">
|
2560 |
+
<label for="<?php echo self::$opt_wmode; ?>"><?php _e('<b class="chktitle">Wmode:</b> Use "opaque" wmode (uncheck to use "transparent"). Opaque may have higher performance.') ?></label>
|
2561 |
+
</p>
|
2562 |
+
<p>
|
2563 |
+
<input name="<?php echo self::$opt_defaultdims; ?>" id="<?php echo self::$opt_defaultdims; ?>" <?php checked($all[self::$opt_defaultdims], 1); ?> type="checkbox" class="checkbox">
|
2564 |
+
<span id="boxdefaultdims">
|
2565 |
+
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;">
|
2566 |
+
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;">
|
2567 |
+
</span>
|
2568 |
+
|
2569 |
+
<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>
|
2570 |
+
</p>
|
2571 |
+
<p>
|
2572 |
+
<input name="<?php echo self::$opt_responsive; ?>" id="<?php echo self::$opt_responsive; ?>" <?php checked($all[self::$opt_responsive], 1); ?> type="checkbox" class="checkbox">
|
2573 |
+
<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>
|
2574 |
+
</p>
|
2575 |
+
<p>
|
2576 |
+
<input name="<?php echo self::$opt_widgetfit; ?>" id="<?php echo self::$opt_widgetfit; ?>" <?php checked($all[self::$opt_widgetfit], 1); ?> type="checkbox" class="checkbox">
|
2577 |
+
<label for="<?php echo self::$opt_widgetfit; ?>"><?php _e('<b class="chktitle">Autofit Widget Videos:</b> Make each video that you embed in a widget area automatically fit the width of its container.</b>') ?></label>
|
2578 |
+
</p>
|
2579 |
+
<p>
|
2580 |
+
<input name="<?php echo self::$opt_playsinline; ?>" id="<?php echo self::$opt_playsinline; ?>" <?php checked($all[self::$opt_playsinline], 1); ?> type="checkbox" class="checkbox">
|
2581 |
+
<label for="<?php echo self::$opt_playsinline; ?>">
|
2582 |
+
<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.
|
2583 |
+
<em>Disclaimer: YouTube/Google has issues with this iOS related parameter, but we are providing it here in the event that they support it consistently.</em>
|
2584 |
+
</label>
|
2585 |
+
</p>
|
2586 |
+
<p>
|
2587 |
+
<input name="<?php echo self::$opt_origin; ?>" id="<?php echo self::$opt_origin; ?>" <?php checked($all[self::$opt_origin], 1); ?> type="checkbox" class="checkbox">
|
2588 |
+
<label for="<?php echo self::$opt_origin; ?>"><b class="chktitle">Extra Player Security: </b>
|
2589 |
+
Add site origin information with each embed code as an extra security measure. In YouTube's/Google's own words, checking this option "protects against malicious third-party JavaScript being injected into your page and hijacking control of your YouTube player." We especially recommend checking it as it adds higher security than the built-in YouTube embedding method that comes with the current version of WordPress (i.e. oembed).
|
2590 |
+
</label>
|
2591 |
+
</p>
|
2592 |
+
<p>
|
2593 |
+
<input name="<?php echo self::$opt_nocookie; ?>" id="<?php echo self::$opt_nocookie; ?>" <?php checked($all[self::$opt_nocookie], 1); ?> type="checkbox" class="checkbox">
|
2594 |
+
<span id="boxnocookie">
|
2595 |
+
Reminder: If you see errors while testing your playlist embeds or watching your videos on mobile, please uncheck this option.
|
2596 |
+
</span>
|
2597 |
+
<label for="<?php echo self::$opt_nocookie; ?>">
|
2598 |
+
<b class="chktitle">No Cookies:</b> Prevent YouTube from leaving tracking cookies on your visitors browsers unless they actual play the videos. This is coded to apply this behavior on links in your past post as well. <b>NOTE: Research shows that YouTube's support of Do Not Track can be error-prone. </b>
|
2599 |
+
</label>
|
2600 |
+
</p>
|
2601 |
+
<p>
|
2602 |
+
<input name="<?php echo self::$opt_controls; ?>" id="<?php echo self::$opt_controls; ?>" <?php checked($all[self::$opt_controls], 2); ?> type="checkbox" class="checkbox">
|
2603 |
+
<label for="<?php echo self::$opt_controls; ?>"><b class="chktitle">Show Controls:</b> Show the player's control bar. Unchecking this option creates a cleaner look but limits what your viewers can control (play position, volume, etc.).</label>
|
2604 |
+
</p>
|
2605 |
+
<p>
|
2606 |
+
<input name="<?php echo self::$opt_autohide; ?>" id="<?php echo self::$opt_autohide; ?>" <?php checked($all[self::$opt_autohide], 1); ?> type="checkbox" class="checkbox">
|
2607 |
+
<label for="<?php echo self::$opt_autohide; ?>"><b class="chktitle">Autohide Controls:</b> Slide away the control bar after the video starts playing. It will automatically slide back in again if you mouse over the video. If you unchecked "Show Controls" above, then what you select for Autohide does not matter since there are no controls to even hide.</label>
|
2608 |
+
</p>
|
2609 |
+
<!-- <p>
|
2610 |
+
<input name="<?php echo self::$opt_ssl; ?>" id="<?php echo self::$opt_ssl; ?>" <?php checked($all[self::$opt_ssl], 1); ?> type="checkbox" class="checkbox">
|
2611 |
+
<label for="<?php echo self::$opt_ssl; ?>">
|
2612 |
+
<b class="chktitle">HTTPS/SSL Player:</b> Do you have a website that uses HTTPS? Check this to use the secure YouTube player for all of your embeds.
|
2613 |
+
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 »</a>
|
2614 |
+
</label>
|
2615 |
+
</p>-->
|
2616 |
+
<p>
|
2617 |
+
<input name="<?php echo self::$opt_defaultvol; ?>" id="<?php echo self::$opt_defaultvol; ?>" <?php checked($all[self::$opt_defaultvol], 1); ?> type="checkbox" class="checkbox">
|
2618 |
+
<span id="boxdefaultvol">
|
2619 |
+
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]); ?>" >
|
2620 |
+
</span>
|
2621 |
+
<label for="<?php echo self::$opt_defaultvol; ?>">
|
2622 |
+
<b class="chktitle">Volume Initialization: </b>
|
2623 |
+
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>
|
2624 |
+
</label>
|
2625 |
+
</p>
|
2626 |
+
|
2627 |
+
<p>
|
2628 |
+
<input name="<?php echo self::$opt_cc_load_policy; ?>" id="<?php echo self::$opt_cc_load_policy; ?>" <?php checked($all[self::$opt_cc_load_policy], 1); ?> type="checkbox" class="checkbox">
|
2629 |
+
<label for="<?php echo self::$opt_cc_load_policy; ?>"><?php _e('<b class="chktitle">Closed Captions:</b> Turn on closed captions by default.') ?></label>
|
2630 |
+
</p>
|
2631 |
+
<p>
|
2632 |
+
<input name="<?php echo self::$opt_dohl; ?>" id="<?php echo self::$opt_dohl; ?>" <?php checked($all[self::$opt_dohl], 1); ?> type="checkbox" class="checkbox">
|
2633 |
+
<!-- <span id="boxdohl">
|
2634 |
+
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">
|
2635 |
+
</span>-->
|
2636 |
+
<label for="<?php echo self::$opt_dohl; ?>"><b class="chktitle">Player Localization / Internationalization: </b>
|
2637 |
+
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 »</a></label>
|
2638 |
+
</p>
|
2639 |
+
<p>
|
2640 |
+
<input name="<?php echo self::$opt_html5; ?>" id="<?php echo self::$opt_html5; ?>" <?php checked($all[self::$opt_html5], 1); ?> type="checkbox" class="checkbox">
|
2641 |
+
<label for="<?php echo self::$opt_html5; ?>">
|
2642 |
+
<b class="chktitle strike">HTML5 First:</b>
|
2643 |
+
As of January 2015, YouTube began serving the HTML5 player by default; therefore, this plugin no longer needs a special HTML5 setting. This option is simply kept here as a notice.
|
2644 |
+
</label>
|
2645 |
+
</p>
|
2646 |
+
|
2647 |
+
<p>
|
2648 |
+
<input name="<?php echo self::$opt_playlistorder; ?>" id="<?php echo self::$opt_playlistorder; ?>" <?php checked($all[self::$opt_playlistorder], 1); ?> type="checkbox" class="checkbox">
|
2649 |
+
<label for="<?php echo self::$opt_playlistorder; ?>">
|
2650 |
+
<b class="chktitle">Playlist Ordering: <sup class="orange bold">NEW</sup></b>
|
2651 |
+
Check this option if you want your playlists to begin with the latest added video by default. (Unchecking this will force playlists to always start with your selected specific video, even if you add videos to the playlist later).
|
2652 |
+
Note that this is not for setting the thumbnail list order of galleries, just the standard playlist player that YouTube provides.
|
2653 |
+
</label>
|
2654 |
+
</p>
|
2655 |
+
|
2656 |
+
|
2657 |
+
|
2658 |
+
</div>
|
2659 |
+
|
2660 |
+
<div class="jumper" id="jumpcompat"></div>
|
2661 |
+
<h3 class="sect">Compatibility Settings<sup class="orange bold">NEW</sup> <a href="#top" class="totop">▲ top</a></h3>
|
2662 |
+
<p>
|
2663 |
+
With thousands of active users, our plugin may not work with every plugin out there. Below are some settings you may wish to try out.
|
2664 |
+
</p>
|
2665 |
+
<div class="ytindent chx">
|
2666 |
+
<p>
|
2667 |
+
<input name="<?php echo self::$opt_old_script_method; ?>" id="<?php echo self::$opt_old_script_method; ?>" <?php checked($all[self::$opt_old_script_method], 1); ?> type="checkbox" class="checkbox">
|
2668 |
+
<label for="<?php echo self::$opt_old_script_method; ?>">
|
2669 |
+
<b class="chktitle">Use Legacy Scripts: <sup class="orange bold">NEW</sup></b>
|
2670 |
+
This is a legacy option for users with theme issues that require backwards compatibility (v.10.5 or earlier). It may also help with caching plugin or CDN plugin issues.
|
2671 |
+
</label>
|
2672 |
+
</p>
|
2673 |
+
<p>
|
2674 |
+
<input name="<?php echo self::$opt_admin_off_scripts; ?>" id="<?php echo self::$opt_admin_off_scripts; ?>" <?php checked($all[self::$opt_admin_off_scripts], 1); ?> type="checkbox" class="checkbox">
|
2675 |
+
<label for="<?php echo self::$opt_admin_off_scripts; ?>">
|
2676 |
+
<b class="chktitle">Turn Off Scripts While Editing: <sup class="orange bold">NEW</sup></b>
|
2677 |
+
Front-end editors and visual pagebuilders often run Javascript while you're in edit mode. Check this to turn off this plugin's Javascript during edit mode, if you see conflicts.
|
2678 |
+
Don't worry, all other visitors to your site will still view your site normally.
|
2679 |
+
</label>
|
2680 |
+
</p>
|
2681 |
+
<p>
|
2682 |
+
<input name="<?php echo self::$opt_migrate; ?>" id="<?php echo self::$opt_migrate; ?>" <?php checked($all[self::$opt_migrate], 1); ?> type="checkbox" class="checkbox">
|
2683 |
+
<label for="<?php echo self::$opt_migrate; ?>">
|
2684 |
+
<b class="chktitle">Migrate Shortcodes: <sup class="orange bold">NEW</sup></b> Inherit other shortcodes.
|
2685 |
+
</label>
|
2686 |
+
<div id="boxmigratelist">
|
2687 |
+
<ul>
|
2688 |
+
<li><input name="<?php echo self::$opt_migrate_youtube; ?>" id="<?php echo self::$opt_migrate_youtube; ?>" <?php checked($all[self::$opt_migrate_youtube], 1); ?> type="checkbox" class="checkbox"><label for="<?php echo self::$opt_migrate_youtube; ?>">"Youtube Embed" : <code>youtube</code> and <code>youtube_video</code> shortcodes</label></li>
|
2689 |
+
<li class="smallnote orange" style="list-style: none;">This feature is beta. More shortcodes coming.</li>
|
2690 |
+
</ul>
|
2691 |
+
|
2692 |
+
</div>
|
2693 |
+
</p>
|
2694 |
+
<p>
|
2695 |
+
<input name="<?php echo self::$opt_oldspacing; ?>" id="<?php echo self::$opt_oldspacing; ?>" <?php checked($all[self::$opt_oldspacing], 1); ?> type="checkbox" class="checkbox">
|
2696 |
+
<label for="<?php echo self::$opt_oldspacing; ?>">
|
2697 |
+
<b class="chktitle">Legacy Spacing:</b> Continue the spacing style from version 4.0 and older. Those versions required you to manually add spacing above and below your video. Unchecking this will automatically add the spacing.
|
2698 |
+
</label>
|
2699 |
+
</p>
|
2700 |
+
<p>
|
2701 |
+
<input name="<?php echo self::$opt_debugmode; ?>" id="<?php echo self::$opt_debugmode; ?>" <?php checked($all[self::$opt_debugmode], 1); ?> type="checkbox" class="checkbox">
|
2702 |
+
<label for="<?php echo self::$opt_debugmode; ?>">
|
2703 |
+
<b class="chktitle">Debug Mode: <sup class="orange bold">NEW</sup></b> If you ask for support, we may ask you to turn on debug mode here.
|
2704 |
+
It may print out some diagnostic info so that we can help you solve your issue.
|
2705 |
+
</label>
|
2706 |
+
</p>
|
2707 |
+
</div>
|
2708 |
+
<div class="jumper" id="jumpgallery"></div>
|
2709 |
+
<h3 class="sect">Gallery Settings and Directions<sup class="orange bold">NEW</sup> <a href="#top" class="totop">▲ top</a></h3>
|
2710 |
+
<img class="ssgallery" src="<?php echo plugins_url('images/ssgallery.png', __FILE__) ?>">
|
2711 |
+
<p>
|
2712 |
+
<a target="_blank" href="<?php echo self::$epbase ?>/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx">You can now make playlist embeds (and channel-playlist embeds) have a gallery layout »</a>. <strong>First, you must obtain your YouTube API key</strong>.
|
2713 |
+
Don't worry, it's an easy process. Just <a href="https://www.youtube.com/watch?v=2vmBACVETf4" target="_blank">click this link »</a> and follow the video on that page to get your API key. Then paste it in the box below, and click the "Save Changes" button:
|
2714 |
+
</p>
|
2715 |
+
<p>
|
2716 |
+
Simply add the following parameter to the end of your playlist url:
|
2717 |
+
</p>
|
2718 |
+
<p><code>&layout=gallery</code></p>
|
2719 |
+
<p>For example, below is a playlist that has been converted into a gallery. Notice the new layout parameter, with no spaces:</p>
|
2720 |
+
<p>
|
2721 |
+
<code style="font-size: .9em;">http://www.youtube.com/watch?listType=playlist&width=474&height=266&list=UUAuUUnT6oDeKwE6v1NGQxug&plindex=0<b>&layout=gallery</b></code>
|
2722 |
+
</p>
|
2723 |
+
<p class="smallnote">
|
2724 |
+
Note: The PRO wizard has steps to fully create playlist, channel, and gallery codes like the above.
|
2725 |
+
</p>
|
2726 |
+
<p>
|
2727 |
+
Below are the settings for galleries:
|
2728 |
+
</p>
|
2729 |
+
<div class="ytindent chx">
|
2730 |
+
<p>
|
2731 |
+
<b class="chktitle">YouTube API Key:</b>
|
2732 |
+
<input type="text" name="<?php echo self::$opt_gallery_apikey; ?>" id="<?php echo self::$opt_gallery_apikey; ?>" value="<?php echo trim($all[self::$opt_apikey]); ?>" class="textinput" style="width: 250px;">
|
2733 |
+
Required so your site can get the thumbnails, title text, and other content from YouTube’s servers that used to render galleries. <a href="https://www.youtube.com/watch?v=2vmBACVETf4" target="_blank">Click this link »</a> and follow the video to the right to get your API key.
|
2734 |
+
</p>
|
2735 |
+
<p>
|
2736 |
+
<label for="<?php echo self::$opt_gallery_pagesize; ?>"><b class="chktitle">Gallery Page Size:</b></label>
|
2737 |
+
<select name="<?php echo self::$opt_gallery_pagesize; ?>" id="<?php echo self::$opt_gallery_pagesize; ?>" style="width: 60px;">
|
2738 |
+
<?php
|
2739 |
+
$gps_val = intval(trim($all[self::$opt_gallery_pagesize]));
|
2740 |
+
$gps_val = min($gps_val, 50);
|
2741 |
+
for ($gps = 1; $gps <= 50; $gps++)
|
2742 |
+
{
|
2743 |
+
?><option <?php echo $gps_val == $gps ? 'selected' : '' ?> value="<?php echo $gps ?>"><?php echo $gps ?></option>
|
2744 |
+
<?php
|
2745 |
+
}
|
2746 |
+
?>
|
2747 |
+
</select>
|
2748 |
+
Enter how many thumbnails per page should be shown at once (YouTube allows a maximum of 50 per page).
|
2749 |
+
</p>
|
2750 |
+
<p>
|
2751 |
+
<label for="<?php echo self::$opt_gallery_columns; ?>"><b class="chktitle">Number of Columns:</b></label>
|
2752 |
+
<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]); ?>">
|
2753 |
+
Enter how many thumbnails can fit per row.
|
2754 |
+
</p>
|
2755 |
+
<p>
|
2756 |
+
<input name="<?php echo self::$opt_gallery_customarrows; ?>" id="<?php echo self::$opt_gallery_customarrows; ?>" <?php checked($all[self::$opt_gallery_customarrows], 1); ?> type="checkbox" class="checkbox">
|
2757 |
+
<span id="boxcustomarrows">
|
2758 |
+
Previous Page: <input type="text" name="<?php echo self::$opt_gallery_customprev; ?>" id="<?php echo self::$opt_gallery_customprev; ?>" value="<?php echo esc_attr(trim($all[self::$opt_gallery_customprev])); ?>" class="textinput" style="width: 100px;">
|
2759 |
+
Next Page: <input type="text" name="<?php echo self::$opt_gallery_customnext; ?>" id="<?php echo self::$opt_gallery_customnext; ?>" value="<?php echo esc_attr(trim($all[self::$opt_gallery_customnext])); ?>" class="textinput" style="width: 100px;">
|
2760 |
+
</span>
|
2761 |
+
|
2762 |
+
<label for="<?php echo self::$opt_gallery_customarrows; ?>">
|
2763 |
+
<b class="chktitle">Custom Next/Previous Text:</b> If you want your gallery viewers to see something besides "Next" and "Prev" when browsing through thumbnails, enter your replacement text here. This feature can be quite useful for non-English sites. For example, a French site might replace Prev with Précédent and Next with Suivant.
|
2764 |
+
</label>
|
2765 |
+
</p>
|
2766 |
+
<p>
|
2767 |
+
<label for="<?php echo self::$opt_gallery_scrolloffset; ?>"><b class="chktitle">Scroll Offset:</b></label>
|
2768 |
+
<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]); ?>">
|
2769 |
+
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.
|
2770 |
+
</p>
|
2771 |
+
<p>
|
2772 |
+
<input name="<?php echo self::$opt_gallery_showtitle; ?>" id="<?php echo self::$opt_gallery_showtitle; ?>" <?php checked($all[self::$opt_gallery_showtitle], 1); ?> type="checkbox" class="checkbox">
|
2773 |
+
<label for="<?php echo self::$opt_gallery_showtitle; ?>"><b class="chktitle">Show Thumbnail Title:</b> Show titles with each thumbnail.</label>
|
2774 |
+
</p>
|
2775 |
+
|
2776 |
+
</div>
|
2777 |
+
|
2778 |
+
<?php // self::save_changes_button(); ?>
|
2779 |
+
|
2780 |
+
<div class="upgchecks">
|
2781 |
+
<h3 class="sect">PRO Features</h3>
|
2782 |
+
<?php
|
2783 |
+
if ($all[self::$opt_pro] && strlen(trim($all[self::$opt_pro])) > 5)
|
2784 |
+
{
|
2785 |
+
?>
|
2786 |
+
<p class="smallnote orange">Below are PRO features for enhanced SEO and performance (works for even past embed links). Gallery options for PRO users will also be listed here.</p>
|
2787 |
+
<p>
|
2788 |
+
<img class="ssaltgallery" src="<?php echo plugins_url('images/ssaltgalleryall.jpg', __FILE__) ?>" />
|
2789 |
+
<?php $cleanstyle = trim($all[self::$opt_gallery_style]); ?>
|
2790 |
+
<select name="<?php echo self::$opt_gallery_style; ?>" id="<?php echo self::$opt_gallery_style; ?>" >
|
2791 |
+
<option value="">Gallery Style</option>
|
2792 |
+
<option value="grid" <?php echo 'grid' === $cleanstyle ? 'selected' : '' ?> >Grid (default)</option>
|
2793 |
+
<option value="listview" <?php echo 'listview' === $cleanstyle ? 'selected' : '' ?> >Vertical List</option>
|
2794 |
+
<option value="carousel" <?php echo 'carousel' === $cleanstyle ? 'selected' : '' ?> >Horizontal Slider</option>
|
2795 |
+
</select>
|
2796 |
+
<label for="<?php echo self::$opt_gallery_style; ?>">
|
2797 |
+
<b>(PRO)</b> <b class="chktitle">Alternate Gallery Styling: <sup class="orange">NEW</sup></b></b>
|
2798 |
+
Switch from the grid style of the FREE version to another gallery style. Right now, we provide a vertical (single column) and horizontal (single row) list style as alternatives to the grid, with more designs coming. These current alternatives were inspired by the standard YouTube playlist player's "table of contents," except our gallery's video lists are always visible and shown under the playing video.
|
2799 |
+
<a target="_blank" href="<?php echo self::$epbase ?>/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx">Read more here »</a>
|
2800 |
+
</label>
|
2801 |
+
</p>
|
2802 |
+
<div class="hr"></div>
|
2803 |
+
<p>
|
2804 |
+
<img class="ssaltgallery" src="<?php echo plugins_url('images/ssverticallayout.png', __FILE__) ?>" />
|
2805 |
+
<input name="<?php echo self::$opt_gallery_showdsc; ?>" id="<?php echo self::$opt_gallery_showdsc; ?>" <?php checked($all[self::$opt_gallery_showdsc], 1); ?> type="checkbox" class="checkbox">
|
2806 |
+
<label for="<?php echo self::$opt_gallery_showdsc; ?>">
|
2807 |
+
<b>(PRO)</b> <b class="chktitle">Show Gallery Descriptions (for vertical list styling): </b>
|
2808 |
+
For the vertical list layout, this option will show full descriptions with each thumbnail (other layouts don't have enough room).
|
2809 |
+
</label>
|
2810 |
+
</p>
|
2811 |
+
<div class="hr"></div>
|
2812 |
+
|
2813 |
+
<p>
|
2814 |
+
<input name="<?php echo self::$opt_spdc; ?>" id="<?php echo self::$opt_spdc; ?>" <?php checked($all[self::$opt_spdc], 1); ?> type="checkbox" class="checkbox">
|
2815 |
+
<label for="<?php echo self::$opt_spdc; ?>">
|
2816 |
+
<b>(PRO)</b> <b class="chktitle">Faster Page Loads (Caching): </b>
|
2817 |
+
Use embed caching to speed up your page loads. By default, WordPress needs to request information from YouTube.com's servers for every video you embed, every time a page is loaded. These data requests can add time to your total page load time. Turn on this feature to cache that data (instead of having to request for the same information every time you load a page). This should then make your pages that have videos load faster. It's been noted that even small speed ups in page load can help increase visitor engagement, retention, and conversions. Caching also makes galleries run faster.
|
2818 |
+
</label>
|
2819 |
+
<div class="indent-option">
|
2820 |
+
<div id="boxspdc">
|
2821 |
+
<label>
|
2822 |
+
<b class="chktitle">Cache Liftime (hours): </b>
|
2823 |
+
<input name="<?php echo self::$opt_spdcexp; ?>" id="<?php echo self::$opt_spdcexp; ?>" value="<?php echo trim($all[self::$opt_spdcexp]); ?>" type="number" min="1"/>
|
2824 |
+
</label>
|
2825 |
+
Tip: If your pages rarely change, you may wish to set this to a much higher value than 24 hours.
|
2826 |
+
|
2827 |
+
<div class="pad20">
|
2828 |
+
<input type="button" class="button button-primary" value="Click to clear YouTube cache"/>
|
2829 |
+
<span style="display: none;" id="clearspdcloading" class="orange bold">Clearing...</span>
|
2830 |
+
<span class="orange bold" style="display: none;" id="clearspdcsuccess">Finished clearing YouTube cache.</span>
|
2831 |
+
<span class="orange bold" style="display: none;" id="clearspdcfailed">Sorry, there seemed to be a problem clearing the cache.</span>
|
2832 |
+
</div>
|
2833 |
+
</div>
|
2834 |
+
</div>
|
2835 |
+
</p>
|
2836 |
+
<div class="hr"></div>
|
2837 |
+
|
2838 |
+
<p>
|
2839 |
+
<input name="<?php echo self::$opt_schemaorg; ?>" id="<?php echo self::$opt_schemaorg; ?>" <?php checked($all[self::$opt_schemaorg], 1); ?> type="checkbox" class="checkbox">
|
2840 |
+
<label for="<?php echo self::$opt_schemaorg; ?>">
|
2841 |
+
<b>(PRO)</b> <b class="chktitle">Video SEO Tags:</b> Update your YouTube embeds with Google, Bing, and Yahoo friendly video SEO markup.
|
2842 |
+
</label>
|
2843 |
+
<span id="boxschemaorg">
|
2844 |
+
<span class="apikey-msg">
|
2845 |
+
The video SEO tags include data like the title, description, and thumbnail information of each video you embed. This plugin automatically extracts this data directly from YouTube using the version 3 API,
|
2846 |
+
which will soon replace the version 2 API. This particular API version requires that you obtain an API key so that YouTube can authenticate the requests. Don't worry, it's an easy process.
|
2847 |
+
Just <a href="https://developers.google.com/youtube/registering_an_application" target="_blank">click this link »</a> and follow the video to the right to get your API key. Then paste it in the box below, and click the "Save Changes" button:
|
2848 |
+
<br>
|
2849 |
+
<span style="vertical-align: middle; display: inline-block;">
|
2850 |
+
YouTube API Key: <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: 200px;">
|
2851 |
+
</span>
|
2852 |
+
</span>
|
2853 |
+
<span class="apikey-video">
|
2854 |
+
<iframe width="384" height="216" src="https://www.youtube.com/embed/2vmBACVETf4?rel=0" frameborder="0" allowfullscreen></iframe>
|
2855 |
+
</span>
|
2856 |
+
</span>
|
2857 |
+
</p>
|
2858 |
+
<div class="hr"></div>
|
2859 |
+
<p>
|
2860 |
+
<input name="<?php echo self::$opt_dynload; ?>" id="<?php echo self::$opt_dynload; ?>" <?php checked($all[self::$opt_dynload], 1); ?> type="checkbox" class="checkbox">
|
2861 |
+
<span id="boxdyn">
|
2862 |
+
Animation:
|
2863 |
+
<?php $cleandyn = trim($all[self::$opt_dyntype]); ?>
|
2864 |
+
<select name="<?php echo self::$opt_dyntype; ?>" id="<?php echo self::$opt_dyntype; ?>" >
|
2865 |
+
<option value="">Select type</option>
|
2866 |
+
<option value="rotateIn" <?php echo 'rotateIn' === $cleandyn ? 'selected' : '' ?> >rotate in</option>
|
2867 |
+
<option value="slideInRight" <?php echo 'slideInRight' === $cleandyn ? 'selected' : '' ?> >slide from right</option>
|
2868 |
+
<option value="slideInLeft" <?php echo 'slideInLeft' === $cleandyn ? 'selected' : '' ?> >slide from left</option>
|
2869 |
+
<option value="bounceIn" <?php echo 'bounceIn' === $cleandyn ? 'selected' : '' ?> >bounce in</option>
|
2870 |
+
<option value="flipInX" <?php echo 'flipInX' === $cleandyn ? 'selected' : '' ?> >flip up/down</option>
|
2871 |
+
<option value="flipInY" <?php echo 'flipInY' === $cleandyn ? 'selected' : '' ?> >flip left/right</option>
|
2872 |
+
<option value="pulse" <?php echo 'pulse' === $cleandyn ? 'selected' : '' ?> >pulse</option>
|
2873 |
+
<option value="tada" <?php echo 'tada' === $cleandyn ? 'selected' : '' ?> >jiggle</option>
|
2874 |
+
<option value="fadeInDown" <?php echo 'fadeInDown' === $cleandyn ? 'selected' : '' ?> >fade in downward</option>
|
2875 |
+
<option value="fadeInUp" <?php echo 'fadeInUp' === $cleandyn ? 'selected' : '' ?> >fade in upward</option>
|
2876 |
+
<option value="zoomInDown" <?php echo 'zoomInDown' === $cleandyn ? 'selected' : '' ?> >zoom in downward</option>
|
2877 |
+
<option value="zoomInUp" <?php echo 'zoomInUp' === $cleandyn ? 'selected' : '' ?> >zoom in upward</option>
|
2878 |
+
</select>
|
2879 |
+
</span>
|
2880 |
+
<label for="<?php echo self::$opt_dynload; ?>">
|
2881 |
+
<b>(PRO)</b> <b class="chktitle">Special Lazy-Loading Effects:</b>
|
2882 |
+
Add eye-catching special effects that will make your YouTube embeds bounce, flip, pulse, or slide as they lazy load on the screen. Check this box to select your desired effect. <a target="_blank" href="<?php echo self::$epbase ?>/add-special-effects-to-youtube-embeds-in-wordpress.aspx">Read more here »</a>
|
2883 |
+
</label>
|
2884 |
+
</p>
|
2885 |
+
<div class="hr"></div>
|
2886 |
+
<p>
|
2887 |
+
<img class="ssfb" src="<?php echo plugins_url('images/ssfb.jpg', __FILE__) ?>" />
|
2888 |
+
<input name="<?php echo self::$opt_ogvideo; ?>" id="<?php echo self::$opt_ogvideo; ?>" <?php checked($all[self::$opt_ogvideo], 1); ?> type="checkbox" class="checkbox">
|
2889 |
+
<label for="<?php echo self::$opt_ogvideo; ?>">
|
2890 |
+
<b>(PRO)</b> <b class="chktitle">Facebook Open Graph Markup:</b> 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.
|
2891 |
+
</label>
|
2892 |
+
</p>
|
2893 |
+
<div class="hr"></div>
|
2894 |
+
<p>
|
2895 |
+
<img class="ssfb" src="<?php echo plugins_url('images/youtube_thumbnail_sample.jpg', __FILE__) ?>" />
|
2896 |
+
<input name="<?php echo self::$opt_ftpostimg; ?>" id="<?php echo self::$opt_ftpostimg; ?>" <?php checked($all[self::$opt_ftpostimg], 1); ?> type="checkbox" class="checkbox">
|
2897 |
+
<label for="<?php echo self::$opt_ftpostimg; ?>">
|
2898 |
+
<b>(PRO)</b> <b class="chktitle">Automatic Video Thumbnails: </b>
|
2899 |
+
Automatically grab the thumbnail image of the first video embedded in each post or page, and use it as the featured image. If your theme can display featured images of posts on your blog home, you’ll see the thumbnails there as shown in the picture on the right. All you have to do is click Update on a post or page and the plugin does the rest!
|
2900 |
+
(Example shown on the right) <a target="_blank" href="<?php echo self::$epbase ?>/add-youtube-video-thumbnails-featured-image-wordpress.aspx">Watch example here »</a>
|
2901 |
+
</label>
|
2902 |
+
</p>
|
2903 |
+
|
2904 |
+
<?php
|
2905 |
+
}
|
2906 |
+
else
|
2907 |
+
{
|
2908 |
+
?>
|
2909 |
+
<p class="smallnote orange">Below are PRO features for enhanced SEO and performance (works for even past embed links). </p>
|
2910 |
+
<p>
|
2911 |
+
<img class="ssaltgallery" src="<?php echo plugins_url('images/ssaltgalleryall.jpg', __FILE__) ?>" />
|
2912 |
+
<select disabled>
|
2913 |
+
<option value="">Gallery Style</option>
|
2914 |
+
</select>
|
2915 |
+
<label>
|
2916 |
+
<b>(PRO)</b> <b class="chktitle">Alternate Gallery Styling: <sup class="orange">NEW</sup></b> <span class="pronon">(PRO Users)</span>
|
2917 |
+
Switch from the grid style of the FREE version to another gallery style. Right now, we provide a vertical (single column) and horizontal (single row) list style as alternatives to the grid, with more designs coming. These current alternatives were inspired by the standard YouTube playlist player's "table of contents," except our gallery's video lists are always visible and shown under the playing video.
|
2918 |
+
<a target="_blank" href="<?php echo self::$epbase ?>/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx">Read more here »</a>
|
2919 |
+
</label>
|
2920 |
+
</p>
|
2921 |
+
|
2922 |
+
<div class="hr"></div>
|
2923 |
+
<p>
|
2924 |
+
<input disabled type="checkbox" class="checkbox">
|
2925 |
+
<label>
|
2926 |
+
<b class="chktitle">Show Gallery Descriptions (for vertical list styling): </b> <span class="pronon">(PRO Users)</span>
|
2927 |
+
For the vertical list layout, this option will show full descriptions with each thumbnail (other layouts don't have enough room).
|
2928 |
+
</label>
|
2929 |
+
</p>
|
2930 |
+
|
2931 |
+
|
2932 |
+
<div class="hr"></div>
|
2933 |
+
<p>
|
2934 |
+
<input disabled type="checkbox" class="checkbox">
|
2935 |
+
<label>
|
2936 |
+
<b class="chktitle">Faster Page Loads (Caching): </b> <span class="pronon">(PRO Users)</span>
|
2937 |
+
Use embed caching to speed up your page loads. By default, WordPress needs to request information from YouTube.com's servers for every video you embed, every time a page is loaded. These data requests can add time to your total page load time. Turn on this feature to cache that data (instead of having to request for the same information every time you load a page). This should then make your pages that have videos load faster. It's been noted that even small speed ups in page load can help increase visitor engagement, retention, and conversions. Caching also makes galleries run faster.
|
2938 |
+
</label>
|
2939 |
+
<div class="indent-option">
|
2940 |
+
<label>
|
2941 |
+
<b class="chktitle">Cache Liftime (hours): </b>
|
2942 |
+
<input disabled value="24" type="number">
|
2943 |
+
Tip: If your pages rarely change, you may wish to set this to a much higher value than 24 hours.
|
2944 |
+
</label>
|
2945 |
+
</div>
|
2946 |
+
</p>
|
2947 |
+
<div class="hr"></div>
|
2948 |
+
|
2949 |
+
|
2950 |
+
<p>
|
2951 |
+
<input disabled type="checkbox" class="checkbox">
|
2952 |
+
<label>
|
2953 |
+
<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.
|
2954 |
+
</label>
|
2955 |
+
</p>
|
2956 |
+
<div class="hr"></div>
|
2957 |
+
<p>
|
2958 |
+
<input disabled type="checkbox" class="checkbox">
|
2959 |
+
<label>
|
2960 |
+
<b class="chktitle">Special Loading Effects:</b> <span class="pronon">(PRO Users)</span>
|
2961 |
+
Add eye-catching special effects that will make your YouTube embeds bounce, flip, pulse, or slide as they load on the screen. Check this box to select your desired effect. <a target="_blank" href="<?php echo self::$epbase ?>/add-special-effects-to-youtube-embeds-in-wordpress.aspx">Read more here »</a>
|
2962 |
+
</label>
|
2963 |
+
</p>
|
2964 |
+
<div class="hr"></div>
|
2965 |
+
<p>
|
2966 |
+
<img class="ssfb" src="<?php echo plugins_url('images/ssfb.jpg', __FILE__) ?>" />
|
2967 |
+
<input disabled type="checkbox" class="checkbox">
|
2968 |
+
<label>
|
2969 |
+
<b class="chktitle">Facebook Open Graph Markup:</b> <span class="pronon">(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.
|
2970 |
+
</label>
|
2971 |
+
</p>
|
2972 |
+
<div class="hr"></div>
|
2973 |
+
<p>
|
2974 |
+
<img class="ssfb" src="<?php echo plugins_url('images/youtube_thumbnail_sample.jpg', __FILE__) ?>" />
|
2975 |
+
<input disabled type="checkbox" class="checkbox">
|
2976 |
+
<label>
|
2977 |
+
<b class="chktitle">Automatic Video Thumbnails:</b> <span class="pronon">(PRO Users)</span>
|
2978 |
+
Automatically grab the thumbnail image of the first video embedded in each post or page, and use it as the featured image.
|
2979 |
+
All you have to do is click Update on a post or page and the plugin does the rest!
|
2980 |
+
(Example shown on the right) <a target="_blank" href="<?php echo self::$epbase ?>/add-youtube-video-thumbnails-featured-image-wordpress.aspx">Read more here »</a>
|
2981 |
+
</label>
|
2982 |
+
</p>
|
2983 |
+
<div class="hr"></div>
|
2984 |
+
<p>
|
2985 |
+
<a href="<?php echo self::$epbase ?>/dashboard/pro-easy-video-analytics.aspx" target="_blank">Activate the above and several other features »</a>
|
2986 |
+
</p>
|
2987 |
+
<?php
|
2988 |
+
}
|
2989 |
+
?>
|
2990 |
+
<div class="clearboth"></div>
|
2991 |
+
</div>
|
2992 |
+
<?php // self::save_changes_button(); ?>
|
2993 |
+
|
2994 |
+
<hr>
|
2995 |
+
|
2996 |
+
|
2997 |
+
<div class="jumper" id="jumpoverride"></div>
|
2998 |
+
|
2999 |
+
<h3 class="sect">
|
3000 |
+
<?php _e("How To Override Defaults / Other Options") ?> <a href="#top" class="totop">▲ top</a>
|
3001 |
+
</h3>
|
3002 |
+
<p>Suppose you have a few videos that need to be different from the above defaults. You can add options to the end of a link as displayed below to override the above defaults. Each option should begin with '&'.
|
3003 |
+
<br><span class="smallnote orange">PRO users: You can use the <a href="<?php echo self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=protab' ?>" target="_blank" class="button-primary cuz">► Customize</a> button that you will see inside the wizard, instead of memorizing the following.</span>
|
3004 |
+
<?php
|
3005 |
+
_e('<ul>');
|
3006 |
+
_e("<li><strong>width</strong> - Sets the width of your player. If omitted, the default width will be the width of your theme's content.<em> Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&width=500</strong>&height=350</em></li>");
|
3007 |
+
_e("<li><strong>height</strong> - Sets the height of your player. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA&width=500<strong>&height=350</strong></em> </li>");
|
3008 |
+
_e("<li><strong>autoplay</strong> - Set this to 1 to autoplay the video (or 0 to play the video once). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&autoplay=1</strong></em> </li>");
|
3009 |
+
_e("<li><strong>cc_load_policy</strong> - Set this to 1 to turn on closed captioning (or 0 to leave them off). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&cc_load_policy=1</strong></em> </li>");
|
3010 |
+
_e("<li><strong>iv_load_policy</strong> - Set this to 3 to turn off annotations (or 1 to show them). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&iv_load_policy=3</strong></em> </li>");
|
3011 |
+
_e("<li><strong>loop</strong> - Set this to 1 to loop the video (or 0 to not loop). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&loop=1</strong></em> </li>");
|
3012 |
+
_e("<li><strong>modestbranding</strong> - Set this to 1 to remove the YouTube logo while playing (or 0 to show the logo). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&modestbranding=1</strong></em> </li>");
|
3013 |
+
_e("<li><strong>rel</strong> - Set this to 0 to not show related videos at the end of playing (or 1 to show them). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&rel=0</strong></em> </li>");
|
3014 |
+
_e("<li><strong>showinfo</strong> - Set this to 0 to hide the video title and other info (or 1 to show it). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&showinfo=0</strong></em> </li>");
|
3015 |
+
_e("<li><strong>theme</strong> - Set this to 'light' to make the player have the light-colored theme (or 'dark' for the dark theme). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&theme=light</strong></em> </li>");
|
3016 |
+
_e("<li><strong>color</strong> - Set this to 'white' to make the player have a white progress bar (or 'red' for a red progress bar). Note: Using white will disable the modestbranding option. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&color=white</strong></em> </li>");
|
3017 |
+
_e("<li><strong>vq</strong> - Set this to 'hd720' or 'hd1080' to force the video to have HD quality. Leave blank to let YouTube decide. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&vq=hd720</strong></em> </li>");
|
3018 |
+
_e("<li><strong>controls</strong> - Set this to 0 to completely hide the video controls (or 2 to show it). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&controls=0</strong></em> </li>");
|
3019 |
+
_e("<li><strong>autohide</strong> - Set this to 1 to slide away the control bar after the video starts playing. It will automatically slide back in again if you mouse over the video. (Set to 2 to always show it). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&autohide=1</strong></em> </li>");
|
3020 |
+
_e("<li><strong>playsinline</strong> - Set this to 1 to allow videos play inline with the page on iOS browsers. (Set to 0 to have iOS launch videos in fullscreen instead). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&playsinline=1</strong></em> </li>");
|
3021 |
+
_e("<li><strong>origin</strong> - Set this to 1 to add the 'origin' parameter for extra JavaScript security. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&origin=1</strong></em> </li>");
|
3022 |
+
_e('</ul>');
|
3023 |
+
|
3024 |
+
_e("<p>You can also start and end each individual video at particular times. Like the above, each option should begin with '&'</p>");
|
3025 |
+
_e('<ul>');
|
3026 |
+
_e("<li><strong>start</strong> - Sets the time (in seconds) to start the video. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350<strong>&start=20</strong></em> </li>");
|
3027 |
+
_e("<li><strong>end</strong> - Sets the time (in seconds) to stop the video. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350<strong>&end=100</strong></em> </li>");
|
3028 |
+
_e('</ul>');
|
3029 |
+
?>
|
3030 |
+
<div class="save-changes-follow"> <?php self::save_changes_button(isset($_POST[$ytprefs_submitted]) && $_POST[$ytprefs_submitted] == 'Y'); ?> </div>
|
3031 |
+
</form>
|
3032 |
+
<div class="jumper" id="jumppro"></div>
|
3033 |
+
<div id="goprobox">
|
3034 |
+
<?php
|
3035 |
+
if ($all[self::$opt_pro] && strlen(trim($all[self::$opt_pro])) > 0)
|
3036 |
+
{
|
3037 |
+
echo "<h3>" . __('Thank you for going PRO.');
|
3038 |
+
echo ' <input type="submit" name="showkey" class="button-primary" style="vertical-align: 15%;" id="showprokey" value="View my PRO key" />';
|
3039 |
+
echo "</h3>";
|
3040 |
+
?>
|
3041 |
+
<?php
|
3042 |
+
}
|
3043 |
+
else
|
3044 |
+
{
|
3045 |
+
?>
|
3046 |
+
|
3047 |
+
<h3 class="sect">
|
3048 |
+
<a href="<?php echo self::$epbase ?>/dashboard/pro-easy-video-analytics.aspx" class="button-primary" target="_blank">Want to go PRO? (Low Prices) »</a>
|
3049 |
+
PRO users help keep new features coming and our coffee cups filled. Go PRO and get these perks in return:
|
3050 |
+
</h3>
|
3051 |
+
<div class="procol">
|
3052 |
+
<ul class="gopro">
|
3053 |
+
<li>
|
3054 |
+
<img src="<?php echo plugins_url('images/iconcache.png', __FILE__) ?>">
|
3055 |
+
Faster Page Loads (Caching)
|
3056 |
+
</li>
|
3057 |
+
<li>
|
3058 |
+
<img src="<?php echo plugins_url('images/iconwizard.png', __FILE__) ?>">
|
3059 |
+
Full Visual Embedding Wizard (Easily customize embeds without memorizing codes)
|
3060 |
+
</li>
|
3061 |
+
<li>
|
3062 |
+
<img src="<?php echo plugins_url('images/icongallery.png', __FILE__) ?>">
|
3063 |
+
Alternate Gallery Styling
|
3064 |
+
</li>
|
3065 |
+
<li>
|
3066 |
+
<img src="<?php echo plugins_url('images/iconfx.png', __FILE__) ?>">
|
3067 |
+
Add eye-catching special effects as your videos load
|
3068 |
+
</li>
|
3069 |
+
<li>
|
3070 |
+
<img src="<?php echo plugins_url('images/deletechecker.png', __FILE__) ?>">
|
3071 |
+
Deleted Video Checker (alerts you if YouTube deletes videos you embedded)
|
3072 |
+
</li>
|
3073 |
+
<li>
|
3074 |
+
<img src="<?php echo plugins_url('images/globe.png', __FILE__) ?>">
|
3075 |
+
Alerts when visitors from different countries are blocked from viewing your embeds
|
3076 |
+
</li>
|
3077 |
+
<li>
|
3078 |
+
<img src="<?php echo plugins_url('images/mobilecompat.png', __FILE__) ?>">
|
3079 |
+
Check if your embeds have restrictions that can block mobile viewing
|
3080 |
+
</li>
|
3081 |
+
|
3082 |
+
</ul>
|
3083 |
+
</div>
|
3084 |
+
<div class="procol" style="max-width: 465px;">
|
3085 |
+
<ul class="gopro">
|
3086 |
+
<li>
|
3087 |
+
<img src="<?php echo plugins_url('images/videothumbs.png', __FILE__) ?>">
|
3088 |
+
Automatic video thumbnail images (just click 'Update')
|
3089 |
+
</li>
|
3090 |
+
<li>
|
3091 |
+
<img src="<?php echo plugins_url('images/prioritysupport.png', __FILE__) ?>">
|
3092 |
+
Priority support (Puts your request in front)
|
3093 |
+
</li>
|
3094 |
+
<li>
|
3095 |
+
<img src="<?php echo plugins_url('images/bulletgraph45.png', __FILE__) ?>">
|
3096 |
+
User-friendly video analytics dashboard
|
3097 |
+
</li>
|
3098 |
+
|
3099 |
+
<li id="fbstuff">
|
3100 |
+
<img src="<?php echo plugins_url('images/iconfb.png', __FILE__) ?>">
|
3101 |
+
Automatic Open Graph tagging for Facebook
|
3102 |
+
</li>
|
3103 |
+
<!-- <li>
|
3104 |
+
<img src="<?php echo plugins_url('images/iconythealth.png', __FILE__) ?>">
|
3105 |
+
Instant YouTube embed diagnostic reports
|
3106 |
+
</li> -->
|
3107 |
+
<li>
|
3108 |
+
<img src="<?php echo plugins_url('images/vseo.png', __FILE__) ?>">
|
3109 |
+
Automatic tagging for video SEO (will even work for your old embeds)
|
3110 |
+
</li>
|
3111 |
+
<li>
|
3112 |
+
<img src="<?php echo plugins_url('images/iconvolume.png', __FILE__) ?>">
|
3113 |
+
Fine-Grained Volume Initialization – Individual video volume settings in the wizard
|
3114 |
+
</li>
|
3115 |
+
|
3116 |
+
<li>
|
3117 |
+
<img src="<?php echo plugins_url('images/infinity.png', __FILE__) ?>">
|
3118 |
+
Unlimited PRO upgrades and downloads
|
3119 |
+
</li>
|
3120 |
+
<!-- <li>
|
3121 |
+
<img src="<?php echo plugins_url('images/questionsale.png', __FILE__) ?>">
|
3122 |
+
What else? You tell us!
|
3123 |
+
</li> -->
|
3124 |
+
</ul>
|
3125 |
+
</div>
|
3126 |
+
<div style="clear: both;"></div>
|
3127 |
+
<br>
|
3128 |
+
<h3 class="bold">Enter and save your PRO key (emailed to you):</h3>
|
3129 |
+
<?php } ?>
|
3130 |
+
<form name="form2" method="post" action="" id="epform2" class="submitpro" <?php
|
3131 |
+
if ($all[self::$opt_pro] && strlen(trim($all[self::$opt_pro])) > 0)
|
3132 |
+
{
|
3133 |
+
echo 'style="display: none;"';
|
3134 |
+
}
|
3135 |
+
?>>
|
3136 |
+
|
3137 |
+
<input name="<?php echo self::$opt_pro; ?>" id="opt_pro" value="<?php echo $all[self::$opt_pro]; ?>" type="text">
|
3138 |
+
<input type="submit" name="Submit" class="button-primary" id="prokeysubmit" value="<?php _e('Save Key') ?>" />
|
3139 |
+
<?php
|
3140 |
+
if (!($all[self::$opt_pro] && strlen(trim($all[self::$opt_pro])) > 0))
|
3141 |
+
{
|
3142 |
+
?>
|
3143 |
+
<span style="font-size: 25px; color: #cccccc;">|</span> <a href="<?php echo self::$epbase ?>/dashboard/pro-easy-video-analytics.aspx" class="button-primary brightpro" target="_blank">Click here to go PRO »</a>
|
3144 |
+
<?php
|
3145 |
+
}
|
3146 |
+
?>
|
3147 |
+
<br>
|
3148 |
+
<span style="display: none;" id="prokeyloading" class="orange bold">Verifying...</span>
|
3149 |
+
<span class="orange bold" style="display: none;" id="prokeysuccess">Success! Please refresh this page.</span>
|
3150 |
+
<span class="orange bold" style="display: none;" id="prokeyfailed">Sorry, that seems to be an invalid key, or it has been used already.</span>
|
3151 |
+
|
3152 |
+
</form>
|
3153 |
+
|
3154 |
+
</div>
|
3155 |
+
<div class="smallnote">
|
3156 |
+
<!-- *Upcoming: We've started developing a feature that will recommend YouTube embeds that you might want to include in a post while you're actually<br>
|
3157 |
+
writing/editing. It will apply some experimental artificial intelligence techniques on your post content for these recommendations, all at the click of a button.
|
3158 |
+
-->
|
3159 |
+
</div>
|
3160 |
+
<div class="jumper" id="jumpsupport"></div>
|
3161 |
+
<div id="nonprosupport">
|
3162 |
+
<h3 class="bold">Support tips for all users (Free and PRO)</h3>
|
3163 |
+
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:
|
3164 |
+
<ul class="reglist">
|
3165 |
+
<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>
|
3166 |
+
<li>Make sure the URL is not an active hyperlink (i.e., it should just be plain text). Otherwise, highlight the URL and click the "unlink" button in your editor: <img src="<?php echo plugins_url('images/unlink.png', __FILE__) ?>"/>.</li>
|
3167 |
+
<li>Make sure you did <strong>not</strong> format or align the URL in any way. If your URL still appears in your actual post instead of a video, highlight it and click the "remove formatting" button (formatting can be invisible sometimes): <img src="<?php echo plugins_url('images/erase.png', __FILE__) ?>"/></li>
|
3168 |
+
<li>Try wrapping the URL with the <code>[embedyt]...[/embedyt]</code> shortcode. For example: <code>[embedyt]http://www.youtube.com/watch?v=ABCDEFGHIJK[/embedyt]</code> Using the shortcode also allows you to have two or more videos next to each other on the same line. Just put the shortcoded links together on the same line. For example:<br>
|
3169 |
+
<code>[embedyt]http://www.youtube.com/watch?v=ABCDEF&width=400&height=250[/embedyt] [embedyt]http://www.youtube.com/watch?v=GHIJK&width=400&height=250[/embedyt]</code>
|
3170 |
+
<br> TIP: As shown above, decrease the size of each video so that they fit together on the same line (See the "How To Override Defaults" section for height and width instructions)
|
3171 |
+
</li>
|
3172 |
+
<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 Fourteen") 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>
|
3173 |
+
<li>If your videos always appear full size, try turning off "Responsive video sizing."</li>
|
3174 |
+
<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>
|
3175 |
+
</ul>
|
3176 |
+
<p>
|
3177 |
+
Deactivating the No Cookies option has also been proven to solve player errors.
|
3178 |
+
</p>
|
3179 |
+
<p>
|
3180 |
+
We also have a YouTube channel. We use it to provide users with some helper videos and a way to keep updated on new features as they are introduced. <a href="https://www.youtube.com/subscription_center?add_user=EmbedPlus" target="_blank">Subscribe for tips and updates here »</a>
|
3181 |
+
</p>
|
3182 |
+
</div>
|
3183 |
+
<br>
|
3184 |
+
<h3 class="sect">
|
3185 |
+
Priority Support <span class="pronon">(<a href="<?php echo self::$epbase ?>/dashboard/pro-easy-video-analytics.aspx" target="_blank">PRO Users »</a>)</span><a href="#top" class="totop">▲ top</a>
|
3186 |
+
</h3>
|
3187 |
+
<p>
|
3188 |
+
<strong>PRO users:</strong> Below, We've enabled the ability to have priority support with our team. Use this to get one-on-one help with any issues you might have or to send us suggestions for future features. We typically respond within minutes during normal work hours. We're always happy to accept any testimonials you might have as well.
|
3189 |
+
</p>
|
3190 |
+
|
3191 |
+
|
3192 |
+
<iframe src="<?php echo self::$epbase ?>/dashboard/prosupport.aspx?simple=1&prokey=<?php echo $all[self::$opt_pro]; ?>&domain=<?php echo site_url(); ?>" width="500" height="<?php echo ($all[self::$opt_pro] && strlen(trim($all[self::$opt_pro])) > 0) ? "500" : "140"; ?>"></iframe>
|
3193 |
+
|
3194 |
+
<?php
|
3195 |
+
if (!($all[self::$opt_pro] && strlen(trim($all[self::$opt_pro])) > 0))
|
3196 |
+
{
|
3197 |
+
?>
|
3198 |
+
<br>
|
3199 |
+
<br>
|
3200 |
+
<iframe src="<?php echo self::$epbase ?>/dashboard/likecoupon.aspx" width="600" height="500"></iframe>
|
3201 |
+
<?php }
|
3202 |
+
?>
|
3203 |
+
<div class="ytnav">
|
3204 |
+
<a href="#jumphowto">How To Embed</a>
|
3205 |
+
<a href="#jumpwiz">Visual Wizard</a>
|
3206 |
+
<a href="#jumpdefaults">Defaults</a>
|
3207 |
+
<a href="#jumpcompat">Compatibility</a>
|
3208 |
+
<a href="#jumpgallery">Gallery Settings</a>
|
3209 |
+
<a href="#jumpoverride">How To Override Defaults</a>
|
3210 |
+
<a target="_blank" href="<?php echo self::$epbase . "/dashboard/pro-easy-video-analytics.aspx?ref=protab" ?>" style="border-color: #888888;">Upgrade?</a>
|
3211 |
+
<a href="#jumpsupport">Support</a>
|
3212 |
+
</div>
|
3213 |
+
|
3214 |
+
|
3215 |
+
<script type="text/javascript">
|
3216 |
+
|
3217 |
+
function savevalidate()
|
3218 |
+
{
|
3219 |
+
var valid = true;
|
3220 |
+
var alertmessage = '';
|
3221 |
+
if (jQuery("#<?php echo self::$opt_defaultdims; ?>").is(":checked"))
|
3222 |
+
{
|
3223 |
+
if (!(jQuery.isNumeric(jQuery.trim(jQuery("#<?php echo self::$opt_defaultwidth; ?>").val())) &&
|
3224 |
+
jQuery.isNumeric(jQuery.trim(jQuery("#<?php echo self::$opt_defaultheight; ?>").val()))))
|
3225 |
+
{
|
3226 |
+
alertmessage += "Please enter valid numbers for default height and width, or uncheck the option.";
|
3227 |
+
jQuery("#boxdefaultdims input").css("background-color", "#ffcccc").css("border", "2px solid #000000");
|
3228 |
+
valid = false;
|
3229 |
+
}
|
3230 |
+
}
|
3231 |
+
|
3232 |
+
if (jQuery("#<?php echo self::$opt_gallery_customarrows; ?>").is(":checked"))
|
3233 |
+
{
|
3234 |
+
if (!jQuery.trim(jQuery("#<?php echo self::$opt_gallery_customprev; ?>").val()) ||
|
3235 |
+
!jQuery.trim(jQuery("#<?php echo self::$opt_gallery_customnext; ?>").val()))
|
3236 |
+
{
|
3237 |
+
alertmessage += "Please enter valid text for both the custom gallery Prev and Next buttons, or uncheck the option.";
|
3238 |
+
jQuery("#boxcustomarrows input").css("background-color", "#ffcccc").css("border", "2px solid #000000");
|
3239 |
+
valid = false;
|
3240 |
+
}
|
3241 |
+
}
|
3242 |
+
|
3243 |
+
if (jQuery("#<?php echo self::$opt_defaultvol; ?>").is(":checked"))
|
3244 |
+
{
|
3245 |
+
if (!(jQuery.isNumeric(jQuery.trim(jQuery("#<?php echo self::$opt_vol; ?>").val()))))
|
3246 |
+
{
|
3247 |
+
alertmessage += "Please enter a number between 0 and 100 for the default volume, or uncheck the option.";
|
3248 |
+
jQuery("#boxdefaultvol input").css("background-color", "#ffcccc").css("border", "2px solid #000000");
|
3249 |
+
valid = false;
|
3250 |
+
}
|
3251 |
+
}
|
3252 |
+
|
3253 |
+
if (jQuery("#<?php echo self::$opt_spdc; ?>").is(":checked"))
|
3254 |
+
{
|
3255 |
+
if (!(jQuery.isNumeric(jQuery.trim(jQuery("#<?php echo self::$opt_spdcexp; ?>").val()))))
|
3256 |
+
{
|
3257 |
+
alertmessage += "Please enter a valid number of hours (greater than 0) for the cache lifetime, or uncheck the option.";
|
3258 |
+
jQuery("#boxspdc input[type=number], #boxspdc input[type=text]").css("background-color", "#ffcccc").css("border", "2px solid #000000");
|
3259 |
+
valid = false;
|
3260 |
+
}
|
3261 |
+
}
|
3262 |
+
|
3263 |
+
|
3264 |
+
|
3265 |
+
if (jQuery("#<?php echo self::$opt_schemaorg; ?>").is(":checked"))
|
3266 |
+
{
|
3267 |
+
if (!(jQuery.trim(jQuery("#<?php echo self::$opt_apikey; ?>").val()).length > 0))
|
3268 |
+
{
|
3269 |
+
alertmessage += "Please enter a valid YouTube API key, or uncheck the 'Video SEO Tags' option.";
|
3270 |
+
jQuery("#boxschemaorg input").css("background-color", "#ffcccc").css("border", "2px solid #000000");
|
3271 |
+
valid = false;
|
3272 |
+
}
|
3273 |
+
}
|
3274 |
+
|
3275 |
+
|
3276 |
+
|
3277 |
+
if (jQuery("#<?php echo self::$opt_dynload; ?>").is(":checked"))
|
3278 |
+
{
|
3279 |
+
if (!(/^[A-Za-z-]+$/.test(jQuery.trim(jQuery("#<?php echo self::$opt_dyntype; ?>").val()))))
|
3280 |
+
{
|
3281 |
+
alertmessage += "Please select an animation, or uncheck the option.";
|
3282 |
+
jQuery("#boxdyn select").css("background-color", "#ffcccc").css("border", "2px solid #000000");
|
3283 |
+
valid = false;
|
3284 |
+
}
|
3285 |
+
}
|
3286 |
+
|
3287 |
+
|
3288 |
+
|
3289 |
+
|
3290 |
+
// if (jQuery("#<?php echo self::$opt_dohl; ?>").is(":checked"))
|
3291 |
+
// {
|
3292 |
+
// if (!(/^[A-Za-z][A-Za-z]$/.test(jQuery.trim(jQuery("#<?php echo self::$opt_hl; ?>").val()))))
|
3293 |
+
// {
|
3294 |
+
// alertmessage += "Please enter a valid 2-letter language code.";
|
3295 |
+
// jQuery("#boxdohl input").css("background-color", "#ffcccc").css("border", "2px solid #000000");
|
3296 |
+
// valid = false;
|
3297 |
+
// }
|
3298 |
+
// }
|
3299 |
+
|
3300 |
+
if (!valid)
|
3301 |
+
{
|
3302 |
+
alert(alertmessage);
|
3303 |
+
}
|
3304 |
+
return valid;
|
3305 |
+
}
|
3306 |
+
|
3307 |
+
var prokeyval;
|
3308 |
+
var mydomain = escape("http://" + window.location.host.toString());
|
3309 |
+
|
3310 |
+
jQuery(document).ready(function ($) {
|
3311 |
+
jQuery('#<?php echo self::$opt_defaultdims; ?>').change(function ()
|
3312 |
+
{
|
3313 |
+
if (jQuery(this).is(":checked"))
|
3314 |
+
{
|
3315 |
+
jQuery("#boxdefaultdims").show(500);
|
3316 |
+
}
|
3317 |
+
else
|
3318 |
+
{
|
3319 |
+
jQuery("#boxdefaultdims").hide(500);
|
3320 |
+
}
|
3321 |
+
|
3322 |
+
});
|
3323 |
+
|
3324 |
+
jQuery('#<?php echo self::$opt_gallery_customarrows; ?>').change(function ()
|
3325 |
+
{
|
3326 |
+
if (jQuery(this).is(":checked"))
|
3327 |
+
{
|
3328 |
+
jQuery("#boxcustomarrows").show(500);
|
3329 |
+
}
|
3330 |
+
else
|
3331 |
+
{
|
3332 |
+
jQuery("#boxcustomarrows").hide(500);
|
3333 |
+
}
|
3334 |
+
|
3335 |
+
});
|
3336 |
+
|
3337 |
+
jQuery('#<?php echo self::$opt_dynload; ?>').change(function ()
|
3338 |
+
{
|
3339 |
+
if (jQuery(this).is(":checked"))
|
3340 |
+
{
|
3341 |
+
jQuery("#boxdyn").show(500);
|
3342 |
+
}
|
3343 |
+
else
|
3344 |
+
{
|
3345 |
+
jQuery("#boxdyn").hide(500);
|
3346 |
+
}
|
3347 |
+
|
3348 |
+
});
|
3349 |
+
|
3350 |
+
jQuery('#<?php echo self::$opt_spdc; ?>').change(function ()
|
3351 |
+
{
|
3352 |
+
if (jQuery(this).is(":checked"))
|
3353 |
+
{
|
3354 |
+
jQuery("#boxspdc").show(500);
|
3355 |
+
}
|
3356 |
+
else
|
3357 |
+
{
|
3358 |
+
jQuery("#boxspdc").hide(500);
|
3359 |
+
}
|
3360 |
+
});
|
3361 |
+
|
3362 |
+
|
3363 |
+
jQuery('#<?php echo self::$opt_migrate; ?>').change(function ()
|
3364 |
+
{
|
3365 |
+
if (jQuery(this).is(":checked"))
|
3366 |
+
{
|
3367 |
+
jQuery("#boxmigratelist").show(500);
|
3368 |
+
}
|
3369 |
+
else
|
3370 |
+
{
|
3371 |
+
jQuery("#boxmigratelist").hide(500);
|
3372 |
+
}
|
3373 |
+
});
|
3374 |
+
|
3375 |
+
|
3376 |
+
|
3377 |
+
jQuery('#<?php echo self::$opt_nocookie; ?>').change(function ()
|
3378 |
+
{
|
3379 |
+
if (jQuery(this).is(":checked"))
|
3380 |
+
{
|
3381 |
+
jQuery("#boxnocookie").show(500);
|
3382 |
+
}
|
3383 |
+
else
|
3384 |
+
{
|
3385 |
+
jQuery("#boxnocookie").hide(500);
|
3386 |
+
}
|
3387 |
+
|
3388 |
+
});
|
3389 |
+
|
3390 |
+
jQuery('#<?php echo self::$opt_schemaorg; ?>').change(function ()
|
3391 |
+
{
|
3392 |
+
if (jQuery(this).is(":checked"))
|
3393 |
+
{
|
3394 |
+
jQuery("#boxschemaorg").show(500);
|
3395 |
+
}
|
3396 |
+
else
|
3397 |
+
{
|
3398 |
+
jQuery("#boxschemaorg").hide(500);
|
3399 |
+
}
|
3400 |
+
});
|
3401 |
+
|
3402 |
+
|
3403 |
+
// jQuery('#<?php echo self::$opt_dohl; ?>').change(function()
|
3404 |
+
// {
|
3405 |
+
// if (jQuery(this).is(":checked"))
|
3406 |
+
// {
|
3407 |
+
// jQuery("#boxdohl").show(500);
|
3408 |
+
// }
|
3409 |
+
// else
|
3410 |
+
// {
|
3411 |
+
// jQuery("#boxdohl").hide(500);
|
3412 |
+
// }
|
3413 |
+
//
|
3414 |
+
// });
|
3415 |
+
|
3416 |
+
|
3417 |
+
|
3418 |
+
jQuery('#<?php echo self::$opt_defaultvol; ?>').change(function ()
|
3419 |
+
{
|
3420 |
+
if (jQuery(this).is(":checked"))
|
3421 |
+
{
|
3422 |
+
jQuery("#boxdefaultvol").show(500);
|
3423 |
+
}
|
3424 |
+
else
|
3425 |
+
{
|
3426 |
+
jQuery("#boxdefaultvol").hide(500);
|
3427 |
+
}
|
3428 |
+
|
3429 |
+
});
|
3430 |
+
|
3431 |
+
var rangedetect = document.createElement("input");
|
3432 |
+
rangedetect.setAttribute("type", "range");
|
3433 |
+
var canrange = rangedetect.type !== "text";
|
3434 |
+
//canrange = false;
|
3435 |
+
if (canrange)
|
3436 |
+
{
|
3437 |
+
$("input#vol").prop("type", "range").addClass("vol-range").on("input change", function () {
|
3438 |
+
$('.vol-output').text($(this).val() > 0 ? $(this).val() + '%' : 'Mute');
|
3439 |
+
});
|
3440 |
+
$('.vol-output').css("display", "inline-block").text($("input#vol").val() > 0 ? $("input#vol").val() + '%' : 'Mute');
|
3441 |
+
$('.vol-seeslider').show();
|
3442 |
+
$('.vol-seetextbox').hide();
|
3443 |
+
}
|
3444 |
+
else
|
3445 |
+
{
|
3446 |
+
$("input#vol").width(40);
|
3447 |
+
}
|
3448 |
+
|
3449 |
+
|
3450 |
+
jQuery('#boxspdc input.button').click(function () {
|
3451 |
+
jQuery('#clearspdcloading').show();
|
3452 |
+
jQuery('#clearspdcfailed').hide();
|
3453 |
+
jQuery('#clearspdcsuccess').hide();
|
3454 |
+
|
3455 |
+
$clearbutton = jQuery(this);
|
3456 |
+
$clearbutton.attr('disabled', 'disabled');
|
3457 |
+
|
3458 |
+
jQuery.ajax({
|
3459 |
+
type: "post",
|
3460 |
+
dataType: "json",
|
3461 |
+
timeout: 30000,
|
3462 |
+
url: wpajaxurl,
|
3463 |
+
data: {action: 'my_embedplus_clearspdc'},
|
3464 |
+
success: function (response) {
|
3465 |
+
if (response.type == "success") {
|
3466 |
+
jQuery("#clearspdcsuccess").show();
|
3467 |
+
}
|
3468 |
+
else {
|
3469 |
+
jQuery("#clearspdcfailed").show();
|
3470 |
+
}
|
3471 |
+
},
|
3472 |
+
error: function (xhr, ajaxOptions, thrownError) {
|
3473 |
+
jQuery("#clearspdcfailed").show();
|
3474 |
+
},
|
3475 |
+
complete: function () {
|
3476 |
+
jQuery('#clearspdcloading').hide();
|
3477 |
+
$clearbutton.removeAttr('disabled');
|
3478 |
+
}
|
3479 |
+
|
3480 |
+
});
|
3481 |
+
|
3482 |
+
});
|
3483 |
+
|
3484 |
+
|
3485 |
+
|
3486 |
+
|
3487 |
+
jQuery("#showcase-validate").click(function () {
|
3488 |
+
window.open("<?php echo self::$epbase . "/showcase-validate.aspx?prokey=" . self::$alloptions[self::$opt_pro] ?>" + "&domain=" + mydomain);
|
3489 |
+
});
|
3490 |
+
|
3491 |
+
jQuery('#showprokey').click(function () {
|
3492 |
+
jQuery('.submitpro').show(500);
|
3493 |
+
return false;
|
3494 |
+
});
|
3495 |
+
|
3496 |
+
jQuery('#prokeysubmit').click(function () {
|
3497 |
+
jQuery(this).attr('disabled', 'disabled');
|
3498 |
+
jQuery('#prokeyfailed').hide();
|
3499 |
+
jQuery('#prokeysuccess').hide();
|
3500 |
+
jQuery('#prokeyloading').show();
|
3501 |
+
prokeyval = jQuery('#opt_pro').val();
|
3502 |
+
|
3503 |
+
var tempscript = document.createElement("script");
|
3504 |
+
tempscript.src = "//www.embedplus.com/dashboard/wordpress-pro-validatejp.aspx?simple=1&prokey=" + prokeyval + "&domain=" + mydomain;
|
3505 |
+
var n = document.getElementsByTagName("head")[0].appendChild(tempscript);
|
3506 |
+
setTimeout(function () {
|
3507 |
+
n.parentNode.removeChild(n);
|
3508 |
+
}, 500);
|
3509 |
+
return false;
|
3510 |
+
});
|
3511 |
+
|
3512 |
+
window.embedplus_record_prokey = function (good) {
|
3513 |
+
|
3514 |
+
jQuery.ajax({
|
3515 |
+
type: "post",
|
3516 |
+
dataType: "json",
|
3517 |
+
timeout: 30000,
|
3518 |
+
url: wpajaxurl,
|
3519 |
+
data: {action: 'my_embedplus_pro_record', <?php echo self::$opt_pro; ?>: (good ? prokeyval : "")},
|
3520 |
+
success: function (response) {
|
3521 |
+
if (response.type == "success") {
|
3522 |
+
jQuery("#prokeysuccess").show();
|
3523 |
+
}
|
3524 |
+
else {
|
3525 |
+
jQuery("#prokeyfailed").show();
|
3526 |
+
}
|
3527 |
+
},
|
3528 |
+
error: function (xhr, ajaxOptions, thrownError) {
|
3529 |
+
jQuery('#prokeyfailed').show();
|
3530 |
+
},
|
3531 |
+
complete: function () {
|
3532 |
+
jQuery('#prokeyloading').hide();
|
3533 |
+
jQuery('#prokeysubmit').removeAttr('disabled');
|
3534 |
+
}
|
3535 |
+
|
3536 |
+
});
|
3537 |
+
|
3538 |
+
};
|
3539 |
+
|
3540 |
+
});
|
3541 |
+
</script>
|
3542 |
+
<?php
|
3543 |
+
if (function_exists('add_thickbox'))
|
3544 |
+
{
|
3545 |
+
add_thickbox();
|
3546 |
+
}
|
3547 |
+
?>
|
3548 |
+
|
3549 |
+
<?php
|
3550 |
+
}
|
3551 |
+
|
3552 |
+
public static function save_changes_button($submitted)
|
3553 |
+
{
|
3554 |
+
$button_label = 'Save Changes';
|
3555 |
+
if ($submitted)
|
3556 |
+
{
|
3557 |
+
$button_label = 'Changes Saved';
|
3558 |
+
?>
|
3559 |
+
<script type="text/javascript">
|
3560 |
+
jQuery(document).ready(function () {
|
3561 |
+
setTimeout(function () {
|
3562 |
+
jQuery('input.ytprefs-submit').val('Save Changes');
|
3563 |
+
}, 3000);
|
3564 |
+
});
|
3565 |
+
|
3566 |
+
</script>
|
3567 |
+
<?php
|
3568 |
+
}
|
3569 |
+
?>
|
3570 |
+
<p class="submit">
|
3571 |
+
<input type="submit" onclick="return savevalidate();" name="Submit" class="button-primary ytprefs-submit" value="<?php _e($button_label) ?>" />
|
3572 |
+
<em>If you're using a separate caching plugin and you do not see your changes after saving, you might want to reset your cache.</em>
|
3573 |
+
</p>
|
3574 |
+
<?php
|
3575 |
+
}
|
3576 |
+
|
3577 |
+
public static function ytprefsscript()
|
3578 |
+
{
|
3579 |
+
$loggedin = current_user_can('edit_posts');
|
3580 |
+
if (!($loggedin && self::$alloptions[self::$opt_admin_off_scripts]))
|
3581 |
+
{
|
3582 |
+
wp_enqueue_style(
|
3583 |
+
'__EPYT__style', plugins_url('styles/ytprefs.min.css', __FILE__)
|
3584 |
+
);
|
3585 |
+
$cols = floatval(self::$alloptions[self::$opt_gallery_columns]);
|
3586 |
+
$cols = $cols == 0 ? 3.0 : $cols;
|
3587 |
+
$colwidth = 100.0 / $cols;
|
3588 |
+
$custom_css = "
|
3589 |
+
.epyt-gallery-thumb {
|
3590 |
+
width: " . round($colwidth, 3) . "%;
|
3591 |
+
}";
|
3592 |
+
wp_add_inline_style('__EPYT__style', $custom_css);
|
3593 |
+
|
3594 |
+
wp_enqueue_script('__ytprefs__', plugins_url('scripts/ytprefs.min.js', __FILE__), array('jquery'));
|
3595 |
+
|
3596 |
+
if (self::$alloptions[self::$opt_old_script_method] != 1)
|
3597 |
+
{
|
3598 |
+
wp_localize_script('__ytprefs__', '_EPYT_', array(
|
3599 |
+
'ajaxurl' => admin_url('admin-ajax.php'),
|
3600 |
+
'security' => wp_create_nonce('embedplus-nonce'),
|
3601 |
+
'gallery_scrolloffset' => intval(self::$alloptions[self::$opt_gallery_scrolloffset]),
|
3602 |
+
'eppathtoscripts' => plugins_url('scripts/', __FILE__),
|
3603 |
+
'epresponsiveselector' => self::get_responsiveselector(),
|
3604 |
+
'epdovol' => true,
|
3605 |
+
'version' => self::$alloptions[self::$opt_version]
|
3606 |
+
));
|
3607 |
+
}
|
3608 |
+
|
3609 |
+
////////////////////// cloudflare accomodation
|
3610 |
+
//add_filter('script_loader_tag', 'YouTubePrefs::set_cfasync', 10, 3);
|
3611 |
+
|
3612 |
+
if (!is_admin() && (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0) && self::$alloptions[self::$opt_dynload] == 1)
|
3613 |
+
{
|
3614 |
+
wp_enqueue_style('__dyntype__', plugins_url('scripts/embdyn.min.css', __FILE__));
|
3615 |
+
wp_enqueue_script('__dynload__', plugins_url('scripts/embdyn.min.js', __FILE__), array('jquery'));
|
3616 |
+
}
|
3617 |
+
}
|
3618 |
+
}
|
3619 |
+
|
3620 |
+
public static function set_cfasync($tag, $handle, $src)
|
3621 |
+
{
|
3622 |
+
if ('__ytprefs__' !== $handle)
|
3623 |
+
{
|
3624 |
+
return $tag;
|
3625 |
+
}
|
3626 |
+
return str_replace('<script', '<script data-cfasync="false" ', $tag);
|
3627 |
+
}
|
3628 |
+
|
3629 |
+
public static function get_responsiveselector()
|
3630 |
+
{
|
3631 |
+
$responsiveselector = '[]';
|
3632 |
+
if (self::$alloptions[self::$opt_widgetfit] == 1)
|
3633 |
+
{
|
3634 |
+
$responsiveselector = '["iframe.__youtube_prefs_widget__"]';
|
3635 |
+
}
|
3636 |
+
if (self::$alloptions[self::$opt_responsive] == 1)
|
3637 |
+
{
|
3638 |
+
$responsiveselector = '["iframe[src*=\'youtube.com\']","iframe[src*=\'youtube-nocookie.com\']","iframe[data-ep-src*=\'youtube.com\']","iframe[data-ep-src*=\'youtube-nocookie.com\']","iframe[data-ep-gallerysrc*=\'youtube.com\']"]';
|
3639 |
+
}
|
3640 |
+
return $responsiveselector;
|
3641 |
+
}
|
3642 |
+
|
3643 |
+
public static function get_blogwidth()
|
3644 |
+
{
|
3645 |
+
$blogwidth = null;
|
3646 |
+
try
|
3647 |
+
{
|
3648 |
+
$embed_size_w = intval(get_option('embed_size_w'));
|
3649 |
+
|
3650 |
+
global $content_width;
|
3651 |
+
if (empty($content_width))
|
3652 |
+
{
|
3653 |
+
$content_width = $GLOBALS['content_width'];
|
3654 |
+
}
|
3655 |
+
|
3656 |
+
$blogwidth = $embed_size_w ? $embed_size_w : ($content_width ? $content_width : 450);
|
3657 |
+
}
|
3658 |
+
catch (Exception $ex)
|
3659 |
+
{
|
3660 |
+
|
3661 |
+
}
|
3662 |
+
|
3663 |
+
$blogwidth = preg_replace('/\D/', '', $blogwidth); //may have px
|
3664 |
+
|
3665 |
+
return $blogwidth;
|
3666 |
+
}
|
3667 |
+
|
3668 |
+
}
|
3669 |
+
|
3670 |
+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
3671 |
+
//class start
|
3672 |
+
class Add_new_tinymce_btn_Youtubeprefs
|
3673 |
+
{
|
3674 |
+
|
3675 |
+
public $btn_arr;
|
3676 |
+
public $js_file;
|
3677 |
+
|
3678 |
+
/*
|
3679 |
+
* call the constructor and set class variables
|
3680 |
+
* From the constructor call the functions via wordpress action/filter
|
3681 |
+
*/
|
3682 |
+
|
3683 |
+
function __construct($seperator, $btn_name, $javascrip_location)
|
3684 |
+
{
|
3685 |
+
$this->btn_arr = array("Seperator" => $seperator, "Name" => $btn_name);
|
3686 |
+
$this->js_file = $javascrip_location;
|
3687 |
+
add_action('init', array($this, 'add_tinymce_button'));
|
3688 |
+
add_filter('tiny_mce_version', array($this, 'refresh_mce_version'));
|
3689 |
+
}
|
3690 |
+
|
3691 |
+
/*
|
3692 |
+
* create the buttons only if the user has editing privs.
|
3693 |
+
* If so we create the button and add it to the tinymce button array
|
3694 |
+
*/
|
3695 |
+
|
3696 |
+
function add_tinymce_button()
|
3697 |
+
{
|
3698 |
+
if (!current_user_can('edit_posts') && !current_user_can('edit_pages'))
|
3699 |
+
return;
|
3700 |
+
if (get_user_option('rich_editing') == 'true')
|
3701 |
+
{
|
3702 |
+
//the function that adds the javascript
|
3703 |
+
add_filter('mce_external_plugins', array($this, 'add_new_tinymce_plugin'));
|
3704 |
+
//adds the button to the tinymce button array
|
3705 |
+
add_filter('mce_buttons', array($this, 'register_new_button'));
|
3706 |
+
}
|
3707 |
+
}
|
3708 |
+
|
3709 |
+
/*
|
3710 |
+
* add the new button to the tinymce array
|
3711 |
+
*/
|
3712 |
+
|
3713 |
+
function register_new_button($buttons)
|
3714 |
+
{
|
3715 |
+
array_push($buttons, $this->btn_arr["Seperator"], $this->btn_arr["Name"]);
|
3716 |
+
return $buttons;
|
3717 |
+
}
|
3718 |
+
|
3719 |
+
/*
|
3720 |
+
* Call the javascript file that loads the
|
3721 |
+
* instructions for the new button
|
3722 |
+
*/
|
3723 |
+
|
3724 |
+
function add_new_tinymce_plugin($plugin_array)
|
3725 |
+
{
|
3726 |
+
$plugin_array[$this->btn_arr['Name']] = $this->js_file;
|
3727 |
+
return $plugin_array;
|
3728 |
+
}
|
3729 |
+
|
3730 |
+
/*
|
3731 |
+
* This function tricks tinymce in thinking
|
3732 |
+
* it needs to refresh the buttons
|
3733 |
+
*/
|
3734 |
+
|
3735 |
+
function refresh_mce_version($ver)
|
3736 |
+
{
|
3737 |
+
$ver += 3;
|
3738 |
+
return $ver;
|
3739 |
+
}
|
3740 |
+
|
3741 |
+
}
|
3742 |
+
|
3743 |
+
//class end
|
3744 |
+
|
3745 |
+
|
3746 |
+
register_activation_hook(__FILE__, array('YouTubePrefs', 'initoptions'));
|
3747 |
+
$youtubeplgplus = new YouTubePrefs();
|
3748 |
+
|
3749 |
+
|
3750 |
+
add_action("wp_ajax_my_embedplus_pro_record", array('YouTubePrefs', 'my_embedplus_pro_record'));
|
3751 |
+
add_action("wp_ajax_my_embedplus_clearspdc", array('YouTubePrefs', 'my_embedplus_clearspdc'));
|
3752 |
+
add_action("wp_ajax_my_embedplus_glance_vids", array('YouTubePrefs', 'my_embedplus_glance_vids'));
|
3753 |
+
add_action("wp_ajax_my_embedplus_glance_count", array('YouTubePrefs', 'my_embedplus_glance_count'));
|
3754 |
+
add_action("wp_ajax_my_embedplus_dismiss_double_plugin_warning", array('YouTubePrefs', 'my_embedplus_dismiss_double_plugin_warning'));
|
3755 |
+
add_action("wp_ajax_my_embedplus_gallery_page", array('YouTubePrefs', 'my_embedplus_gallery_page'));
|
3756 |
+
add_action("wp_ajax_nopriv_my_embedplus_gallery_page", array('YouTubePrefs', 'my_embedplus_gallery_page'));
|
3757 |
+
|
3758 |
+
add_action('admin_enqueue_scripts', 'youtubeprefs_admin_enqueue_scripts');
|
3759 |
+
|
3760 |
+
function youtubeprefs_admin_enqueue_scripts()
|
3761 |
+
{
|
3762 |
+
wp_enqueue_style('embedplusyoutube', plugins_url() . '/youtube-embed-plus/scripts/embedplus_mce.css');
|
3763 |
+
add_action('wp_print_scripts', 'youtubeprefs_output_scriptvars');
|
3764 |
+
wp_enqueue_script('__ytprefs_admin__', plugins_url('scripts/ytprefs-admin.min.js', __FILE__), array('jquery'));
|
3765 |
+
|
3766 |
+
if (
|
3767 |
+
//(!(isset(YouTubePrefs::$alloptions[YouTubePrefs::$opt_pro]) && strlen(trim(YouTubePrefs::$alloptions[YouTubePrefs::$opt_pro])) > 0)) && // display only if not pro ooopointer
|
3768 |
+
(get_bloginfo('version') >= '3.3') && YouTubePrefs::custom_admin_pointers_check()
|
3769 |
+
)
|
3770 |
+
{
|
3771 |
+
add_action('admin_print_footer_scripts', 'YouTubePrefs::custom_admin_pointers_footer');
|
3772 |
+
|
3773 |
+
wp_enqueue_script('wp-pointer');
|
3774 |
+
wp_enqueue_style('wp-pointer');
|
3775 |
+
}
|
3776 |
+
|
3777 |
+
if (YouTubePrefs::$alloptions['glance'] == 1)
|
3778 |
+
{
|
3779 |
+
add_action('admin_print_footer_scripts', 'YouTubePrefs::glance_script');
|
3780 |
+
}
|
3781 |
+
}
|
3782 |
+
|
3783 |
+
function youtubeprefs_output_scriptvars()
|
3784 |
+
{
|
3785 |
+
YouTubePrefs::$scriptsprinted++;
|
3786 |
+
if (YouTubePrefs::$scriptsprinted == 1)
|
3787 |
+
{
|
3788 |
+
$blogwidth = YouTubePrefs::get_blogwidth();
|
3789 |
+
$epprokey = YouTubePrefs::$alloptions[YouTubePrefs::$opt_pro];
|
3790 |
+
$myytdefaults = http_build_query(YouTubePrefs::$alloptions);
|
3791 |
+
?>
|
3792 |
+
<script type="text/javascript">
|
3793 |
+
var wpajaxurl = "<?php echo admin_url('admin-ajax.php') ?>";
|
3794 |
+
if (window.location.toString().indexOf('https://') == 0)
|
3795 |
+
{
|
3796 |
+
wpajaxurl = wpajaxurl.replace("http://", "https://");
|
3797 |
+
}
|
3798 |
+
|
3799 |
+
var epblogwidth = <?php echo $blogwidth; ?>;
|
3800 |
+
var epprokey = '<?php echo $epprokey; ?>';
|
3801 |
+
var epbasesite = '<?php echo YouTubePrefs::$epbase; ?>';
|
3802 |
+
var epversion = '<?php echo YouTubePrefs::$version; ?>';
|
3803 |
+
var myytdefaults = '<?php echo $myytdefaults; ?>';
|
3804 |
+
var eppluginadminurl = '<?php echo admin_url('admin.php?page=youtube-my-preferences'); ?>';
|
3805 |
+
|
3806 |
+
// Create IE + others compatible event handler
|
3807 |
+
var epeventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
|
3808 |
+
var epeventer = window[epeventMethod];
|
3809 |
+
var epmessageEvent = epeventMethod == "attachEvent" ? "onmessage" : "message";
|
3810 |
+
|
3811 |
+
// Listen to message from child window
|
3812 |
+
epeventer(epmessageEvent, function (e)
|
3813 |
+
{
|
3814 |
+
var embedcode = "";
|
3815 |
+
try
|
3816 |
+
{
|
3817 |
+
if (e.data.indexOf("youtubeembedplus") == 0)
|
3818 |
+
{
|
3819 |
+
|
3820 |
+
embedcode = e.data.split("|")[1];
|
3821 |
+
if (embedcode.indexOf("[") !== 0)
|
3822 |
+
{
|
3823 |
+
embedcode = "<p>" + embedcode + "</p>";
|
3824 |
+
}
|
3825 |
+
|
3826 |
+
if (window.tinyMCE !== null && window.tinyMCE.activeEditor !== null && !window.tinyMCE.activeEditor.isHidden())
|
3827 |
+
{
|
3828 |
+
if (typeof window.tinyMCE.execInstanceCommand !== 'undefined')
|
3829 |
+
{
|
3830 |
+
window.tinyMCE.execInstanceCommand(
|
3831 |
+
window.tinyMCE.activeEditor.id,
|
3832 |
+
'mceInsertContent',
|
3833 |
+
false,
|
3834 |
+
embedcode);
|
3835 |
+
}
|
3836 |
+
else
|
3837 |
+
{
|
3838 |
+
send_to_editor(embedcode);
|
3839 |
+
}
|
3840 |
+
}
|
3841 |
+
else
|
3842 |
+
{
|
3843 |
+
embedcode = embedcode.replace('<p>', '\n').replace('</p>', '\n');
|
3844 |
+
if (typeof QTags.insertContent === 'function')
|
3845 |
+
{
|
3846 |
+
QTags.insertContent(embedcode);
|
3847 |
+
}
|
3848 |
+
else
|
3849 |
+
{
|
3850 |
+
send_to_editor(embedcode);
|
3851 |
+
}
|
3852 |
+
}
|
3853 |
+
tb_remove();
|
3854 |
+
|
3855 |
+
}
|
3856 |
+
}
|
3857 |
+
catch (err)
|
3858 |
+
{
|
3859 |
+
if (typeof console !== 'undefined')
|
3860 |
+
console.log(err.message);
|
3861 |
+
}
|
3862 |
+
|
3863 |
+
|
3864 |
+
}, false);
|
3865 |
+
|
3866 |
+
|
3867 |
+
|
3868 |
+
</script>
|
3869 |
+
<?php
|
3870 |
+
}
|
3871 |
+
}
|
3872 |
|