YouTube - Version 11.1

Version Description

Download this release

Release Info

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

Code changes from version 11.0.1 to 11.1

images/play-subscribe.png ADDED
Binary file
images/sssubscribe.png ADDED
Binary file
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: embedplus
3
  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.4
7
- Stable tag: 11.0.1
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...
@@ -14,6 +14,7 @@ YouTube embed plugin. Embed a responsive video, YouTube channel gallery, or play
14
  **Here are a few recently added features (even more features below):**
15
 
16
  * YouTube Channel and Playlist Gallery - The ability to make playlist (and channel) embeds have a gallery layout. By default, the plugin can generate a grid-based [responsive playlist or channel gallery >>](http://www.embedplus.com/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx). Your visitors can browse through pages of video thumbnails and choose from videos that are pulled from an entire YouTube channel or playlist.
 
17
  * Improved accessibility by using title attributes for screen reader support. It should help your site [pass functional accessibility evaluations (FAE)](https://www.youtube.com/watch?v=gpAiFnYYkbk).
18
  * 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).
19
  * Easy "Insert" button for both the Visual and Text mode of the editor
@@ -147,6 +148,12 @@ You can also start and end each individual video at particular times. Like the a
147
 
148
  == Changelog ==
149
 
 
 
 
 
 
 
150
  = YouTube Embed 11.0.1 =
151
  Improves HTTPS support for structured data tags, and HTTPS support in Firefox.
152
 
3
  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.5
7
+ Stable tag: 11.1
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...
14
  **Here are a few recently added features (even more features below):**
15
 
16
  * YouTube Channel and Playlist Gallery - The ability to make playlist (and channel) embeds have a gallery layout. By default, the plugin can generate a grid-based [responsive playlist or channel gallery >>](http://www.embedplus.com/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx). Your visitors can browse through pages of video thumbnails and choose from videos that are pulled from an entire YouTube channel or playlist.
17
+ * Auto continuous play for playlist and channel gallery embeds
18
  * Improved accessibility by using title attributes for screen reader support. It should help your site [pass functional accessibility evaluations (FAE)](https://www.youtube.com/watch?v=gpAiFnYYkbk).
19
  * 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).
20
  * Easy "Insert" button for both the Visual and Text mode of the editor
148
 
149
  == Changelog ==
150
 
151
+ = YouTube Embed 11.1 =
152
+ * Automatic continuous play for playlist and channel gallery embeds.
153
+ * Ability to add a YouTube channel subscription link to all galleries.
154
+ * Ability to hide Previous/Next buttons and page numbers.
155
+ * Featured images can now be pulled from playlists (using the thumbnail of the first video).
156
+
157
  = YouTube Embed 11.0.1 =
158
  Improves HTTPS support for structured data tags, and HTTPS support in Firefox.
159
 
scripts/embdyn.js ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //inview js
2
+ !function(t){function e(){var e,i,n={height:a.innerHeight,width:a.innerWidth};return n.height||(e=r.compatMode,(e||!t.support.boxModel)&&(i="CSS1Compat"===e?f:r.body,n={height:i.clientHeight,width:i.clientWidth})),n}function i(){return{top:a.pageYOffset||f.scrollTop||r.body.scrollTop,left:a.pageXOffset||f.scrollLeft||r.body.scrollLeft}}function n(){var n,l=t(),r=0;if(t.each(d,function(t,e){var i=e.data.selector,n=e.$element;l=l.add(i?n.find(i):n)}),n=l.length)for(o=o||e(),h=h||i();n>r;r++)if(t.contains(f,l[r])){var a,c,p,s=t(l[r]),u={height:s.height(),width:s.width()},g=s.offset(),v=s.data("inview");if(!h||!o)return;g.top+u.height>h.top&&g.top<h.top+o.height&&g.left+u.width>h.left&&g.left<h.left+o.width?(a=h.left>g.left?"right":h.left+o.width<g.left+u.width?"left":"both",c=h.top>g.top?"bottom":h.top+o.height<g.top+u.height?"top":"both",p=a+"-"+c,v&&v===p||s.data("inview",p).trigger("inview",[!0,a,c])):v&&s.data("inview",!1).trigger("inview",[!1])}}var o,h,l,d={},r=document,a=window,f=r.documentElement,c=t.expando;t.event.special.inview={add:function(e){d[e.guid+"-"+this[c]]={data:e,$element:t(this)},l||t.isEmptyObject(d)||(l=setInterval(n,250))},remove:function(e){try{delete d[e.guid+"-"+this[c]]}catch(i){}t.isEmptyObject(d)&&(clearInterval(l),l=null)}},t(a).bind("scroll resize scrollstop",function(){o=h=null}),!f.addEventListener&&f.attachEvent&&f.attachEvent("onfocusin",function(){h=null})}(jQuery);
3
+
4
+ (function($){
5
+ $(document).ready(function () {
6
+ $('iframe[data-ep-src]').one('inview', function(event, isInView, visiblePartX, visiblePartY) {
7
+ if (isInView) {
8
+ var $vid = $(this);
9
+ $vid.attr('src', $vid.attr('data-ep-src'));
10
+ $vid.removeAttr('data-ep-src');
11
+ _EPADashboard_.setupevents(this.id);
12
+ setTimeout(function(){
13
+ $vid.addClass('animated ' + $vid.attr('data-ep-a'));
14
+ }, 1);
15
+ }
16
+ });
17
+ });
18
+ })(window.jQuery || window.Zepto || window.$);
scripts/embdyn.min.js CHANGED
@@ -1 +1,4 @@
1
- !function(t){function e(){var e,i,n={height:a.innerHeight,width:a.innerWidth};return n.height||(e=r.compatMode,(e||!t.support.boxModel)&&(i="CSS1Compat"===e?f:r.body,n={height:i.clientHeight,width:i.clientWidth})),n}function i(){return{top:a.pageYOffset||f.scrollTop||r.body.scrollTop,left:a.pageXOffset||f.scrollLeft||r.body.scrollLeft}}function n(){var n,l=t(),r=0;if(t.each(d,function(t,e){var i=e.data.selector,n=e.$element;l=l.add(i?n.find(i):n)}),n=l.length)for(o=o||e(),h=h||i();n>r;r++)if(t.contains(f,l[r])){var a,c,p,s=t(l[r]),u={height:s.height(),width:s.width()},g=s.offset(),v=s.data("inview");if(!h||!o)return;g.top+u.height>h.top&&g.top<h.top+o.height&&g.left+u.width>h.left&&g.left<h.left+o.width?(a=h.left>g.left?"right":h.left+o.width<g.left+u.width?"left":"both",c=h.top>g.top?"bottom":h.top+o.height<g.top+u.height?"top":"both",p=a+"-"+c,v&&v===p||s.data("inview",p).trigger("inview",[!0,a,c])):v&&s.data("inview",!1).trigger("inview",[!1])}}var o,h,l,d={},r=document,a=window,f=r.documentElement,c=t.expando;t.event.special.inview={add:function(e){d[e.guid+"-"+this[c]]={data:e,$element:t(this)},l||t.isEmptyObject(d)||(l=setInterval(n,250))},remove:function(e){try{delete d[e.guid+"-"+this[c]]}catch(i){}t.isEmptyObject(d)&&(clearInterval(l),l=null)}},t(a).bind("scroll resize scrollstop",function(){o=h=null}),!f.addEventListener&&f.attachEvent&&f.attachEvent("onfocusin",function(){h=null})}(jQuery);/**/(function(e){e(document).ready(function(){e("iframe[data-ep-src]").one("inview",function(t,n,r,i){if(n){var s=e(this);s.attr("src",s.attr("data-ep-src"));s.removeAttr("data-ep-src");_EPADashboard_.setupevents(this.id);setTimeout(function(){s.addClass("animated "+s.attr("data-ep-a"))},1)}})})})(window.jQuery||window.Zepto||window.$)
 
 
 
1
+ !function(c){function v(){var a,b,d={height:l.innerHeight,width:l.innerWidth};return d.height||(a=m.compatMode,(a||!c.support.boxModel)&&(b="CSS1Compat"===a?f:m.body,d={height:b.clientHeight,width:b.clientWidth})),d}function g(){var b,k=c(),q=0;if(c.each(n,function(a,b){var c=b.data.selector,d=b.$element;k=k.add(c?d.find(c):d)}),b=k.length)for(d=d||v(),a=a||{top:l.pageYOffset||f.scrollTop||m.body.scrollTop,left:l.pageXOffset||f.scrollLeft||m.body.scrollLeft};b>q;q++)if(c.contains(f,k[q])){var g,r,
2
+ t,h=c(k[q]),p=h.height(),w=h.width(),e=h.offset(),u=h.data("inview");if(!a||!d)break;e.top+p>a.top&&e.top<a.top+d.height&&e.left+w>a.left&&e.left<a.left+d.width?(g=a.left>e.left?"right":a.left+d.width<e.left+w?"left":"both",r=a.top>e.top?"bottom":a.top+d.height<e.top+p?"top":"both",t=g+"-"+r,u&&u===t||h.data("inview",t).trigger("inview",[!0,g,r])):u&&h.data("inview",!1).trigger("inview",[!1])}}var d,a,b,n={},m=document,l=window,f=m.documentElement,p=c.expando;c.event.special.inview={add:function(a){n[a.guid+
3
+ "-"+this[p]]={data:a,$element:c(this)};b||c.isEmptyObject(n)||(b=setInterval(g,250))},remove:function(a){try{delete n[a.guid+"-"+this[p]]}catch(d){}c.isEmptyObject(n)&&(clearInterval(b),b=null)}};c(l).bind("scroll resize scrollstop",function(){d=a=null});!f.addEventListener&&f.attachEvent&&f.attachEvent("onfocusin",function(){a=null})}(jQuery);
4
+ (function(c){c(document).ready(function(){c("iframe[data-ep-src]").one("inview",function(v,g,d,a){if(g){var b=c(this);b.attr("src",b.attr("data-ep-src"));b.removeAttr("data-ep-src");_EPADashboard_.setupevents(this.id);setTimeout(function(){b.addClass("animated "+b.attr("data-ep-a"))},1)}})})})(window.jQuery||window.Zepto||window.$);
scripts/fitvids.js ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var epdofitvids = epdofitvids || function ($)
2
+ {
3
+ if (_EPYT_.epresponsiveselector.constructor !== Array)
4
+ {
5
+ _EPYT_.epresponsiveselector = JSON.parse(_EPYT_.epresponsiveselector);
6
+ }
7
+
8
+ $.fn.fitVidsEP = function (options) {
9
+ var settings = {
10
+ customSelector: null
11
+ };
12
+
13
+ if (!document.getElementById('fit-vids-style')) {
14
+
15
+ var div = document.createElement('div'),
16
+ ref = document.getElementsByTagName('base')[0] || document.getElementsByTagName('script')[0],
17
+ cssStyles = '&shy;<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>';
18
+
19
+ div.className = 'fit-vids-style';
20
+ div.id = 'fit-vids-style';
21
+ div.style.display = 'none';
22
+ div.innerHTML = cssStyles;
23
+
24
+ ref.parentNode.insertBefore(div, ref);
25
+
26
+ }
27
+
28
+ if (options) {
29
+ $.extend(settings, options);
30
+ }
31
+
32
+ return this.each(function () {
33
+ // var selectors = [
34
+ // "iframe[src*='youtube.com']",
35
+ // "iframe[src*='youtube-nocookie.com']"
36
+ // ];
37
+ var selectors = _EPYT_.epresponsiveselector;
38
+
39
+ if (settings.customSelector) {
40
+ selectors.push(settings.customSelector);
41
+ }
42
+
43
+ var $allVideos = $(this).find(selectors.join(','));
44
+ $allVideos = $allVideos.not("object object"); // SwfObj conflict patch
45
+
46
+ $allVideos.each(function () {
47
+ var $this = $(this);
48
+ if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) {
49
+ return;
50
+ }
51
+ var height = (this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10)))) ? parseInt($this.attr('height'), 10) : $this.height(),
52
+ width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(),
53
+ aspectRatio = height / width;
54
+ if (!$this.attr('id')) {
55
+ var videoID = 'fitvid' + Math.floor(Math.random() * 999999);
56
+ $this.attr('id', videoID);
57
+ }
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) {
65
+ }
66
+ });
67
+ });
68
+ };
69
+
70
+ $(document).ready(function () {
71
+ $("body").fitVidsEP();
72
+ });
73
+ return true;
74
+ };
75
+
76
+ try {
77
+ epdofitvids(window.jQuery);
78
+ } catch (err) {
79
+ }
80
+
81
+
scripts/ytprefs-admin.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-admin.min.js CHANGED
@@ -1,12 +1 @@
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
- });
1
+ function widen_ytprefs_wiz(){setTimeout(function(){jQuery("#TB_window").animate({marginLeft:"-475px",width:"950px"},150);jQuery("#TB_window iframe").animate({width:"950px"},150)},750)}jQuery(document).ready(function(){jQuery("body").on("click.tbyt","#ytprefs_wiz_button",function(){widen_ytprefs_wiz()});jQuery(window).resize(widen_ytprefs_wiz)});
 
 
 
 
 
 
 
 
 
 
 
scripts/ytprefs.js ADDED
@@ -0,0 +1,350 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function (window, $)
2
+ {
3
+ window._EPYT_ = window._EPYT_ || {
4
+ ajaxurl: "\/wp-admin\/admin-ajax.php",
5
+ security: "",
6
+ gallery_scrolloffset: 100,
7
+ eppathtoscripts: "\/wp-content\/plugins\/youtube-embed-plus\/scripts\/",
8
+ epresponsiveselector: ["iframe.__youtube_prefs_widget__"],
9
+ epdovol: true,
10
+ evselector: 'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]',
11
+ usingdefault: true
12
+ };
13
+
14
+ if (!document.querySelectorAll)
15
+ {
16
+ document.querySelectorAll = function (selector)
17
+ {
18
+ var doc = document, head = doc.documentElement.firstChild, styleTag = doc.createElement('STYLE');
19
+ head.appendChild(styleTag);
20
+ doc.__qsaels = [];
21
+ styleTag.styleSheet.cssText = selector + "{x:expression(document.__qsaels.push(this))}";
22
+ window.scrollBy(0, 0);
23
+ return doc.__qsaels;
24
+ };
25
+ }
26
+
27
+ if (typeof window._EPADashboard_ === 'undefined')
28
+ {
29
+ window._EPADashboard_ =
30
+ {
31
+ initStarted: false,
32
+ checkCount: 0,
33
+ onPlayerReady: function (event)
34
+ {
35
+ try
36
+ {
37
+ if (typeof _EPYT_.epdovol !== "undefined" && _EPYT_.epdovol)
38
+ {
39
+ var vol = parseInt(event.target.getIframe().getAttribute("data-vol"));
40
+ if (!isNaN(vol))
41
+ {
42
+ if (vol === 0)
43
+ {
44
+ event.target.mute();
45
+ }
46
+ else
47
+ {
48
+ if (event.target.isMuted())
49
+ {
50
+ event.target.unMute();
51
+ }
52
+ event.target.setVolume(vol);
53
+ }
54
+ }
55
+ }
56
+ }
57
+ catch (err) {
58
+ }
59
+
60
+ setTimeout(function ()
61
+ {
62
+ try
63
+ {
64
+ var ytid = _EPADashboard_.justid(event.target.getVideoUrl());
65
+ _EPADashboard_.jp("ytid=" + ytid);
66
+
67
+ }
68
+ catch (err)
69
+ {
70
+ }
71
+ }, 1700);
72
+ },
73
+
74
+ onPlayerStateChange: function (event)
75
+ {
76
+ var ifm = event.target.getIframe();
77
+ if (event.data === YT.PlayerState.PLAYING && event.target.ponce !== true && ifm.src.indexOf('autoplay=1') === -1)
78
+ {
79
+ event.target.ponce = true;
80
+
81
+ try
82
+ {
83
+ var ytid = _EPADashboard_.justid(event.target.getVideoUrl());
84
+ _EPADashboard_.jp("ytid=" + ytid + "&p=1");
85
+
86
+ } catch (err)
87
+ {
88
+ }
89
+ }
90
+
91
+ var $gallery = $(ifm).closest('.epyt-gallery');
92
+ if ($gallery.length)
93
+ {
94
+ var autonext = $gallery.find('.epyt-pagebutton').first().data('autonext') == '1';
95
+ if (autonext && event.data === YT.PlayerState.ENDED)
96
+ {
97
+ var $currvid = $gallery.find('.epyt-current-video');
98
+ if (!$currvid.length)
99
+ {
100
+ $currvid = $gallery.find('.epyt-gallery-thumb').first();
101
+ }
102
+ var $nextvid = $currvid.find(' ~ .epyt-gallery-thumb').first();
103
+ if ($nextvid.length)
104
+ {
105
+ $nextvid.click();
106
+ }
107
+ else
108
+ {
109
+ $gallery.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click();
110
+ }
111
+ }
112
+ }
113
+
114
+ },
115
+ justid: function (s)
116
+ {
117
+ return new RegExp("[\\?&]v=([^&#]*)").exec(s)[1];
118
+ },
119
+ dynsetupevents: function ()
120
+ {
121
+ if (typeof this.epytsetupdone === 'undefined')
122
+ {
123
+ _EPADashboard_.setupevents(this.id);
124
+ }
125
+ },
126
+ setupevents: function (iframeid)
127
+ {
128
+ _EPADashboard_.log('Setting up YT API events: ' + iframeid);
129
+ if (YT.loaded)
130
+ {
131
+ var thisvid = document.getElementById(iframeid);
132
+ thisvid.epytsetupdone = true;
133
+ new YT.Player(iframeid, {
134
+ events: {
135
+ "onReady": _EPADashboard_.onPlayerReady,
136
+ "onStateChange": _EPADashboard_.onPlayerStateChange
137
+ }
138
+ });
139
+ }
140
+ },
141
+ jp: function (q)
142
+ {
143
+ //debug
144
+ },
145
+ apiInit: function () {
146
+ _EPADashboard_.initStarted = true;
147
+ setTimeout(function ()
148
+ {
149
+ var __allytifr = document.querySelectorAll(_EPYT_.evselector);
150
+ for (var i = 0; i < __allytifr.length; i++)
151
+ {
152
+ if (!__allytifr[i].hasAttribute("id"))
153
+ {
154
+ __allytifr[i].id = "_dytid_" + Math.round(Math.random() * 8999 + 1000);
155
+ }
156
+ _EPADashboard_.setupevents(__allytifr[i].id);
157
+ }
158
+ }, 300);
159
+ },
160
+ log: function (msg) {
161
+ try
162
+ {
163
+ console.log(msg);
164
+ }
165
+ catch (err) {
166
+ }
167
+ },
168
+ doubleCheck: function () {
169
+ _EPADashboard_.checkInterval = setInterval(function () {
170
+ _EPADashboard_.checkCount++;
171
+ if (_EPADashboard_.checkCount >= 5 || _EPADashboard_.initStarted) {
172
+ clearInterval(_EPADashboard_.checkInterval);
173
+ }
174
+ else {
175
+ _EPADashboard_.apiInit();
176
+ _EPADashboard_.log('YT API init');
177
+ }
178
+
179
+ }, 1000);
180
+ },
181
+ selectText: function (ele) {
182
+ if (document.selection) {
183
+ var range = document.body.createTextRange();
184
+ range.moveToElementText(ele);
185
+ range.select();
186
+ } else if (window.getSelection) {
187
+ var range = document.createRange();
188
+ range.selectNode(ele);
189
+ window.getSelection().addRange(range);
190
+ }
191
+ }
192
+
193
+ };
194
+ }
195
+
196
+ if (typeof window.YT === 'undefined')
197
+ {
198
+ var iapi = document.createElement('script');
199
+ iapi.src = "//www.youtube.com/iframe_api";
200
+ iapi.type = "text/javascript";
201
+ document.getElementsByTagName('head')[0].appendChild(iapi);
202
+ }
203
+ else if (YT.loaded)
204
+ {
205
+ _EPADashboard_.apiInit();
206
+ _EPADashboard_.log('YT API available');
207
+ }
208
+
209
+ _EPADashboard_.doubleCheck();
210
+
211
+ window.onYouTubeIframeAPIReady = typeof window.onYouTubeIframeAPIReady !== 'undefined' ? window.onYouTubeIframeAPIReady : function ()
212
+ {
213
+ _EPADashboard_.apiInit();
214
+ _EPADashboard_.log('YT API ready');
215
+ };
216
+
217
+
218
+ })(window, jQuery);
219
+
220
+
221
+
222
+ (function ($) {
223
+ $(document).ready(function () {
224
+ $('.epyt-gallery').each(function () {
225
+ var $container = $(this);
226
+ var $iframe = $(this).find('iframe').first();
227
+ var initSrc = $iframe.data('ep-gallerysrc');
228
+ var firstId = $(this).find('.epyt-gallery-list .epyt-gallery-thumb').first().data('videoid');
229
+ initSrc = initSrc.replace('GALLERYVIDEOID', firstId);
230
+ $iframe.attr('src', initSrc);
231
+
232
+
233
+ var $listgallery = $container.find('.epyt-gallery-list');
234
+ var pagenumsalign = function () {
235
+ try {
236
+ if ($listgallery.hasClass('epyt-gallery-style-carousel'))
237
+ {
238
+ var thumbheight = $($listgallery.find('.epyt-gallery-thumb').get(0)).height();
239
+ var topval = thumbheight / 2;
240
+ var $pagenums = $listgallery.find('.epyt-pagination:first-child .epyt-pagenumbers');
241
+ $pagenums.css('top', (topval + 15) + "px");
242
+ }
243
+ }
244
+ catch (e) {
245
+ }
246
+ };
247
+ setTimeout(function () {
248
+ pagenumsalign();
249
+ }, 300);
250
+ $(window).resize(pagenumsalign);
251
+
252
+
253
+ $container.on('click', '.epyt-gallery-list .epyt-gallery-thumb', function () {
254
+ $container.find('.epyt-gallery-list .epyt-gallery-thumb').removeClass('epyt-current-video');
255
+ $(this).addClass('epyt-current-video');
256
+ var vid = $(this).data('videoid');
257
+ $container.data('currvid', vid);
258
+ var vidSrc = $iframe.data('ep-gallerysrc').replace('GALLERYVIDEOID', vid);
259
+ if (vidSrc.indexOf('autoplay') > 0)
260
+ {
261
+ vidSrc = vidSrc.replace('autoplay=0', 'autoplay=1');
262
+ }
263
+ else
264
+ {
265
+ vidSrc += '&autoplay=1';
266
+ }
267
+
268
+ $('html, body').animate({
269
+ scrollTop: $iframe.offset().top - parseInt(_EPYT_.gallery_scrolloffset)
270
+ }, 500, function () {
271
+ $iframe.attr('src', vidSrc);
272
+ _EPADashboard_.setupevents($iframe.attr('id'));
273
+ });
274
+ });
275
+
276
+ $container.on('mouseenter', '.epyt-gallery-list .epyt-gallery-thumb', function () {
277
+ $(this).addClass('hover');
278
+ if ($listgallery.hasClass('epyt-gallery-style-carousel') && $container.find('.epyt-pagebutton').first().data('showtitle') == 1)
279
+ {
280
+ $container.find('.epyt-pagenumbers').addClass('hide');
281
+ var ttl = $(this).find('.epyt-gallery-notitle span').text();
282
+ $container.find('.epyt-gallery-rowtitle').text(ttl).addClass('hover');
283
+ }
284
+ });
285
+
286
+ $container.on('mouseleave', '.epyt-gallery-list .epyt-gallery-thumb', function () {
287
+ $(this).removeClass('hover');
288
+ if ($listgallery.hasClass('epyt-gallery-style-carousel') && $container.find('.epyt-pagebutton').first().data('showtitle') == 1)
289
+ {
290
+ $container.find('.epyt-gallery-rowtitle').text('').removeClass('hover');
291
+ if ($container.find('.epyt-pagebutton[data-pagetoken!=""]').length > 0)
292
+ {
293
+ $container.find('.epyt-pagenumbers').removeClass('hide');
294
+ }
295
+ }
296
+ });
297
+
298
+ $container.on('click', '.epyt-pagebutton', function () {
299
+ var pageData = {
300
+ action: 'my_embedplus_gallery_page',
301
+ security: _EPYT_.security,
302
+ options: {
303
+ playlistId: $(this).data('playlistid'),
304
+ pageToken: $(this).data('pagetoken'),
305
+ pageSize: $(this).data('pagesize'),
306
+ columns: $(this).data('columns'),
307
+ showTitle: $(this).data('showtitle'),
308
+ showPaging: $(this).data('showpaging'),
309
+ autonext: $(this).data('autonext'),
310
+ style: $(this).data('style'),
311
+ thumbcrop: $(this).data('thumbcrop')
312
+ }
313
+ };
314
+ if ($(this).data('showdsc'))
315
+ {
316
+ pageData.options.showDsc = $(this).data('showdsc');
317
+ }
318
+
319
+ var forward = $(this).hasClass('epyt-next');
320
+ var currpage = parseInt($container.data('currpage') + "");
321
+ currpage += forward ? 1 : -1;
322
+ $container.data('currpage', currpage);
323
+ $container.find('.epyt-gallery-list').addClass('epyt-loading');
324
+
325
+ $.post(_EPYT_.ajaxurl, pageData, function (response) {
326
+ $container.find('.epyt-gallery-list').html(response);
327
+ $container.find('.epyt-current').each(function () {
328
+ $(this).text($container.data('currpage'));
329
+ });
330
+ $container.find('.epyt-gallery-thumb[data-videoid="' + $container.data('currvid') + '"]').addClass('epyt-current-video');
331
+
332
+ if ($container.find('.epyt-pagebutton').first().data('autonext') == '1')
333
+ {
334
+ $container.find('.epyt-gallery-thumb').first().click();
335
+ }
336
+
337
+ })
338
+ .fail(function () {
339
+ alert('Sorry, there was an error loading the next page.');
340
+ })
341
+ .always(function () {
342
+ $container.find('.epyt-gallery-list').removeClass('epyt-loading');
343
+ pagenumsalign();
344
+ });
345
+
346
+ });
347
+
348
+ });
349
+ });
350
+ })(jQuery);
scripts/ytprefs.min.js CHANGED
@@ -1,13 +1,14 @@
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,evselector:'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]',usingdefault:!0};document.querySelectorAll||(document.querySelectorAll=function(e){var c=document,b=c.documentElement.firstChild,d=c.createElement("STYLE");
2
- b.appendChild(d);c.__qsaels=[];d.styleSheet.cssText=e+"{x:expression(document.__qsaels.push(this))}";a.scrollBy(0,0);return c.__qsaels});"undefined"===typeof a._EPADashboard_&&(a._EPADashboard_={initStarted:!1,checkCount:0,onPlayerReady:function(a){try{if("undefined"!==typeof _EPYT_.epdovol&&_EPYT_.epdovol){var c=parseInt(a.target.getIframe().getAttribute("data-vol"));isNaN(c)||(0===c?a.target.mute():(a.target.isMuted()&&a.target.unMute(),a.target.setVolume(c)))}}catch(b){}setTimeout(function(){try{var c=
3
- _EPADashboard_.justid(a.target.getVideoUrl());_EPADashboard_.jp("ytid="+c)}catch(b){}},1700)},onPlayerStateChange:function(a){var c=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(d){}}},justid:function(a){return/[\?&]v=([^&#]*)/.exec(a)[1]},dynsetupevents:function(){"undefined"===typeof this.epytsetupdone&&_EPADashboard_.setupevents(this.id)},
4
- setupevents:function(a){_EPADashboard_.log("Setting up YT API events: "+a);YT.loaded&&(document.getElementById(a).epytsetupdone=!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);
5
- setTimeout(function(){f.parentNode.removeChild(f)},500)},apiInit:function(){_EPADashboard_.initStarted=!0;setTimeout(function(){for(var a=document.querySelectorAll(_EPYT_.evselector),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||
6
- _EPADashboard_.initStarted?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),e=a(this).find("iframe").first(),c=e.data("ep-gallerysrc"),f=a(this).find(".epyt-gallery-list .epyt-gallery-thumb").first().data("videoid"),c=c.replace("GALLERYVIDEOID",f);e.attr("src",c);var d=b.find(".epyt-gallery-list"),g=function(){try{if(d.hasClass("epyt-gallery-style-carousel")){var b=a(d.find(".epyt-gallery-thumb").get(0)).height()/2;d.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(){b.find(".epyt-gallery-list .epyt-gallery-thumb").removeClass("epyt-current-video");a(this).addClass("epyt-current-video");var c=a(this).data("videoid");b.data("currvid",c);var d=e.data("ep-gallerysrc").replace("GALLERYVIDEOID",c),d=0<d.indexOf("autoplay")?d.replace("autoplay=0","autoplay=1"):d+"&autoplay=1";a("html, body").animate({scrollTop:e.offset().top-parseInt(_EPYT_.gallery_scrolloffset)},
10
- 500,function(){e.attr("src",d)})});b.on("mouseenter",".epyt-gallery-list .epyt-gallery-thumb",function(){a(this).addClass("hover");if(d.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");d.hasClass("epyt-gallery-style-carousel")&&
11
- 1==b.find(".epyt-pagebutton").first().data("showtitle")&&(b.find(".epyt-gallery-rowtitle").text("").removeClass("hover"),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"),
12
- style:a(this).data("style"),thumbcrop:a(this).data("thumbcrop")}};a(this).data("showdsc")&&(c.options.showDsc=a(this).data("showdsc"));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"))});b.find('.epyt-gallery-thumb[data-videoid="'+b.data("currvid")+'"]').addClass("epyt-current-video")}).fail(function(){alert("Sorry, there was an error loading the next page.")}).always(function(){b.find(".epyt-gallery-list").removeClass("epyt-loading");
13
- g()})})})})})(jQuery);
1
+ (function(a,b){a._EPYT_=a._EPYT_||{ajaxurl:"/wp-admin/admin-ajax.php",security:"",gallery_scrolloffset:100,eppathtoscripts:"/wp-content/plugins/youtube-embed-plus/scripts/",epresponsiveselector:["iframe.__youtube_prefs_widget__"],epdovol:!0,evselector:'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]',usingdefault:!0};document.querySelectorAll||(document.querySelectorAll=function(d){var c=document,b=c.documentElement.firstChild,e=c.createElement("STYLE");
2
+ b.appendChild(e);c.__qsaels=[];e.styleSheet.cssText=d+"{x:expression(document.__qsaels.push(this))}";a.scrollBy(0,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=
3
+ _EPADashboard_.justid(d.target.getVideoUrl());_EPADashboard_.jp("ytid="+a)}catch(c){}},1700)},onPlayerStateChange:function(a){var c=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 e=_EPADashboard_.justid(a.target.getVideoUrl());_EPADashboard_.jp("ytid="+e+"&p=1")}catch(g){}}c=b(c).closest(".epyt-gallery");c.length&&"1"==c.find(".epyt-pagebutton").first().data("autonext")&&a.data===YT.PlayerState.ENDED&&(a=c.find(".epyt-current-video"),
4
+ a.length||(a=c.find(".epyt-gallery-thumb").first()),a=a.find(" ~ .epyt-gallery-thumb").first(),a.length?a.click():c.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click())},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=!0,new YT.Player(a,
5
+ {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 e=document.getElementsByTagName("head")[0].appendChild(c);setTimeout(function(){e.parentNode.removeChild(e)},500)},apiInit:function(){_EPADashboard_.initStarted=!0;
6
+ setTimeout(function(){for(var a=document.querySelectorAll(_EPYT_.evselector),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?clearInterval(_EPADashboard_.checkInterval):(_EPADashboard_.apiInit(),_EPADashboard_.log("YT API init"))},
7
+ 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 e=document.createElement("script");e.src="//www.youtube.com/iframe_api";e.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(e)}else YT.loaded&&(_EPADashboard_.apiInit(),_EPADashboard_.log("YT API available"));_EPADashboard_.doubleCheck();
8
+ a.onYouTubeIframeAPIReady="undefined"!==typeof a.onYouTubeIframeAPIReady?a.onYouTubeIframeAPIReady:function(){_EPADashboard_.apiInit();_EPADashboard_.log("YT API ready")}})(window,jQuery);
9
+ (function(a){a(document).ready(function(){a(".epyt-gallery").each(function(){var b=a(this),e=a(this).find("iframe").first(),d=e.data("ep-gallerysrc"),c=a(this).find(".epyt-gallery-list .epyt-gallery-thumb").first().data("videoid"),d=d.replace("GALLERYVIDEOID",c);e.attr("src",d);var f=b.find(".epyt-gallery-list"),g=function(){try{if(f.hasClass("epyt-gallery-style-carousel")){var b=a(f.find(".epyt-gallery-thumb").get(0)).height()/2;f.find(".epyt-pagination:first-child .epyt-pagenumbers").css("top",
10
  b+15+"px")}}catch(c){}};setTimeout(function(){g()},300);a(window).resize(g);b.on("click",".epyt-gallery-list .epyt-gallery-thumb",function(){b.find(".epyt-gallery-list .epyt-gallery-thumb").removeClass("epyt-current-video");a(this).addClass("epyt-current-video");var c=a(this).data("videoid");b.data("currvid",c);var d=e.data("ep-gallerysrc").replace("GALLERYVIDEOID",c),d=0<d.indexOf("autoplay")?d.replace("autoplay=0","autoplay=1"):d+"&autoplay=1";a("html, body").animate({scrollTop:e.offset().top-parseInt(_EPYT_.gallery_scrolloffset)},
11
+ 500,function(){e.attr("src",d);_EPADashboard_.setupevents(e.attr("id"))})});b.on("mouseenter",".epyt-gallery-list .epyt-gallery-thumb",function(){a(this).addClass("hover");if(f.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");
12
+ f.hasClass("epyt-gallery-style-carousel")&&1==b.find(".epyt-pagebutton").first().data("showtitle")&&(b.find(".epyt-gallery-rowtitle").text("").removeClass("hover"),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"),
13
+ showTitle:a(this).data("showtitle"),showPaging:a(this).data("showpaging"),autonext:a(this).data("autonext"),style:a(this).data("style"),thumbcrop:a(this).data("thumbcrop")}};a(this).data("showdsc")&&(c.options.showDsc=a(this).data("showdsc"));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"))});
14
+ b.find('.epyt-gallery-thumb[data-videoid="'+b.data("currvid")+'"]').addClass("epyt-current-video");"1"==b.find(".epyt-pagebutton").first().data("autonext")&&b.find(".epyt-gallery-thumb").first().click()}).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;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.epyt-current-video .epyt-gallery-playhover,.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;width:auto}.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:75%;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-allthumbs.epyt-cols-1 .epyt-gallery-thumb{width:100%}.epyt-gallery-allthumbs.epyt-cols-2 .epyt-gallery-thumb{width:50%}.epyt-gallery-allthumbs.epyt-cols-3 .epyt-gallery-thumb{width:33.333%}.epyt-gallery-allthumbs.epyt-cols-4 .epyt-gallery-thumb{width:25%}.epyt-gallery-allthumbs.epyt-cols-5 .epyt-gallery-thumb{width:20%}.epyt-gallery-allthumbs.epyt-cols-6 .epyt-gallery-thumb{width:16.666%}.epyt-gallery-allthumbs.epyt-cols-7 .epyt-gallery-thumb{width:14.285%}.epyt-gallery-allthumbs.epyt-cols-8 .epyt-gallery-thumb{width:12.5%}.epyt-gallery-allthumbs.epyt-cols-9 .epyt-gallery-thumb{width:11.111%}.epyt-gallery-allthumbs.epyt-cols-10 .epyt-gallery-thumb{width:10%}.epyt-gallery-allthumbs.epyt-cols-11 .epyt-gallery-thumb{width:9.090%}.epyt-gallery-allthumbs.epyt-cols-12 .epyt-gallery-thumb{width:8.333%}.epyt-gallery-allthumbs.epyt-cols-13 .epyt-gallery-thumb{width:7.692%}.epyt-gallery-allthumbs.epyt-cols-14 .epyt-gallery-thumb{width:7.142%}.epyt-gallery-allthumbs.epyt-cols-15 .epyt-gallery-thumb{width:6.666%}.epyt-gallery-allthumbs.epyt-cols-16 .epyt-gallery-thumb{width:6.25%}.epyt-gallery-allthumbs.epyt-cols-17 .epyt-gallery-thumb{width:5.882%}.epyt-gallery-allthumbs.epyt-cols-18 .epyt-gallery-thumb{width:5.555%}.epyt-gallery-allthumbs.epyt-cols-19 .epyt-gallery-thumb{width:5.263%}.epyt-gallery-allthumbs.epyt-cols-20 .epyt-gallery-thumb{width:5%}.epyt-gallery-allthumbs.epyt-thumb-portal .epyt-gallery-thumb .epyt-gallery-img{border-radius:50%;padding-top:100%!important}.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}
1
+ .epyt-gallery-clear,.epyt-gallery-rowbreak,.epyt-pagination{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.epyt-current-video .epyt-gallery-playhover,.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;width:auto}.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:75%;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{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-allthumbs.epyt-cols-1 .epyt-gallery-thumb{width:100%}.epyt-gallery-allthumbs.epyt-cols-2 .epyt-gallery-thumb{width:50%}.epyt-gallery-allthumbs.epyt-cols-3 .epyt-gallery-thumb{width:33.333%}.epyt-gallery-allthumbs.epyt-cols-4 .epyt-gallery-thumb{width:25%}.epyt-gallery-allthumbs.epyt-cols-5 .epyt-gallery-thumb{width:20%}.epyt-gallery-allthumbs.epyt-cols-6 .epyt-gallery-thumb{width:16.666%}.epyt-gallery-allthumbs.epyt-cols-7 .epyt-gallery-thumb{width:14.285%}.epyt-gallery-allthumbs.epyt-cols-8 .epyt-gallery-thumb{width:12.5%}.epyt-gallery-allthumbs.epyt-cols-9 .epyt-gallery-thumb{width:11.111%}.epyt-gallery-allthumbs.epyt-cols-10 .epyt-gallery-thumb{width:10%}.epyt-gallery-allthumbs.epyt-cols-11 .epyt-gallery-thumb{width:9.090%}.epyt-gallery-allthumbs.epyt-cols-12 .epyt-gallery-thumb{width:8.333%}.epyt-gallery-allthumbs.epyt-cols-13 .epyt-gallery-thumb{width:7.692%}.epyt-gallery-allthumbs.epyt-cols-14 .epyt-gallery-thumb{width:7.142%}.epyt-gallery-allthumbs.epyt-cols-15 .epyt-gallery-thumb{width:6.666%}.epyt-gallery-allthumbs.epyt-cols-16 .epyt-gallery-thumb{width:6.25%}.epyt-gallery-allthumbs.epyt-cols-17 .epyt-gallery-thumb{width:5.882%}.epyt-gallery-allthumbs.epyt-cols-18 .epyt-gallery-thumb{width:5.555%}.epyt-gallery-allthumbs.epyt-cols-19 .epyt-gallery-thumb{width:5.263%}.epyt-gallery-allthumbs.epyt-cols-20 .epyt-gallery-thumb{width:5%}.epyt-gallery-allthumbs.epyt-thumb-portal .epyt-gallery-thumb .epyt-gallery-img{border-radius:50%;padding-top:100%!important}.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}.epyt-gallery-subscribe{text-align:center;padding:15px 0 10px;clear:both}.epyt-gallery-subscribe a.epyt-gallery-subbutton,.epyt-gallery-subscribe a.epyt-gallery-subbutton:hover{display:inline-block;padding:5px 10px;background-color:#E62117!important;color:#fff!important;text-decoration:none!important;border-radius:3px}.epyt-gallery-subscribe a.epyt-gallery-subbutton img{width:20px!important;height:auto!important;vertical-align:middle!important;padding:0 6px 3px 0}
youtube.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: YouTube
4
  Plugin URI: http://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx
5
  Description: YouTube embed plugin. Embed a responsive YouTube video, playlist gallery, or channel gallery. Add video thumbnails, analytics, SEO, caching...
6
- Version: 11.0.1
7
  Author: EmbedPlus Team
8
  Author URI: http://www.embedplus.com
9
  */
@@ -32,7 +32,7 @@
32
  class YouTubePrefs
33
  {
34
 
35
- public static $version = '11.0.1';
36
  public static $opt_version = 'version';
37
  public static $optembedwidth = null;
38
  public static $optembedheight = null;
@@ -95,6 +95,11 @@ class YouTubePrefs
95
  public static $opt_gallery_style = 'gallery_style';
96
  public static $opt_gallery_scrolloffset = 'gallery_scrolloffset';
97
  public static $opt_gallery_showtitle = 'gallery_showtitle';
 
 
 
 
 
98
  public static $opt_gallery_customarrows = 'gallery_customarrows';
99
  public static $opt_gallery_customprev = 'gallery_customprev';
100
  public static $opt_gallery_customnext = 'gallery_customnext';
@@ -108,6 +113,7 @@ class YouTubePrefs
108
  public static $epbase = '//www.embedplus.com';
109
  public static $double_plugin = false;
110
  public static $scriptsprinted = 0;
 
111
  public static $badentities = array('&#215;', '×', '&#8211;', '–', '&amp;', '&#038;', '&#38;');
112
  public static $goodliterals = array('x', 'x', '--', '--', '&', '&', '&');
113
  ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -129,6 +135,7 @@ class YouTubePrefs
129
 
130
  public function __construct()
131
  {
 
132
  add_action('admin_init', array("YouTubePrefs", 'check_double_plugin_warning'));
133
 
134
  self::$alloptions = get_option(self::$opt_alloptions);
@@ -194,6 +201,11 @@ class YouTubePrefs
194
  add_action('wp_head', array('YouTubePrefs', 'do_ogvideo'));
195
  }
196
  }
 
 
 
 
 
197
  }
198
 
199
  public static function show_glance_list()
@@ -437,7 +449,7 @@ class YouTubePrefs
437
  }
438
  }
439
  else if (isset($linkparams['list']))
440
- {
441
  // if playlist
442
  try
443
  {
@@ -537,7 +549,7 @@ class YouTubePrefs
537
  {
538
  add_thickbox();
539
 
540
- $wizhref = self::$epbase . '/wpembedcode-simple-search.aspx?pluginversion=' . YouTubePrefs::$version .
541
  '&wpversion=' . get_bloginfo('version') .
542
  '&settingsurl=' . urlencode(admin_url('admin.php?page=youtube-my-preferences#jumpdefaults')) .
543
  '&dashurl=' . urlencode(admin_url('admin.php?page=youtube-ep-analytics-dashboard')) .
@@ -670,7 +682,7 @@ class YouTubePrefs
670
  $loggedin = current_user_can('edit_posts');
671
  if (!($loggedin && self::$alloptions[self::$opt_admin_off_scripts]))
672
  {
673
- wp_enqueue_script('__ytprefsfitvids__', plugins_url('scripts/fitvids.min.js', __FILE__), array('__ytprefs__'), false, true);
674
  }
675
  }
676
 
@@ -725,6 +737,11 @@ class YouTubePrefs
725
  $_gallery_columns = 3;
726
  $_gallery_scrolloffset = 20;
727
  $_gallery_showtitle = 1;
 
 
 
 
 
728
  $_gallery_customarrows = 0;
729
  $_gallery_customprev = 'Prev';
730
  $_gallery_customnext = 'Next';
@@ -792,8 +809,13 @@ class YouTubePrefs
792
  $_gallery_columns = self::tryget($arroptions, self::$opt_gallery_columns, 3);
793
  $_gallery_scrolloffset = self::tryget($arroptions, self::$opt_gallery_scrolloffset, 20);
794
  $_gallery_showtitle = self::tryget($arroptions, self::$opt_gallery_showtitle, 1);
 
 
795
  $_gallery_style = self::tryget($arroptions, self::$opt_gallery_style, 'grid');
796
  $_gallery_thumbcrop = self::tryget($arroptions, self::$opt_gallery_thumbcrop, 'box');
 
 
 
797
  $_gallery_customarrows = self::tryget($arroptions, self::$opt_gallery_customarrows, $_gallery_customarrows);
798
  $_gallery_customnext = self::tryget($arroptions, self::$opt_gallery_customnext, $_gallery_customnext);
799
  $_gallery_customprev = self::tryget($arroptions, self::$opt_gallery_customprev, $_gallery_customprev);
@@ -855,6 +877,11 @@ class YouTubePrefs
855
  self::$opt_gallery_columns => $_gallery_columns,
856
  self::$opt_gallery_scrolloffset => $_gallery_scrolloffset,
857
  self::$opt_gallery_showtitle => $_gallery_showtitle,
 
 
 
 
 
858
  self::$opt_gallery_customarrows => $_gallery_customarrows,
859
  self::$opt_gallery_customnext => $_gallery_customnext,
860
  self::$opt_gallery_customprev => $_gallery_customprev,
@@ -915,9 +942,9 @@ class YouTubePrefs
915
 
916
  public static function ao_override_jsexclude($exclude)
917
  {
918
- if (strpos($exclude, 'ytprefs.min.js') === false)
919
  {
920
- return $exclude . ",ytprefs.min.js,__ytprefs__";
921
  }
922
  return $exclude;
923
  }
@@ -971,6 +998,8 @@ class YouTubePrefs
971
  $options->pageSize = min(intval($options->pageSize), 50);
972
  $options->columns = intval($options->columns);
973
  $options->showTitle = intval($options->showTitle);
 
 
974
  $options->showDsc = intval($options->showDsc);
975
  $options->thumbcrop = sanitize_html_class($options->thumbcrop);
976
  $options->style = sanitize_html_class($options->style);
@@ -992,7 +1021,7 @@ class YouTubePrefs
992
  {
993
  try
994
  {
995
- $spdckey = self::$spdcprefix . '_' . md5($apiEndpoint . $options->columns . $options->style . $options->showTitle . $options->showDsc . $options->thumbcrop);
996
  $spdcval = get_transient($spdckey);
997
  if (!empty($spdcval))
998
  {
@@ -1009,6 +1038,12 @@ class YouTubePrefs
1009
  $code = '';
1010
 
1011
  $apiResult = wp_remote_get($apiEndpoint);
 
 
 
 
 
 
1012
  if (self::$alloptions[self::$opt_debugmode] == 1 && current_user_can('manage_options'))
1013
  {
1014
  $redactedEndpoint = preg_replace('@&key=[^&]+@i', '&key=PRIVATE', $apiEndpoint);
@@ -1021,7 +1056,7 @@ class YouTubePrefs
1021
  {
1022
  if (isset($jsonResult->error->message))
1023
  {
1024
- return '<div>Sorry, there was a YouTube API error: <em>' . strip_tags($jsonResult->error->message) . '</em></div>';
1025
  }
1026
  return '<div>Sorry, there may be an issue with your YouTube API key. Please enter a valid key to embed galleries.</div>';
1027
  }
@@ -1057,6 +1092,10 @@ class YouTubePrefs
1057
  }
1058
 
1059
  $code.= '<div class="epyt-gallery-allthumbs ' . $cropclass . $colclass . '">';
 
 
 
 
1060
  if (isset($jsonResult->items) && $jsonResult->items != null && is_array($jsonResult->items))
1061
  {
1062
 
@@ -1119,43 +1158,46 @@ class YouTubePrefs
1119
 
1120
  $totalPages = ceil($totalResults / $resultsPerPage);
1121
  $pagination = '<div class="epyt-pagination">';
1122
- //if ($totalPages > 1)
1123
- {
1124
- //if (!empty($prevPageToken))
1125
- {
1126
- $txtprev = self::$alloptions[self::$opt_gallery_customarrows] ? self::$alloptions[self::$opt_gallery_customprev] : _('Prev');
1127
- $pagination .= '<div class="epyt-pagebutton epyt-prev ' . (empty($prevPageToken) ? ' hide ' : '') . '" data-playlistid="' . esc_attr($options->playlistId)
1128
- . '" data-pagesize="' . intval($options->pageSize)
1129
- . '" data-pagetoken="' . esc_attr($prevPageToken)
1130
- . '" data-style="' . esc_attr($options->style)
1131
- . '" data-columns="' . intval($options->columns)
1132
- . '" data-showtitle="' . intval($options->showTitle)
1133
- . ((self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 8 && $options->style == 'listview' && $options->showDsc) ? '" data-showdsc="' . intval($options->showDsc) : '')
1134
- . ((self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 8 && !in_array($options->thumbcrop, array('box', ''))) ? '" data-thumbcrop="' . $options->thumbcrop : '')
1135
- . '"><div class="arrow">&laquo;</div> <div>' . $txtprev . '</div></div>';
1136
- }
1137
 
1138
- $pagination .= '<div class="epyt-pagenumbers ' . ($totalPages > 1 ? '' : 'hide') . '">';
1139
- $pagination .= '<div class="epyt-current">1</div><div class="epyt-pageseparator"> / </div><div class="epyt-totalpages">' . $totalPages . '</div>';
1140
- $pagination .= '</div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1141
 
1142
- //if (!empty($nextPageToken))
1143
- {
1144
- $txtnext = self::$alloptions[self::$opt_gallery_customarrows] ? self::$alloptions[self::$opt_gallery_customnext] : _('Next');
1145
- $pagination .= '<div class="epyt-pagebutton epyt-next' . (empty($nextPageToken) ? ' hide ' : '') . '" data-playlistid="' . esc_attr($options->playlistId)
1146
- . '" data-pagesize="' . intval($options->pageSize)
1147
- . '" data-pagetoken="' . esc_attr($nextPageToken)
1148
- . '" data-style="' . esc_attr($options->style)
1149
- . '" data-columns="' . intval($options->columns)
1150
- . '" data-showtitle="' . intval($options->showTitle)
1151
- . ((self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0 && $options->style == 'listview' && $options->showDsc) ? '" data-showdsc="' . intval($options->showDsc) : '')
1152
- . ((self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 8 && !in_array($options->thumbcrop, array('box', ''))) ? '" data-thumbcrop="' . $options->thumbcrop : '')
1153
- . '"><div>' . $txtnext . '</div> <div class="arrow">&raquo;</div></div>';
1154
- }
1155
- $pagination .= '<div class="epyt-loader"><img width="16" height="11" src="' . plugins_url('images/gallery-page-loader.gif', __FILE__) . '"></div>';
1156
- }
1157
  $pagination .= '</div>';
1158
 
 
 
 
 
1159
  $code = $pagination . $code . $pagination;
1160
 
1161
  if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0 && self::$alloptions[self::$opt_spdc] == 1)
@@ -1213,7 +1255,7 @@ class YouTubePrefs
1213
  {
1214
  if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')
1215
  {
1216
- check_ajax_referer('embedplus-nonce', 'security');
1217
  $options = (object) $_POST['options'];
1218
  $options->apiKey = self::$alloptions[self::$opt_apikey];
1219
  echo self::get_gallery_page($options);
@@ -1360,7 +1402,7 @@ class YouTubePrefs
1360
  }
1361
  else
1362
  {
1363
-
1364
  if (isset($linkparams['list']))
1365
  {
1366
  $odata = self::get_oembed('http://youtube.com/playlist?list=' . $linkparams['list'], 1920, 1280);
@@ -1416,15 +1458,25 @@ class YouTubePrefs
1416
  $gallery_options->pageSize = $finalparams[self::$opt_gallery_pagesize];
1417
  $gallery_options->columns = intval($finalparams[self::$opt_gallery_columns]);
1418
  $gallery_options->showTitle = intval($finalparams[self::$opt_gallery_showtitle]);
 
 
1419
  $gallery_options->showDsc = intval($finalparams[self::$opt_gallery_showdsc]);
1420
  $gallery_options->style = $finalparams[self::$opt_gallery_style];
1421
  $gallery_options->thumbcrop = $finalparams[self::$opt_gallery_thumbcrop];
1422
  $gallery_options->apiKey = self::$alloptions[self::$opt_apikey];
1423
 
 
 
 
 
 
 
 
 
1424
  $dynsrc = 'data-ep-gallery';
1425
  $galleryWrapper1 = '<div class="epyt-gallery" data-currpage="1">';
1426
  $galleryWrapper2 = '</div>';
1427
- $galleryCode = '<div class="epyt-gallery-list epyt-gallery-style-' . esc_attr($gallery_options->style) . '">' .
1428
  self::get_gallery_page($gallery_options) .
1429
  '</div>';
1430
  $videoidoutput = 'GALLERYVIDEOID';
@@ -1714,7 +1766,7 @@ class YouTubePrefs
1714
  public static function doftpostimgfor($post)
1715
  {
1716
  $search_content = isset($post->post_content) ? $post->post_content : '';
1717
- $search_content = substr(wp_strip_all_tags($search_content), 0, 4000);
1718
 
1719
  $search_content = apply_filters('youtube_embedplus_video_content', $search_content);
1720
 
@@ -1739,9 +1791,32 @@ class YouTubePrefs
1739
  $linkparams['v'] = array_pop($vtemp);
1740
  }
1741
 
 
1742
 
 
 
 
 
 
 
 
 
 
 
 
 
1743
 
1744
- $just_id = $linkparams['v'];
 
 
 
 
 
 
 
 
 
 
1745
 
1746
  if ($just_id != null)
1747
  {
@@ -2115,11 +2190,11 @@ class YouTubePrefs
2115
  $new_pointer_content .= '<p>'; // ooopointer
2116
  if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
2117
  {
2118
- $new_pointer_content .= __("This update improves HTTPS support for both Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions &raquo;</a>");
2119
  }
2120
  else
2121
  {
2122
- $new_pointer_content .= __("This update improves HTTPS support for both Free and Pro versions.");
2123
  }
2124
  $new_pointer_content .= '</p>';
2125
 
@@ -2208,6 +2283,9 @@ class YouTubePrefs
2208
  $new_options[self::$opt_defaultvol] = self::postchecked(self::$opt_defaultvol) ? 1 : 0;
2209
  $new_options[self::$opt_dohl] = self::postchecked(self::$opt_dohl) ? 1 : 0;
2210
  $new_options[self::$opt_gallery_showtitle] = self::postchecked(self::$opt_gallery_showtitle) ? 1 : 0;
 
 
 
2211
  $new_options[self::$opt_gallery_customarrows] = self::postchecked(self::$opt_gallery_customarrows) ? 1 : 0;
2212
  $new_options[self::$opt_gallery_showdsc] = self::postchecked(self::$opt_gallery_showdsc) ? 1 : 0;
2213
 
@@ -2313,6 +2391,32 @@ class YouTubePrefs
2313
  $new_options[self::$opt_gallery_thumbcrop] = $_gallery_thumbcrop;
2314
 
2315
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2316
  $_gallery_custom_prev = 'Prev';
2317
  try
2318
  {
@@ -2477,6 +2581,7 @@ class YouTubePrefs
2477
  .brightpro {background-image: linear-gradient(to bottom,#ff5500,#cc2200) !important; color: #ffffff;}
2478
  #boxdefaultdims {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_defaultdims] ? '' : 'display: none;' ?>}
2479
  #boxcustomarrows {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_gallery_customarrows] ? '' : 'display: none;' ?>}
 
2480
  .textinput {border-width: 2px !important;}
2481
  h3.sect {border-radius: 10px; background-color: #D9E9F7; padding: 5px 5px 5px 10px; position: relative; font-weight: bold;}
2482
  h3.sect a {text-decoration: none; color: #E20000;}
@@ -2519,6 +2624,7 @@ class YouTubePrefs
2519
  .wp-pointer-buttons a.close {margin-top: 0 !important;}
2520
  .pad20{padding: 20px 0 20px 0;}
2521
  .ssgallery {float: right; width: 130px; height: auto; margin-left: 15px; border: 3px solid #ffffff;}
 
2522
  .ssaltgallery {float: right; height: auto; margin-right: 10px; margin-left: 15px; margin-bottom: 10px; width: 350px;}
2523
  .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;
2524
  -webkit-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75);
@@ -2550,10 +2656,13 @@ class YouTubePrefs
2550
  <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).
2551
  </p>
2552
  <p>
2553
- <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 &raquo;</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.
 
 
 
2554
  </p>
2555
  <p>
2556
- <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.
2557
  </p>
2558
  <p>
2559
  <b>Examples:</b><br><br>
@@ -2598,7 +2707,7 @@ class YouTubePrefs
2598
  <p>
2599
  <?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.") ?>
2600
  </p>
2601
- <?php // self::save_changes_button(); ?>
2602
 
2603
  <div class="ytindent chx">
2604
  <p>
@@ -2639,7 +2748,7 @@ class YouTubePrefs
2639
  </p>
2640
  <p>
2641
  <input name="<?php echo self::$opt_theme; ?>" id="<?php echo self::$opt_theme; ?>" <?php checked($all[self::$opt_theme], 'dark'); ?> type="checkbox" class="checkbox">
2642
- <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>
2643
  </p>
2644
  <p>
2645
  <input name="<?php echo self::$opt_color; ?>" id="<?php echo self::$opt_color; ?>" <?php checked($all[self::$opt_color], 'red'); ?> type="checkbox" class="checkbox">
@@ -2704,7 +2813,9 @@ class YouTubePrefs
2704
  </p>
2705
  <p>
2706
  <input name="<?php echo self::$opt_autohide; ?>" id="<?php echo self::$opt_autohide; ?>" <?php checked($all[self::$opt_autohide], 1); ?> type="checkbox" class="checkbox">
2707
- <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>
 
 
2708
  </p>
2709
  <!-- <p>
2710
  <input name="<?php echo self::$opt_ssl; ?>" id="<?php echo self::$opt_ssl; ?>" <?php checked($all[self::$opt_ssl], 1); ?> type="checkbox" class="checkbox">
@@ -2715,13 +2826,13 @@ class YouTubePrefs
2715
  </p>-->
2716
  <p>
2717
  <input name="<?php echo self::$opt_defaultvol; ?>" id="<?php echo self::$opt_defaultvol; ?>" <?php checked($all[self::$opt_defaultvol], 1); ?> type="checkbox" class="checkbox">
2718
- <span id="boxdefaultvol">
2719
- 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]); ?>" >
2720
- </span>
2721
  <label for="<?php echo self::$opt_defaultvol; ?>">
2722
  <b class="chktitle">Volume Initialization: </b>
2723
  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 &raquo;</a>
2724
  </label>
 
 
 
2725
  </p>
2726
 
2727
  <p>
@@ -2747,7 +2858,7 @@ class YouTubePrefs
2747
  <p>
2748
  <input name="<?php echo self::$opt_playlistorder; ?>" id="<?php echo self::$opt_playlistorder; ?>" <?php checked($all[self::$opt_playlistorder], 1); ?> type="checkbox" class="checkbox">
2749
  <label for="<?php echo self::$opt_playlistorder; ?>">
2750
- <b class="chktitle">Playlist Ordering: <sup class="orange bold">NEW</sup></b>
2751
  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).
2752
  Note that this is not for setting the thumbnail list order of galleries, just the standard playlist player that YouTube provides.
2753
  </label>
@@ -2758,7 +2869,7 @@ class YouTubePrefs
2758
  </div>
2759
 
2760
  <div class="jumper" id="jumpcompat"></div>
2761
- <h3 class="sect">Compatibility Settings<sup class="orange bold">NEW</sup> <a href="#top" class="totop">&#9650; top</a></h3>
2762
  <p>
2763
  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.
2764
  </p>
@@ -2773,7 +2884,7 @@ class YouTubePrefs
2773
  <p>
2774
  <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">
2775
  <label for="<?php echo self::$opt_admin_off_scripts; ?>">
2776
- <b class="chktitle">Turn Off Scripts While Editing: <sup class="orange bold">NEW</sup></b>
2777
  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.
2778
  Don't worry, all other visitors to your site will still view your site normally.
2779
  </label>
@@ -2800,7 +2911,7 @@ class YouTubePrefs
2800
  <p>
2801
  <input name="<?php echo self::$opt_evselector_light; ?>" id="<?php echo self::$opt_evselector_light; ?>" <?php checked($all[self::$opt_evselector_light], 1); ?> type="checkbox" class="checkbox">
2802
  <label for="<?php echo self::$opt_evselector_light; ?>">
2803
- <b class="chktitle">Theme Video Problems: <sup class="orange bold">NEW</sup></b>
2804
  Check this option if you're having issues with autoplayed videos or background videos etc. that have been generated by your theme.
2805
  </label>
2806
  </p>
@@ -2814,23 +2925,29 @@ class YouTubePrefs
2814
 
2815
  </div>
2816
  <div class="jumper" id="jumpgallery"></div>
2817
- <h3 class="sect">Gallery Settings and Directions<sup class="orange bold">NEW</sup> <a href="#top" class="totop">&#9650; top</a></h3>
2818
  <img class="ssgallery" src="<?php echo plugins_url('images/ssgallery.png', __FILE__) ?>">
2819
  <p>
2820
  <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 &raquo;</a>. <strong>First, you must obtain your YouTube API key</strong>.
2821
- Don't worry, it's an easy process. Just <a href="https://www.youtube.com/watch?v=px8LvNIVblg" target="_blank">click this link &raquo;</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.
2822
  </p>
2823
- <!-- <p>
2824
- Simply add the following parameter to the end of your playlist url:
2825
  </p>
2826
  <p><code>&layout=gallery</code></p>
2827
  <p>For example, below is a playlist that has been converted into a gallery. Notice the new layout parameter, with no spaces:</p>
2828
  <p>
2829
- <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>
 
 
 
2830
  </p>
 
 
 
2831
  <p class="smallnote">
2832
- Note: The PRO wizard has steps to fully create playlist, channel, and gallery codes like the above.
2833
- </p>-->
2834
  <p>
2835
  Below are the settings for galleries:
2836
  </p>
@@ -2860,17 +2977,32 @@ class YouTubePrefs
2860
  <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]); ?>">
2861
  Enter how many thumbnails can fit per row.
2862
  </p>
 
 
 
 
2863
  <p>
2864
  <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">
 
 
 
2865
  <span id="boxcustomarrows">
2866
  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;"> &nbsp;
2867
  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;">
2868
  </span>
2869
-
2870
- <label for="<?php echo self::$opt_gallery_customarrows; ?>">
2871
- <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&eacute;c&eacute;dent and Next with Suivant.
 
 
2872
  </label>
 
 
 
 
2873
  </p>
 
 
2874
  <p>
2875
  <label for="<?php echo self::$opt_gallery_scrolloffset; ?>"><b class="chktitle">Scroll Offset:</b></label>
2876
  <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]); ?>">
@@ -2880,19 +3012,26 @@ class YouTubePrefs
2880
  <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">
2881
  <label for="<?php echo self::$opt_gallery_showtitle; ?>"><b class="chktitle">Show Thumbnail Title:</b> Show titles with each thumbnail.</label>
2882
  </p>
2883
- <div class="smallnote pad20">
2884
- <strong class="orange">Note:</strong> We have an instructional video that shows how to generate the codes needed to embed two different types of galleries using the FREE and PRO version of the plugin:
 
 
 
 
 
 
2885
  <ol>
2886
  <li>a gallery from an entire YouTube channel, and</li>
2887
  <li>a gallery from a specific playlist</li>
2888
  </ol>
2889
- We advise that you <a href="https://www.youtube.com/watch?v=XvFL-Rr-2Qo" target="_blank">watch the video here &raquo;</a> with YouTube.com annotations turned on so you don't miss important steps.
2890
- The PRO wizard is an alternate way to fully create playlist, channel, and gallery codes.
 
 
2891
  </div>
2892
-
2893
  </div>
2894
 
2895
- <?php // self::save_changes_button(); ?>
2896
 
2897
  <div class="upgchecks">
2898
  <h3 class="sect">PRO Features</h3>
@@ -2911,7 +3050,7 @@ class YouTubePrefs
2911
  <option value="carousel" <?php echo 'carousel' === $cleanstyle ? 'selected' : '' ?> >Horizontal Slider</option>
2912
  </select>
2913
  <label for="<?php echo self::$opt_gallery_style; ?>">
2914
- <b>(PRO)</b> <b class="chktitle">Alternate Gallery Styling: <sup class="orange">NEW</sup></b></b>
2915
  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.
2916
  <a target="_blank" href="<?php echo self::$epbase ?>/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx">Read more here &raquo;</a>
2917
  </label>
@@ -2936,7 +3075,7 @@ class YouTubePrefs
2936
  <option value="portal" <?php echo 'portal' === $cleancrop ? 'selected' : '' ?> >Circular</option>
2937
  </select>
2938
  <label for="<?php echo self::$opt_gallery_thumbcrop; ?>">
2939
- <b>(PRO)</b> <b class="chktitle">Gallery Thumbnail Shape: <sup class="orange">NEW</sup></b></b>
2940
  Differentiate your gallery by showing different thumbnail shapes. We currently offer rectangle and circle shapes.
2941
  </label>
2942
  </p>
@@ -3045,7 +3184,7 @@ class YouTubePrefs
3045
  <option value="">Gallery Style</option>
3046
  </select>
3047
  <label>
3048
- <b class="chktitle">Alternate Gallery Styling: <sup class="orange">NEW</sup></b> <span class="pronon">(PRO Users)</span>
3049
  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.
3050
  <a target="_blank" href="<?php echo self::$epbase ?>/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx">Read more here &raquo;</a>
3051
  </label>
@@ -3067,7 +3206,7 @@ class YouTubePrefs
3067
  <option value="">Select Thumbnail Shape</option>
3068
  </select>
3069
  <label>
3070
- <b class="chktitle">Gallery Thumbnail Shape: <sup class="orange">NEW</sup></b> <span class="pronon">(PRO Users)</span>
3071
  Differentiate your gallery by showing different thumbnail shapes. We currently offer rectangle and circle shapes.
3072
  <a target="_blank" href="<?php echo self::$epbase ?>/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx">Read more here &raquo;</a>
3073
  </label>
@@ -3133,7 +3272,7 @@ class YouTubePrefs
3133
  ?>
3134
  <div class="clearboth"></div>
3135
  </div>
3136
- <?php // self::save_changes_button(); ?>
3137
 
3138
  <hr>
3139
 
@@ -3144,7 +3283,7 @@ class YouTubePrefs
3144
  <?php _e("How To Override Defaults / Other Options") ?> <a href="#top" class="totop">&#9650; top</a>
3145
  </h3>
3146
  <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 '&'.
3147
- <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">&#9658; Customize</a> button that you will see inside the wizard, instead of memorizing the following.</span>
3148
  <?php
3149
  _e('<ul>');
3150
  _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>");
@@ -3291,7 +3430,8 @@ class YouTubePrefs
3291
  <br>
3292
  <span style="display: none;" id="prokeyloading" class="orange bold">Verifying...</span>
3293
  <span class="orange bold" style="display: none;" id="prokeysuccess">Success! Please refresh this page.</span>
3294
- <span class="orange bold" style="display: none;" id="prokeyfailed">Sorry, that seems to be an invalid key, or it has been used already.</span>
 
3295
 
3296
  </form>
3297
 
@@ -3384,6 +3524,18 @@ class YouTubePrefs
3384
  }
3385
  }
3386
 
 
 
 
 
 
 
 
 
 
 
 
 
3387
  if (jQuery("#<?php echo self::$opt_defaultvol; ?>").is(":checked"))
3388
  {
3389
  if (!(jQuery.isNumeric(jQuery.trim(jQuery("#<?php echo self::$opt_vol; ?>").val()))))
@@ -3478,6 +3630,19 @@ class YouTubePrefs
3478
 
3479
  });
3480
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3481
  jQuery('#<?php echo self::$opt_dynload; ?>').change(function ()
3482
  {
3483
  if (jQuery(this).is(":checked"))
@@ -3659,7 +3824,7 @@ class YouTubePrefs
3659
  prokeyval = jQuery('#opt_pro').val();
3660
 
3661
  var tempscript = document.createElement("script");
3662
- tempscript.src = "//www.embedplus.com/dashboard/wordpress-pro-validatejp.aspx?simple=1&prokey=" + prokeyval + "&domain=" + mydomain;
3663
  var n = document.getElementsByTagName("head")[0].appendChild(tempscript);
3664
  setTimeout(function () {
3665
  n.parentNode.removeChild(n);
@@ -3695,6 +3860,30 @@ class YouTubePrefs
3695
 
3696
  };
3697
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3698
  });
3699
  </script>
3700
  <?php
@@ -3749,7 +3938,7 @@ class YouTubePrefs
3749
  }";
3750
  wp_add_inline_style('__EPYT__style', $custom_css);
3751
 
3752
- wp_enqueue_script('__ytprefs__', plugins_url('scripts/ytprefs.min.js', __FILE__), array('jquery'));
3753
 
3754
  if (self::$alloptions[self::$opt_old_script_method] != 1)
3755
  {
@@ -3771,7 +3960,7 @@ class YouTubePrefs
3771
  if (!is_admin() && (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0) && self::$alloptions[self::$opt_dynload] == 1)
3772
  {
3773
  wp_enqueue_style('__dyntype__', plugins_url('scripts/embdyn.min.css', __FILE__));
3774
- wp_enqueue_script('__dynload__', plugins_url('scripts/embdyn.min.js', __FILE__), array('jquery'));
3775
  }
3776
  }
3777
  }
@@ -4047,4 +4236,13 @@ class YouTubePrefs
4047
  <?php
4048
  }
4049
  }
 
 
 
 
 
 
 
 
 
4050
 
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: 11.1
7
  Author: EmbedPlus Team
8
  Author URI: http://www.embedplus.com
9
  */
32
  class YouTubePrefs
33
  {
34
 
35
+ public static $version = '11.1';
36
  public static $opt_version = 'version';
37
  public static $optembedwidth = null;
38
  public static $optembedheight = null;
95
  public static $opt_gallery_style = 'gallery_style';
96
  public static $opt_gallery_scrolloffset = 'gallery_scrolloffset';
97
  public static $opt_gallery_showtitle = 'gallery_showtitle';
98
+ public static $opt_gallery_showpaging = 'gallery_showpaging';
99
+ public static $opt_gallery_autonext = 'gallery_autonext';
100
+ public static $opt_gallery_channelsub = 'gallery_channelsub';
101
+ public static $opt_gallery_channelsublink = 'gallery_channelsublink';
102
+ public static $opt_gallery_channelsubtext = 'gallery_channelsubtext';
103
  public static $opt_gallery_customarrows = 'gallery_customarrows';
104
  public static $opt_gallery_customprev = 'gallery_customprev';
105
  public static $opt_gallery_customnext = 'gallery_customnext';
113
  public static $epbase = '//www.embedplus.com';
114
  public static $double_plugin = false;
115
  public static $scriptsprinted = 0;
116
+ public static $min = '.min';
117
  public static $badentities = array('&#215;', '×', '&#8211;', '–', '&amp;', '&#038;', '&#38;');
118
  public static $goodliterals = array('x', 'x', '--', '--', '&', '&', '&');
119
  ///////////////////////////////////////////////////////////////////////////////////////////////////
135
 
136
  public function __construct()
137
  {
138
+
139
  add_action('admin_init', array("YouTubePrefs", 'check_double_plugin_warning'));
140
 
141
  self::$alloptions = get_option(self::$opt_alloptions);
201
  add_action('wp_head', array('YouTubePrefs', 'do_ogvideo'));
202
  }
203
  }
204
+
205
+ if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG)
206
+ {
207
+ self::$min = '';
208
+ }
209
  }
210
 
211
  public static function show_glance_list()
449
  }
450
  }
451
  else if (isset($linkparams['list']))
452
+ {
453
  // if playlist
454
  try
455
  {
549
  {
550
  add_thickbox();
551
 
552
+ $wizhref = self::$epbase . '/wpembedcode-simple-search-' . YouTubePrefs::$version . '.aspx?pluginversion=' . YouTubePrefs::$version .
553
  '&wpversion=' . get_bloginfo('version') .
554
  '&settingsurl=' . urlencode(admin_url('admin.php?page=youtube-my-preferences#jumpdefaults')) .
555
  '&dashurl=' . urlencode(admin_url('admin.php?page=youtube-ep-analytics-dashboard')) .
682
  $loggedin = current_user_can('edit_posts');
683
  if (!($loggedin && self::$alloptions[self::$opt_admin_off_scripts]))
684
  {
685
+ wp_enqueue_script('__ytprefsfitvids__', plugins_url('scripts/fitvids' . self::$min . '.js', __FILE__), array('__ytprefs__'), false, true);
686
  }
687
  }
688
 
737
  $_gallery_columns = 3;
738
  $_gallery_scrolloffset = 20;
739
  $_gallery_showtitle = 1;
740
+ $_gallery_showpaging = 1;
741
+ $_gallery_autonext = 0;
742
+ $_gallery_channelsub = 0;
743
+ $_gallery_channelsublink = '';
744
+ $_gallery_channelsubtext = 'Subscribe to my channel';
745
  $_gallery_customarrows = 0;
746
  $_gallery_customprev = 'Prev';
747
  $_gallery_customnext = 'Next';
809
  $_gallery_columns = self::tryget($arroptions, self::$opt_gallery_columns, 3);
810
  $_gallery_scrolloffset = self::tryget($arroptions, self::$opt_gallery_scrolloffset, 20);
811
  $_gallery_showtitle = self::tryget($arroptions, self::$opt_gallery_showtitle, 1);
812
+ $_gallery_showpaging = self::tryget($arroptions, self::$opt_gallery_showpaging, 1);
813
+ $_gallery_autonext = self::tryget($arroptions, self::$opt_gallery_autonext, 0);
814
  $_gallery_style = self::tryget($arroptions, self::$opt_gallery_style, 'grid');
815
  $_gallery_thumbcrop = self::tryget($arroptions, self::$opt_gallery_thumbcrop, 'box');
816
+ $_gallery_channelsub = self::tryget($arroptions, self::$opt_gallery_channelsub, $_gallery_channelsub);
817
+ $_gallery_channelsublink = self::tryget($arroptions, self::$opt_gallery_channelsublink, $_gallery_channelsublink);
818
+ $_gallery_channelsubtext = self::tryget($arroptions, self::$opt_gallery_channelsubtext, $_gallery_channelsubtext);
819
  $_gallery_customarrows = self::tryget($arroptions, self::$opt_gallery_customarrows, $_gallery_customarrows);
820
  $_gallery_customnext = self::tryget($arroptions, self::$opt_gallery_customnext, $_gallery_customnext);
821
  $_gallery_customprev = self::tryget($arroptions, self::$opt_gallery_customprev, $_gallery_customprev);
877
  self::$opt_gallery_columns => $_gallery_columns,
878
  self::$opt_gallery_scrolloffset => $_gallery_scrolloffset,
879
  self::$opt_gallery_showtitle => $_gallery_showtitle,
880
+ self::$opt_gallery_showpaging => $_gallery_showpaging,
881
+ self::$opt_gallery_autonext => $_gallery_autonext,
882
+ self::$opt_gallery_channelsub => $_gallery_channelsub,
883
+ self::$opt_gallery_channelsublink => $_gallery_channelsublink,
884
+ self::$opt_gallery_channelsubtext => $_gallery_channelsubtext,
885
  self::$opt_gallery_customarrows => $_gallery_customarrows,
886
  self::$opt_gallery_customnext => $_gallery_customnext,
887
  self::$opt_gallery_customprev => $_gallery_customprev,
942
 
943
  public static function ao_override_jsexclude($exclude)
944
  {
945
+ if (strpos($exclude, 'ytprefs' . self::$min . '.js') === false)
946
  {
947
+ return $exclude . ",ytprefs' . self::$min . '.js,__ytprefs__";
948
  }
949
  return $exclude;
950
  }
998
  $options->pageSize = min(intval($options->pageSize), 50);
999
  $options->columns = intval($options->columns);
1000
  $options->showTitle = intval($options->showTitle);
1001
+ $options->showPaging = intval($options->showPaging);
1002
+ $options->autonext = intval($options->autonext);
1003
  $options->showDsc = intval($options->showDsc);
1004
  $options->thumbcrop = sanitize_html_class($options->thumbcrop);
1005
  $options->style = sanitize_html_class($options->style);
1021
  {
1022
  try
1023
  {
1024
+ $spdckey = self::$spdcprefix . '_' . md5($apiEndpoint . $options->columns . $options->style . $options->showTitle . $options->showDsc . $options->thumbcrop . $options->autonext . $options->showPaging);
1025
  $spdcval = get_transient($spdckey);
1026
  if (!empty($spdcval))
1027
  {
1038
  $code = '';
1039
 
1040
  $apiResult = wp_remote_get($apiEndpoint);
1041
+
1042
+ if (is_wp_error($apiResult))
1043
+ {
1044
+ return '<div>Sorry, there was a YouTube API error: <em>' . htmlspecialchars(strip_tags($apiResult->get_error_message())) . '</em></div>';
1045
+ }
1046
+
1047
  if (self::$alloptions[self::$opt_debugmode] == 1 && current_user_can('manage_options'))
1048
  {
1049
  $redactedEndpoint = preg_replace('@&key=[^&]+@i', '&key=PRIVATE', $apiEndpoint);
1056
  {
1057
  if (isset($jsonResult->error->message))
1058
  {
1059
+ return '<div>Sorry, there was a YouTube API error: <em>' . htmlspecialchars(strip_tags($jsonResult->error->message)) . '</em></div>';
1060
  }
1061
  return '<div>Sorry, there may be an issue with your YouTube API key. Please enter a valid key to embed galleries.</div>';
1062
  }
1092
  }
1093
 
1094
  $code.= '<div class="epyt-gallery-allthumbs ' . $cropclass . $colclass . '">';
1095
+
1096
+
1097
+
1098
+
1099
  if (isset($jsonResult->items) && $jsonResult->items != null && is_array($jsonResult->items))
1100
  {
1101
 
1158
 
1159
  $totalPages = ceil($totalResults / $resultsPerPage);
1160
  $pagination = '<div class="epyt-pagination">';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1161
 
1162
+ $txtprev = self::$alloptions[self::$opt_gallery_customarrows] ? self::$alloptions[self::$opt_gallery_customprev] : _('Prev');
1163
+ $pagination .= '<div class="epyt-pagebutton epyt-prev ' . (empty($prevPageToken) ? ' hide ' : '') . '" data-playlistid="' . esc_attr($options->playlistId)
1164
+ . '" data-pagesize="' . intval($options->pageSize)
1165
+ . '" data-pagetoken="' . esc_attr($prevPageToken)
1166
+ . '" data-style="' . esc_attr($options->style)
1167
+ . '" data-columns="' . intval($options->columns)
1168
+ . '" data-showtitle="' . intval($options->showTitle)
1169
+ . '" data-showpaging="' . intval($options->showPaging)
1170
+ . '" data-autonext="' . intval($options->autonext)
1171
+ . ((self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 8 && $options->style == 'listview' && $options->showDsc) ? '" data-showdsc="' . intval($options->showDsc) : '')
1172
+ . ((self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 8 && !in_array($options->thumbcrop, array('box', ''))) ? '" data-thumbcrop="' . $options->thumbcrop : '')
1173
+ . '"><div class="arrow">&laquo;</div> <div>' . $txtprev . '</div></div>';
1174
+
1175
+
1176
+ $pagination .= '<div class="epyt-pagenumbers ' . ($totalPages > 1 ? '' : 'hide') . '">';
1177
+ $pagination .= '<div class="epyt-current">1</div><div class="epyt-pageseparator"> / </div><div class="epyt-totalpages">' . $totalPages . '</div>';
1178
+ $pagination .= '</div>';
1179
+
1180
+ $txtnext = self::$alloptions[self::$opt_gallery_customarrows] ? self::$alloptions[self::$opt_gallery_customnext] : _('Next');
1181
+ $pagination .= '<div class="epyt-pagebutton epyt-next' . (empty($nextPageToken) ? ' hide ' : '') . '" data-playlistid="' . esc_attr($options->playlistId)
1182
+ . '" data-pagesize="' . intval($options->pageSize)
1183
+ . '" data-pagetoken="' . esc_attr($nextPageToken)
1184
+ . '" data-style="' . esc_attr($options->style)
1185
+ . '" data-columns="' . intval($options->columns)
1186
+ . '" data-showtitle="' . intval($options->showTitle)
1187
+ . '" data-showpaging="' . intval($options->showPaging)
1188
+ . '" data-autonext="' . intval($options->autonext)
1189
+ . ((self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0 && $options->style == 'listview' && $options->showDsc) ? '" data-showdsc="' . intval($options->showDsc) : '')
1190
+ . ((self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 8 && !in_array($options->thumbcrop, array('box', ''))) ? '" data-thumbcrop="' . $options->thumbcrop : '')
1191
+ . '"><div>' . $txtnext . '</div> <div class="arrow">&raquo;</div></div>';
1192
+
1193
+ $pagination .= '<div class="epyt-loader"><img width="16" height="11" src="' . plugins_url('images/gallery-page-loader.gif', __FILE__) . '"></div>';
1194
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1195
  $pagination .= '</div>';
1196
 
1197
+ if ($options->showPaging == 0)
1198
+ {
1199
+ $pagination = '';
1200
+ }
1201
  $code = $pagination . $code . $pagination;
1202
 
1203
  if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0 && self::$alloptions[self::$opt_spdc] == 1)
1255
  {
1256
  if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')
1257
  {
1258
+ //check_ajax_referer('embedplus-nonce', 'security');
1259
  $options = (object) $_POST['options'];
1260
  $options->apiKey = self::$alloptions[self::$opt_apikey];
1261
  echo self::get_gallery_page($options);
1402
  }
1403
  else
1404
  {
1405
+
1406
  if (isset($linkparams['list']))
1407
  {
1408
  $odata = self::get_oembed('http://youtube.com/playlist?list=' . $linkparams['list'], 1920, 1280);
1458
  $gallery_options->pageSize = $finalparams[self::$opt_gallery_pagesize];
1459
  $gallery_options->columns = intval($finalparams[self::$opt_gallery_columns]);
1460
  $gallery_options->showTitle = intval($finalparams[self::$opt_gallery_showtitle]);
1461
+ $gallery_options->showPaging = intval($finalparams[self::$opt_gallery_showpaging]);
1462
+ $gallery_options->autonext = intval($finalparams[self::$opt_gallery_autonext]);
1463
  $gallery_options->showDsc = intval($finalparams[self::$opt_gallery_showdsc]);
1464
  $gallery_options->style = $finalparams[self::$opt_gallery_style];
1465
  $gallery_options->thumbcrop = $finalparams[self::$opt_gallery_thumbcrop];
1466
  $gallery_options->apiKey = self::$alloptions[self::$opt_apikey];
1467
 
1468
+ $subbutton = '';
1469
+ if (self::$alloptions[self::$opt_gallery_channelsub] == 1)
1470
+ {
1471
+ $subbutton = '<div class="epyt-gallery-subscribe"><a target="_blank" class="epyt-gallery-subbutton" href="' .
1472
+ esc_attr(self::$alloptions[self::$opt_gallery_channelsublink]) . '?sub_confirmation=1"><img src="' . plugins_url('images/play-subscribe.png', __FILE__) . '" />' .
1473
+ htmlspecialchars(self::$alloptions[self::$opt_gallery_channelsubtext], ENT_QUOTES) . '</a></div>';
1474
+ }
1475
+
1476
  $dynsrc = 'data-ep-gallery';
1477
  $galleryWrapper1 = '<div class="epyt-gallery" data-currpage="1">';
1478
  $galleryWrapper2 = '</div>';
1479
+ $galleryCode = $subbutton . '<div class="epyt-gallery-list epyt-gallery-style-' . esc_attr($gallery_options->style) . '">' .
1480
  self::get_gallery_page($gallery_options) .
1481
  '</div>';
1482
  $videoidoutput = 'GALLERYVIDEOID';
1766
  public static function doftpostimgfor($post)
1767
  {
1768
  $search_content = isset($post->post_content) ? $post->post_content : '';
1769
+ $search_content = substr(wp_strip_all_tags($search_content), 0, 5000);
1770
 
1771
  $search_content = apply_filters('youtube_embedplus_video_content', $search_content);
1772
 
1791
  $linkparams['v'] = array_pop($vtemp);
1792
  }
1793
 
1794
+ $just_id = $linkparams['v'];
1795
 
1796
+ if ($just_id == null && isset($linkparams['list']))
1797
+ {
1798
+ $apiEndpoint = 'https://www.googleapis.com/youtube/v3/playlistItems?part=snippet,status&playlistId=' . $linkparams['list']
1799
+ . '&maxResults=10&key=' . self::$alloptions[self::$opt_apikey];
1800
+ try
1801
+ {
1802
+ $apiResult = wp_remote_get($apiEndpoint);
1803
+ if (!is_wp_error($apiResult))
1804
+ {
1805
+ $jsonResult = json_decode($apiResult['body']);
1806
+ if (!isset($jsonResult->error) && isset($jsonResult->items) && $jsonResult->items != null && is_array($jsonResult->items))
1807
+ {
1808
 
1809
+ $item = $jsonResult->items[0];
1810
+ $just_id = isset($item->snippet->resourceId->videoId) ? $item->snippet->resourceId->videoId : null;
1811
+ $just_id = $just_id ? $just_id : $item->id->videoId;
1812
+ }
1813
+ }
1814
+ }
1815
+ catch (Exception $ex)
1816
+ {
1817
+
1818
+ }
1819
+ }
1820
 
1821
  if ($just_id != null)
1822
  {
2190
  $new_pointer_content .= '<p>'; // ooopointer
2191
  if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
2192
  {
2193
+ $new_pointer_content .= __("This update adds multiple new options like automatic continuous gallery playback and channel subscription linking for both Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions &raquo;</a>");
2194
  }
2195
  else
2196
  {
2197
+ $new_pointer_content .= __("This update adds multiple new options like automatic continuous gallery playback and channel subscription linking for both Free and Pro versions.");
2198
  }
2199
  $new_pointer_content .= '</p>';
2200
 
2283
  $new_options[self::$opt_defaultvol] = self::postchecked(self::$opt_defaultvol) ? 1 : 0;
2284
  $new_options[self::$opt_dohl] = self::postchecked(self::$opt_dohl) ? 1 : 0;
2285
  $new_options[self::$opt_gallery_showtitle] = self::postchecked(self::$opt_gallery_showtitle) ? 1 : 0;
2286
+ $new_options[self::$opt_gallery_showpaging] = self::postchecked(self::$opt_gallery_showpaging) ? 1 : 0;
2287
+ $new_options[self::$opt_gallery_autonext] = self::postchecked(self::$opt_gallery_autonext) ? 1 : 0;
2288
+ $new_options[self::$opt_gallery_channelsub] = self::postchecked(self::$opt_gallery_channelsub) ? 1 : 0;
2289
  $new_options[self::$opt_gallery_customarrows] = self::postchecked(self::$opt_gallery_customarrows) ? 1 : 0;
2290
  $new_options[self::$opt_gallery_showdsc] = self::postchecked(self::$opt_gallery_showdsc) ? 1 : 0;
2291
 
2391
  $new_options[self::$opt_gallery_thumbcrop] = $_gallery_thumbcrop;
2392
 
2393
 
2394
+ $_gallery_channelsublink = '';
2395
+ try
2396
+ {
2397
+ $_gallery_channelsublink = trim(strip_tags($_POST[self::$opt_gallery_channelsublink]));
2398
+ $pieces = explode('?', $_gallery_channelsublink);
2399
+ $_gallery_channelsublink = trim($pieces[0]);
2400
+ }
2401
+ catch (Exception $ex)
2402
+ {
2403
+ $_gallery_channelsublink = '';
2404
+ }
2405
+ $new_options[self::$opt_gallery_channelsublink] = $_gallery_channelsublink;
2406
+
2407
+
2408
+ $_gallery_channelsubtext = '';
2409
+ try
2410
+ {
2411
+ $_gallery_channelsubtext = stripslashes(trim($_POST[self::$opt_gallery_channelsubtext]));
2412
+ }
2413
+ catch (Exception $ex)
2414
+ {
2415
+ $_gallery_channelsubtext = '';
2416
+ }
2417
+ $new_options[self::$opt_gallery_channelsubtext] = $_gallery_channelsubtext;
2418
+
2419
+
2420
  $_gallery_custom_prev = 'Prev';
2421
  try
2422
  {
2581
  .brightpro {background-image: linear-gradient(to bottom,#ff5500,#cc2200) !important; color: #ffffff;}
2582
  #boxdefaultdims {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_defaultdims] ? '' : 'display: none;' ?>}
2583
  #boxcustomarrows {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_gallery_customarrows] ? '' : 'display: none;' ?>}
2584
+ #boxchannelsub {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_gallery_channelsub] ? 'display: block;' : 'display: none;' ?>}
2585
  .textinput {border-width: 2px !important;}
2586
  h3.sect {border-radius: 10px; background-color: #D9E9F7; padding: 5px 5px 5px 10px; position: relative; font-weight: bold;}
2587
  h3.sect a {text-decoration: none; color: #E20000;}
2624
  .wp-pointer-buttons a.close {margin-top: 0 !important;}
2625
  .pad20{padding: 20px 0 20px 0;}
2626
  .ssgallery {float: right; width: 130px; height: auto; margin-left: 15px; border: 3px solid #ffffff;}
2627
+ .sssubscribe{display: block; width: 400px; height: auto;}
2628
  .ssaltgallery {float: right; height: auto; margin-right: 10px; margin-left: 15px; margin-bottom: 10px; width: 350px;}
2629
  .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;
2630
  -webkit-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75);
2656
  <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).
2657
  </p>
2658
  <p>
2659
+ <b>For galleries:</b> <a href="#jumpgallery">Click here</a> scroll down to gallery settings and directions.
2660
+ </p>
2661
+ <p>
2662
+ <b>For self-contained 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 &raquo;</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.
2663
  </p>
2664
  <p>
2665
+ <b>For self-contained 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.
2666
  </p>
2667
  <p>
2668
  <b>Examples:</b><br><br>
2707
  <p>
2708
  <?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.") ?>
2709
  </p>
2710
+ <?php // self::save_changes_button(); ?>
2711
 
2712
  <div class="ytindent chx">
2713
  <p>
2748
  </p>
2749
  <p>
2750
  <input name="<?php echo self::$opt_theme; ?>" id="<?php echo self::$opt_theme; ?>" <?php checked($all[self::$opt_theme], 'dark'); ?> type="checkbox" class="checkbox">
2751
+ <label for="<?php echo self::$opt_theme; ?>"><?php _e('<b class="chktitle strike">Dark Theme:</b> Use the dark theme (uncheck to use light theme). <b>Note: YouTube has deprecated this option and will always use the dark theme.</b>') ?></label>
2752
  </p>
2753
  <p>
2754
  <input name="<?php echo self::$opt_color; ?>" id="<?php echo self::$opt_color; ?>" <?php checked($all[self::$opt_color], 'red'); ?> type="checkbox" class="checkbox">
2813
  </p>
2814
  <p>
2815
  <input name="<?php echo self::$opt_autohide; ?>" id="<?php echo self::$opt_autohide; ?>" <?php checked($all[self::$opt_autohide], 1); ?> type="checkbox" class="checkbox">
2816
+ <label for="<?php echo self::$opt_autohide; ?>"><b class="chktitle strike">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.
2817
+ <strong>Note: YouTube has deprecated this option, and will always autohide the controls.</strong>
2818
+ </label>
2819
  </p>
2820
  <!-- <p>
2821
  <input name="<?php echo self::$opt_ssl; ?>" id="<?php echo self::$opt_ssl; ?>" <?php checked($all[self::$opt_ssl], 1); ?> type="checkbox" class="checkbox">
2826
  </p>-->
2827
  <p>
2828
  <input name="<?php echo self::$opt_defaultvol; ?>" id="<?php echo self::$opt_defaultvol; ?>" <?php checked($all[self::$opt_defaultvol], 1); ?> type="checkbox" class="checkbox">
 
 
 
2829
  <label for="<?php echo self::$opt_defaultvol; ?>">
2830
  <b class="chktitle">Volume Initialization: </b>
2831
  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 &raquo;</a>
2832
  </label>
2833
+ <span id="boxdefaultvol">
2834
+ 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]); ?>" >
2835
+ </span>
2836
  </p>
2837
 
2838
  <p>
2858
  <p>
2859
  <input name="<?php echo self::$opt_playlistorder; ?>" id="<?php echo self::$opt_playlistorder; ?>" <?php checked($all[self::$opt_playlistorder], 1); ?> type="checkbox" class="checkbox">
2860
  <label for="<?php echo self::$opt_playlistorder; ?>">
2861
+ <b class="chktitle">Playlist Ordering:</b>
2862
  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).
2863
  Note that this is not for setting the thumbnail list order of galleries, just the standard playlist player that YouTube provides.
2864
  </label>
2869
  </div>
2870
 
2871
  <div class="jumper" id="jumpcompat"></div>
2872
+ <h3 class="sect">Compatibility Settings <a href="#top" class="totop">&#9650; top</a></h3>
2873
  <p>
2874
  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.
2875
  </p>
2884
  <p>
2885
  <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">
2886
  <label for="<?php echo self::$opt_admin_off_scripts; ?>">
2887
+ <b class="chktitle">Turn Off Scripts While Editing: </b>
2888
  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.
2889
  Don't worry, all other visitors to your site will still view your site normally.
2890
  </label>
2911
  <p>
2912
  <input name="<?php echo self::$opt_evselector_light; ?>" id="<?php echo self::$opt_evselector_light; ?>" <?php checked($all[self::$opt_evselector_light], 1); ?> type="checkbox" class="checkbox">
2913
  <label for="<?php echo self::$opt_evselector_light; ?>">
2914
+ <b class="chktitle">Theme Video Problems: </b>
2915
  Check this option if you're having issues with autoplayed videos or background videos etc. that have been generated by your theme.
2916
  </label>
2917
  </p>
2925
 
2926
  </div>
2927
  <div class="jumper" id="jumpgallery"></div>
2928
+ <h3 class="sect">Gallery Settings and Directions <a href="#top" class="totop">&#9650; top</a></h3>
2929
  <img class="ssgallery" src="<?php echo plugins_url('images/ssgallery.png', __FILE__) ?>">
2930
  <p>
2931
  <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 &raquo;</a>. <strong>First, you must obtain your YouTube API key</strong>.
2932
+ Don't worry, it's an easy process. Just <a href="https://www.youtube.com/watch?v=px8LvNIVblg" target="_blank">click this link &raquo;</a> and follow the video on that page to get your API key. Then paste it in the "YouTube API Key" box below, and click the "Save Changes" button.
2933
  </p>
2934
+ <p>
2935
+ <b>Playlist Galleries:</b> To display a self-contained playlist as a gallery with thumbnails, simply add the following parameter to the end of your playlist url:
2936
  </p>
2937
  <p><code>&layout=gallery</code></p>
2938
  <p>For example, below is a playlist that has been converted into a gallery. Notice the new layout parameter, with no spaces:</p>
2939
  <p>
2940
+ <code>[embedyt]https://www.youtube.com/playlist?list=PLx0sYbCqOb8TBPRdmBHs5Iftvv9TPboYG<b>&layout=gallery</b>[/embedyt]</code>
2941
+ </p>
2942
+ <p>
2943
+ <b>Channel Galleries:</b> To display a channel as a gallery with thumbnails, <a href="https://youtu.be/XvFL-Rr-2Qo" target="_blank">watch the first minute and a half of this video </a>.
2944
  </p>
2945
+
2946
+
2947
+
2948
  <p class="smallnote">
2949
+ Note: The PRO wizard has steps to visually create and customize playlist, channel, and gallery codes like the above.
2950
+ </p>
2951
  <p>
2952
  Below are the settings for galleries:
2953
  </p>
2977
  <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]); ?>">
2978
  Enter how many thumbnails can fit per row.
2979
  </p>
2980
+ <p>
2981
+ <input name="<?php echo self::$opt_gallery_showpaging; ?>" id="<?php echo self::$opt_gallery_showpaging; ?>" <?php checked($all[self::$opt_gallery_showpaging], 1); ?> type="checkbox" class="checkbox">
2982
+ <label for="<?php echo self::$opt_gallery_showpaging; ?>"><b class="chktitle">Show Pagination:</b> <sup class="orange">NEW</sup> Show the Next/Previous buttons and page numbering.</label>
2983
+ </p>
2984
  <p>
2985
  <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">
2986
+ <label for="<?php echo self::$opt_gallery_customarrows; ?>">
2987
+ <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&eacute;c&eacute;dent and Next with Suivant.
2988
+ </label>
2989
  <span id="boxcustomarrows">
2990
  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;"> &nbsp;
2991
  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;">
2992
  </span>
2993
+ </p>
2994
+ <p>
2995
+ <input name="<?php echo self::$opt_gallery_channelsub; ?>" id="<?php echo self::$opt_gallery_channelsub; ?>" <?php checked($all[self::$opt_gallery_channelsub], 1); ?> type="checkbox" class="checkbox">
2996
+ <label for="<?php echo self::$opt_gallery_channelsub; ?>">
2997
+ <b class="chktitle">Show Subscribe Button: </b> <sup class="orange">NEW</sup> Are you the channel owner for all your galleries? Check this box to add a "Subscribe" button to all your galleries as shown below. This might help you convert your site's visitors to YouTube subscribers of your channel.
2998
  </label>
2999
+ <span id="boxchannelsub">
3000
+ Channel URL: <input type="text" placeholder="https://www.youtube.com/user/YourChannel" name="<?php echo self::$opt_gallery_channelsublink; ?>" id="<?php echo self::$opt_gallery_channelsublink; ?>" value="<?php echo esc_attr(trim($all[self::$opt_gallery_channelsublink])); ?>" class="textinput" style="width: 200px;"> &nbsp;
3001
+ Button text: <input type="text" name="<?php echo self::$opt_gallery_channelsubtext; ?>" id="<?php echo self::$opt_gallery_channelsubtext; ?>" value="<?php echo esc_attr(trim($all[self::$opt_gallery_channelsubtext])); ?>" class="textinput" style="width: 200px;">
3002
+ </span>
3003
  </p>
3004
+ <p><img class="sssubscribe" src="<?php echo plugins_url('images/sssubscribe.png', __FILE__) ?>"></p>
3005
+
3006
  <p>
3007
  <label for="<?php echo self::$opt_gallery_scrolloffset; ?>"><b class="chktitle">Scroll Offset:</b></label>
3008
  <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]); ?>">
3012
  <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">
3013
  <label for="<?php echo self::$opt_gallery_showtitle; ?>"><b class="chktitle">Show Thumbnail Title:</b> Show titles with each thumbnail.</label>
3014
  </p>
3015
+ <p>
3016
+ <input name="<?php echo self::$opt_gallery_autonext; ?>" id="<?php echo self::$opt_gallery_autonext; ?>" <?php checked($all[self::$opt_gallery_autonext], 1); ?> type="checkbox" class="checkbox">
3017
+ <label for="<?php echo self::$opt_gallery_autonext; ?>"><b class="chktitle">Automatic Continuous Play:</b> <sup class="orange">NEW</sup> Automatically play the next video in the gallery as soon as the current video finished.</label>
3018
+ </p>
3019
+ <div class="pad20">
3020
+ <p>
3021
+ <strong class="orange">Note:</strong> We have an instructional video that shows how to generate the codes needed to embed two different types of galleries using the FREE and PRO version of the plugin:
3022
+ </p>
3023
  <ol>
3024
  <li>a gallery from an entire YouTube channel, and</li>
3025
  <li>a gallery from a specific playlist</li>
3026
  </ol>
3027
+ <p>
3028
+ We advise that you <a href="https://www.youtube.com/watch?v=XvFL-Rr-2Qo" target="_blank">watch the video here &raquo;</a> with YouTube.com annotations turned on so you don't miss important steps.
3029
+ The PRO wizard is an alternate way to fully create playlist, channel, and gallery codes.
3030
+ </p>
3031
  </div>
 
3032
  </div>
3033
 
3034
+ <?php // self::save_changes_button(); ?>
3035
 
3036
  <div class="upgchecks">
3037
  <h3 class="sect">PRO Features</h3>
3050
  <option value="carousel" <?php echo 'carousel' === $cleanstyle ? 'selected' : '' ?> >Horizontal Slider</option>
3051
  </select>
3052
  <label for="<?php echo self::$opt_gallery_style; ?>">
3053
+ <b>(PRO)</b> <b class="chktitle">Alternate Gallery Styling:</b></b>
3054
  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.
3055
  <a target="_blank" href="<?php echo self::$epbase ?>/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx">Read more here &raquo;</a>
3056
  </label>
3075
  <option value="portal" <?php echo 'portal' === $cleancrop ? 'selected' : '' ?> >Circular</option>
3076
  </select>
3077
  <label for="<?php echo self::$opt_gallery_thumbcrop; ?>">
3078
+ <b>(PRO)</b> <b class="chktitle">Gallery Thumbnail Shape:</b></b>
3079
  Differentiate your gallery by showing different thumbnail shapes. We currently offer rectangle and circle shapes.
3080
  </label>
3081
  </p>
3184
  <option value="">Gallery Style</option>
3185
  </select>
3186
  <label>
3187
+ <b class="chktitle">Alternate Gallery Styling: </b> <span class="pronon">(PRO Users)</span>
3188
  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.
3189
  <a target="_blank" href="<?php echo self::$epbase ?>/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx">Read more here &raquo;</a>
3190
  </label>
3206
  <option value="">Select Thumbnail Shape</option>
3207
  </select>
3208
  <label>
3209
+ <b class="chktitle">Gallery Thumbnail Shape: </b> <span class="pronon">(PRO Users)</span>
3210
  Differentiate your gallery by showing different thumbnail shapes. We currently offer rectangle and circle shapes.
3211
  <a target="_blank" href="<?php echo self::$epbase ?>/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx">Read more here &raquo;</a>
3212
  </label>
3272
  ?>
3273
  <div class="clearboth"></div>
3274
  </div>
3275
+ <?php // self::save_changes_button(); ?>
3276
 
3277
  <hr>
3278
 
3283
  <?php _e("How To Override Defaults / Other Options") ?> <a href="#top" class="totop">&#9650; top</a>
3284
  </h3>
3285
  <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 '&'.
3286
+ <br><span class="smallnote orange">PRO users: You can use the big blue <a href="<?php echo self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=protab' ?>" target="_blank">customize</a> buttons that you will see inside the wizard, instead of memorizing the following.</span>
3287
  <?php
3288
  _e('<ul>');
3289
  _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>");
3430
  <br>
3431
  <span style="display: none;" id="prokeyloading" class="orange bold">Verifying...</span>
3432
  <span class="orange bold" style="display: none;" id="prokeysuccess">Success! Please refresh this page.</span>
3433
+ <span class="orange bold" style="display: none;" id="prokeyfailed">Sorry, that seems to be an invalid key, or it has been used already. If you're behind a firewall, you may need to try activating on another network.</span>
3434
+ <span class="orange bold" style="display: none;" id="prokeycancel">Your request is being processed. Response code: CR1.</span>
3435
 
3436
  </form>
3437
 
3524
  }
3525
  }
3526
 
3527
+
3528
+ if (jQuery("#<?php echo self::$opt_gallery_channelsub; ?>").is(":checked"))
3529
+ {
3530
+ if (!jQuery.trim(jQuery("#<?php echo self::$opt_gallery_channelsublink; ?>").val()) ||
3531
+ !jQuery.trim(jQuery("#<?php echo self::$opt_gallery_channelsubtext; ?>").val()))
3532
+ {
3533
+ alertmessage += "Please enter valid text for both the subscribe text and subscribe URL, or uncheck the option.";
3534
+ jQuery("#boxchannelsub input").css("background-color", "#ffcccc").css("border", "2px solid #000000");
3535
+ valid = false;
3536
+ }
3537
+ }
3538
+
3539
  if (jQuery("#<?php echo self::$opt_defaultvol; ?>").is(":checked"))
3540
  {
3541
  if (!(jQuery.isNumeric(jQuery.trim(jQuery("#<?php echo self::$opt_vol; ?>").val()))))
3630
 
3631
  });
3632
 
3633
+ jQuery('#<?php echo self::$opt_gallery_channelsub; ?>').change(function ()
3634
+ {
3635
+ if (jQuery(this).is(":checked"))
3636
+ {
3637
+ jQuery("#boxchannelsub").show(500);
3638
+ }
3639
+ else
3640
+ {
3641
+ jQuery("#boxchannelsub").hide(500);
3642
+ }
3643
+
3644
+ });
3645
+
3646
  jQuery('#<?php echo self::$opt_dynload; ?>').change(function ()
3647
  {
3648
  if (jQuery(this).is(":checked"))
3824
  prokeyval = jQuery('#opt_pro').val();
3825
 
3826
  var tempscript = document.createElement("script");
3827
+ tempscript.src = "<?php echo self::$epbase ?>/dashboard/wordpress-pro-validatejp.aspx?simple=1&prokey=" + prokeyval + "&domain=" + mydomain;
3828
  var n = document.getElementsByTagName("head")[0].appendChild(tempscript);
3829
  setTimeout(function () {
3830
  n.parentNode.removeChild(n);
3860
 
3861
  };
3862
 
3863
+
3864
+ window.embedplus_cancel_prokey = function () {
3865
+
3866
+ jQuery.ajax({
3867
+ type: "post",
3868
+ dataType: "json",
3869
+ timeout: 30000,
3870
+ url: wpajaxurl,
3871
+ data: {action: 'my_embedplus_pro_record', <?php echo self::$opt_pro; ?>: ""},
3872
+ success: function (response) {
3873
+ jQuery("#prokeycancel").show();
3874
+ },
3875
+ error: function (xhr, ajaxOptions, thrownError) {
3876
+ jQuery('#prokeyfailed').show();
3877
+ },
3878
+ complete: function () {
3879
+ jQuery('#prokeyloading').hide();
3880
+ jQuery('#prokeysubmit').removeAttr('disabled');
3881
+ }
3882
+
3883
+ });
3884
+
3885
+ };
3886
+
3887
  });
3888
  </script>
3889
  <?php
3938
  }";
3939
  wp_add_inline_style('__EPYT__style', $custom_css);
3940
 
3941
+ wp_enqueue_script('__ytprefs__', plugins_url('scripts/ytprefs' . self::$min . '.js', __FILE__), array('jquery'));
3942
 
3943
  if (self::$alloptions[self::$opt_old_script_method] != 1)
3944
  {
3960
  if (!is_admin() && (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0) && self::$alloptions[self::$opt_dynload] == 1)
3961
  {
3962
  wp_enqueue_style('__dyntype__', plugins_url('scripts/embdyn.min.css', __FILE__));
3963
+ wp_enqueue_script('__dynload__', plugins_url('scripts/embdyn' . self::$min . '.js', __FILE__), array('jquery'));
3964
  }
3965
  }
3966
  }
4236
  <?php
4237
  }
4238
  }
4239
+
4240
+ // function embedplus_strip_shortcode_from_excerpt($content)
4241
+ // {
4242
+ // $content = strip_shortcodes($content);
4243
+ // return 'STRIPPED' . $content;
4244
+ // }
4245
+ //
4246
+ // add_filter('the_excerpt', 'embedplus_strip_shortcode_from_excerpt', 5);
4247
+ // add_filter('get_the_excerpt', 'embedplus_strip_shortcode_from_excerpt', 5);
4248