YouTube - Version 11.8.7

Version Description

Download this release

Release Info

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

Code changes from version 11.8.6.1 to 11.8.7

readme.txt CHANGED
@@ -4,7 +4,7 @@ Plugin Name: YouTube Embed
4
  Tags: youtube gallery, video gallery, youtube channel, youtube live, live stream
5
  Requires at least: 3.6.1
6
  Tested up to: 4.9
7
- Stable tag: 11.8.6.1
8
  License: GPLv3 or later
9
 
10
  YouTube Embed WordPress Plugin. Embed a responsive video, YouTube channel gallery, playlist gallery, or YouTube.com live stream
@@ -13,6 +13,7 @@ YouTube Embed WordPress Plugin. Embed a responsive video, YouTube channel galler
13
 
14
  **Your WordPress YouTube embed, YouTube gallery (channel and playlist), and even YouTube live stream can be customized in a wide variety of ways with this plugin. Here are a few recently added features:**
15
 
 
16
  * YouTube gallery capability (channel and playlist) – 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 >>](https://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
  * YouTube gallery auto continuous play - embed a playlist or channel gallery and allow it to play one video after the next without requiring viewers to click a thumbnail
18
  * YouTube Live Stream - Given a link to a YouTube channel, the plugin wizard automatically finds a livestream if one is active in that channel and generates the embed code for you. On the settings page, you can also set defaults of what to automatically display if a live stream is not active at a given moment. For example, you can have your site display a gallery of a channel's entire video library so that users can have something to watch in the meantime. We hope it's a time saver.
@@ -147,6 +148,9 @@ You can also start and end each individual video at particular times. Like the a
147
 
148
  == Changelog ==
149
 
 
 
 
150
  = WordPress YouTube Embed 11.8.6.1 =
151
  * Rollback jQuery Updater plugin compatability
152
 
4
  Tags: youtube gallery, video gallery, youtube channel, youtube live, live stream
5
  Requires at least: 3.6.1
6
  Tested up to: 4.9
7
+ Stable tag: 11.8.7
8
  License: GPLv3 or later
9
 
10
  YouTube Embed WordPress Plugin. Embed a responsive video, YouTube channel gallery, playlist gallery, or YouTube.com live stream
13
 
14
  **Your WordPress YouTube embed, YouTube gallery (channel and playlist), and even YouTube live stream can be customized in a wide variety of ways with this plugin. Here are a few recently added features:**
15
 
16
+ * Improved GDPR compliance
17
  * YouTube gallery capability (channel and playlist) – 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 >>](https://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.
18
  * YouTube gallery auto continuous play - embed a playlist or channel gallery and allow it to play one video after the next without requiring viewers to click a thumbnail
19
  * YouTube Live Stream - Given a link to a YouTube channel, the plugin wizard automatically finds a livestream if one is active in that channel and generates the embed code for you. On the settings page, you can also set defaults of what to automatically display if a live stream is not active at a given moment. For example, you can have your site display a gallery of a channel's entire video library so that users can have something to watch in the meantime. We hope it's a time saver.
148
 
149
  == Changelog ==
150
 
151
+ = WordPress YouTube Embed 11.8.7 =
152
+ * Helps with GDPR compliance by allowing you to choose when YouTube.com's API is loaded
153
+
154
  = WordPress YouTube Embed 11.8.6.1 =
155
  * Rollback jQuery Updater plugin compatability
156
 
scripts/ytprefs.js CHANGED
@@ -10,7 +10,8 @@
10
  evselector: 'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]',
11
  stopMobileBuffer: true,
12
  ajax_compat: false,
13
- usingdefault: true
 
14
  };
15
 
16
  if (window.location.toString().indexOf('https://') === 0)
@@ -19,7 +20,8 @@
19
  }
20
 
21
  window._EPYT_.pageLoaded = false;
22
- $(window).on('load._EPYT_', function () {
 
23
  window._EPYT_.pageLoaded = true;
24
  });
25
 
@@ -54,7 +56,8 @@
54
  if (vol === 0)
55
  {
56
  event.target.mute();
57
- } else
 
58
  {
59
  if (event.target.isMuted())
60
  {
@@ -71,7 +74,9 @@
71
  event.target.playVideo();
72
  }
73
 
74
- } catch (err) {
 
 
75
  }
76
 
77
  },
@@ -103,7 +108,8 @@
103
  if ($nextvid.length)
104
  {
105
  $nextvid.click();
106
- } else
 
107
  {
108
  $gallery.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click();
109
 
@@ -118,13 +124,13 @@
118
  },
119
  setupevents: function (iframeid)
120
  {
121
- window._EPADashboard_.log('Setting up YT API events: ' + iframeid);
122
  if (typeof (window.YT) !== 'undefined' && window.YT !== null && window.YT.loaded)
123
  {
124
  var thisvid = document.getElementById(iframeid);
125
 
126
  if (!thisvid.epytsetupdone)
127
  {
 
128
  thisvid.epytsetupdone = true;
129
  return new window.YT.Player(iframeid, {
130
  events: {
@@ -135,7 +141,8 @@
135
  }
136
  }
137
  },
138
- apiInit: function () {
 
139
  if (typeof (window.YT) !== 'undefined')
140
  {
141
  window._EPADashboard_.initStarted = true;
@@ -150,31 +157,43 @@
150
  }
151
  }
152
  },
153
- log: function (msg) {
 
154
  try
155
  {
156
  console.log(msg);
157
- } catch (err) {
 
 
158
  }
159
  },
160
- doubleCheck: function () {
161
- window._EPADashboard_.checkInterval = setInterval(function () {
 
 
162
  window._EPADashboard_.checkCount++;
163
- if (window._EPADashboard_.checkCount >= 5 || window._EPADashboard_.initStarted) {
 
164
  clearInterval(window._EPADashboard_.checkInterval);
165
- } else {
 
 
166
  window._EPADashboard_.apiInit();
167
  window._EPADashboard_.log('YT API init check');
168
  }
169
 
170
  }, 1000);
171
  },
172
- selectText: function (ele) {
173
- if (document.selection) {
 
 
174
  var range = document.body.createTextRange();
175
  range.moveToElementText(ele);
176
  range.select();
177
- } else if (window.getSelection) {
 
 
178
  var selection = window.getSelection();
179
  var range = document.createRange();
180
  range.selectNode(ele);
@@ -182,13 +201,45 @@
182
  selection.addRange(range);
183
  }
184
  },
185
- setVidSrc: function ($iframe, vidSrc) {
 
186
  $iframe.attr('src', vidSrc);
187
  $iframe.get(0).epytsetupdone = false;
188
  window._EPADashboard_.setupevents($iframe.attr('id'));
189
  },
190
- pageReady: function () {
191
- $('.epyt-gallery').each(function () {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
192
  var $container = $(this);
193
  var $iframe = $(this).find('iframe').first();
194
 
@@ -201,9 +252,8 @@
201
  initSrc = initSrc.replace(firstId, 'GALLERYVIDEOID');
202
  $iframe.data('ep-gallerysrc', initSrc);
203
 
204
- var $listgallery = $container.find('.epyt-gallery-list');
205
-
206
- $container.on('click', '.epyt-gallery-list .epyt-gallery-thumb', function () {
207
  $container.find('.epyt-gallery-list .epyt-gallery-thumb').removeClass('epyt-current-video');
208
  $(this).addClass('epyt-current-video');
209
  var vid = $(this).data('videoid');
@@ -216,7 +266,8 @@
216
  if (vidSrc.indexOf('autoplay') > 0)
217
  {
218
  vidSrc = vidSrc.replace('autoplay=0', 'autoplay=1');
219
- } else
 
220
  {
221
  vidSrc += '&autoplay=1';
222
  }
@@ -231,32 +282,39 @@
231
  {
232
  $('html, body').animate({
233
  scrollTop: scrollNext
234
- }, 500, function () {
 
235
  window._EPADashboard_.setVidSrc($iframe, vidSrc);
236
  });
237
- } else
 
238
  {
239
  window._EPADashboard_.setVidSrc($iframe, vidSrc);
240
  }
241
 
242
- }).on('keydown', '.epyt-gallery-list .epyt-gallery-thumb, .epyt-pagebutton', function (e) {
 
243
  var code = e.which;
244
- if ((code === 13) || (code === 32)) {
 
245
  e.preventDefault();
246
  $(this).click();
247
 
248
  }
249
  });
250
 
251
- $container.on('mouseenter', '.epyt-gallery-list .epyt-gallery-thumb', function () {
 
252
  $(this).addClass('hover');
253
  });
254
 
255
- $container.on('mouseleave', '.epyt-gallery-list .epyt-gallery-thumb', function () {
 
256
  $(this).removeClass('hover');
257
  });
258
 
259
- $container.on('click', '.epyt-pagebutton', function () {
 
260
  var pageData = {
261
  action: 'my_embedplus_gallery_page',
262
  security: _EPYT_.security,
@@ -279,9 +337,11 @@
279
  $container.data('currpage', currpage);
280
  $container.find('.epyt-gallery-list').addClass('epyt-loading');
281
 
282
- $.post(_EPYT_.ajaxurl, pageData, function (response) {
 
283
  $container.find('.epyt-gallery-list').html(response);
284
- $container.find('.epyt-current').each(function () {
 
285
  $(this).text($container.data('currpage'));
286
  });
287
  $container.find('.epyt-gallery-thumb[data-videoid="' + $container.data('currvid') + '"]').addClass('epyt-current-video');
@@ -292,10 +352,12 @@
292
  }
293
 
294
  })
295
- .fail(function () {
 
296
  alert('Sorry, there was an error loading the next page.');
297
  })
298
- .always(function () {
 
299
  $container.find('.epyt-gallery-list').removeClass('epyt-loading');
300
 
301
  if ($container.find('.epyt-pagebutton').first().data('autonext') != '1')
@@ -326,56 +388,47 @@
326
  {
327
  window._EPADashboard_.apiInit();
328
  window._EPADashboard_.log('YT API ready');
329
- } else
 
330
  {
331
- $(window).on('load._EPYT_', function () {
 
332
  window._EPADashboard_.apiInit();
333
  window._EPADashboard_.log('YT API ready 2');
334
  });
335
  }
336
  };
337
 
338
- if (typeof window.YT === 'undefined')
339
- {
340
- var iapi = document.createElement('script');
341
- iapi.src = "//www.youtube.com/iframe_api";
342
- iapi.type = "text/javascript";
343
- document.getElementsByTagName('head')[0].appendChild(iapi);
344
- } else if (window.YT.loaded)
345
- {
346
- if (window._EPYT_.pageLoaded)
347
- {
348
- window._EPADashboard_.apiInit();
349
- window._EPADashboard_.log('YT API available');
350
- } else
351
- {
352
- $(window).on('load._EPYT_', function () {
353
- window._EPADashboard_.apiInit();
354
- window._EPADashboard_.log('YT API available 2');
355
- });
356
- }
357
- }
358
 
359
  if (window._EPYT_.pageLoaded)
360
  {
361
  window._EPADashboard_.doubleCheck();
362
- } else
 
363
  {
364
- $(window).on('load._EPYT_', function () {
 
365
  window._EPADashboard_.doubleCheck();
366
  });
367
  }
368
 
369
 
370
- $(document).ready(function () {
 
371
  window._EPADashboard_.pageReady();
372
 
 
 
373
  if (window._EPYT_.ajax_compat)
374
  {
375
- $(window).on('load._EPYT_', function () {
376
- $(document).ajaxSuccess(function (e, xhr, settings) {
 
 
377
  if (xhr && xhr.responseText && xhr.responseText.indexOf('<iframe ') !== -1)
378
  {
 
379
  window._EPADashboard_.apiInit();
380
  window._EPADashboard_.log('YT API AJAX');
381
  window._EPADashboard_.pageReady();
10
  evselector: 'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]',
11
  stopMobileBuffer: true,
12
  ajax_compat: false,
13
+ usingdefault: true,
14
+ ytapi_load: 'light'
15
  };
16
 
17
  if (window.location.toString().indexOf('https://') === 0)
20
  }
21
 
22
  window._EPYT_.pageLoaded = false;
23
+ $(window).on('load._EPYT_', function ()
24
+ {
25
  window._EPYT_.pageLoaded = true;
26
  });
27
 
56
  if (vol === 0)
57
  {
58
  event.target.mute();
59
+ }
60
+ else
61
  {
62
  if (event.target.isMuted())
63
  {
74
  event.target.playVideo();
75
  }
76
 
77
+ }
78
+ catch (err)
79
+ {
80
  }
81
 
82
  },
108
  if ($nextvid.length)
109
  {
110
  $nextvid.click();
111
+ }
112
+ else
113
  {
114
  $gallery.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click();
115
 
124
  },
125
  setupevents: function (iframeid)
126
  {
 
127
  if (typeof (window.YT) !== 'undefined' && window.YT !== null && window.YT.loaded)
128
  {
129
  var thisvid = document.getElementById(iframeid);
130
 
131
  if (!thisvid.epytsetupdone)
132
  {
133
+ window._EPADashboard_.log('Setting up YT API events: ' + iframeid);
134
  thisvid.epytsetupdone = true;
135
  return new window.YT.Player(iframeid, {
136
  events: {
141
  }
142
  }
143
  },
144
+ apiInit: function ()
145
+ {
146
  if (typeof (window.YT) !== 'undefined')
147
  {
148
  window._EPADashboard_.initStarted = true;
157
  }
158
  }
159
  },
160
+ log: function (msg)
161
+ {
162
  try
163
  {
164
  console.log(msg);
165
+ }
166
+ catch (err)
167
+ {
168
  }
169
  },
170
+ doubleCheck: function ()
171
+ {
172
+ window._EPADashboard_.checkInterval = setInterval(function ()
173
+ {
174
  window._EPADashboard_.checkCount++;
175
+ if (window._EPADashboard_.checkCount >= 5 || window._EPADashboard_.initStarted)
176
+ {
177
  clearInterval(window._EPADashboard_.checkInterval);
178
+ }
179
+ else
180
+ {
181
  window._EPADashboard_.apiInit();
182
  window._EPADashboard_.log('YT API init check');
183
  }
184
 
185
  }, 1000);
186
  },
187
+ selectText: function (ele)
188
+ {
189
+ if (document.selection)
190
+ {
191
  var range = document.body.createTextRange();
192
  range.moveToElementText(ele);
193
  range.select();
194
+ }
195
+ else if (window.getSelection)
196
+ {
197
  var selection = window.getSelection();
198
  var range = document.createRange();
199
  range.selectNode(ele);
201
  selection.addRange(range);
202
  }
203
  },
204
+ setVidSrc: function ($iframe, vidSrc)
205
+ {
206
  $iframe.attr('src', vidSrc);
207
  $iframe.get(0).epytsetupdone = false;
208
  window._EPADashboard_.setupevents($iframe.attr('id'));
209
  },
210
+ loadYTAPI: function ()
211
+ {
212
+ if (typeof window.YT === 'undefined')
213
+ {
214
+ if (window._EPYT_.ytapi_load !== 'never' && (window._EPYT_.ytapi_load === 'always' || $('iframe[src*="youtube.com/embed/"]').length))
215
+ {
216
+ var iapi = document.createElement('script');
217
+ iapi.src = "//www.youtube.com/iframe_api";
218
+ iapi.type = "text/javascript";
219
+ document.getElementsByTagName('head')[0].appendChild(iapi);
220
+ }
221
+ }
222
+ else if (window.YT.loaded)
223
+ {
224
+ if (window._EPYT_.pageLoaded)
225
+ {
226
+ window._EPADashboard_.apiInit();
227
+ window._EPADashboard_.log('YT API available');
228
+ }
229
+ else
230
+ {
231
+ $(window).on('load._EPYT_', function ()
232
+ {
233
+ window._EPADashboard_.apiInit();
234
+ window._EPADashboard_.log('YT API available 2');
235
+ });
236
+ }
237
+ }
238
+ },
239
+ pageReady: function ()
240
+ {
241
+ $('.epyt-gallery').each(function ()
242
+ {
243
  var $container = $(this);
244
  var $iframe = $(this).find('iframe').first();
245
 
252
  initSrc = initSrc.replace(firstId, 'GALLERYVIDEOID');
253
  $iframe.data('ep-gallerysrc', initSrc);
254
 
255
+ $container.on('click', '.epyt-gallery-list .epyt-gallery-thumb', function ()
256
+ {
 
257
  $container.find('.epyt-gallery-list .epyt-gallery-thumb').removeClass('epyt-current-video');
258
  $(this).addClass('epyt-current-video');
259
  var vid = $(this).data('videoid');
266
  if (vidSrc.indexOf('autoplay') > 0)
267
  {
268
  vidSrc = vidSrc.replace('autoplay=0', 'autoplay=1');
269
+ }
270
+ else
271
  {
272
  vidSrc += '&autoplay=1';
273
  }
282
  {
283
  $('html, body').animate({
284
  scrollTop: scrollNext
285
+ }, 500, function ()
286
+ {
287
  window._EPADashboard_.setVidSrc($iframe, vidSrc);
288
  });
289
+ }
290
+ else
291
  {
292
  window._EPADashboard_.setVidSrc($iframe, vidSrc);
293
  }
294
 
295
+ }).on('keydown', '.epyt-gallery-list .epyt-gallery-thumb, .epyt-pagebutton', function (e)
296
+ {
297
  var code = e.which;
298
+ if ((code === 13) || (code === 32))
299
+ {
300
  e.preventDefault();
301
  $(this).click();
302
 
303
  }
304
  });
305
 
306
+ $container.on('mouseenter', '.epyt-gallery-list .epyt-gallery-thumb', function ()
307
+ {
308
  $(this).addClass('hover');
309
  });
310
 
311
+ $container.on('mouseleave', '.epyt-gallery-list .epyt-gallery-thumb', function ()
312
+ {
313
  $(this).removeClass('hover');
314
  });
315
 
316
+ $container.on('click', '.epyt-pagebutton', function ()
317
+ {
318
  var pageData = {
319
  action: 'my_embedplus_gallery_page',
320
  security: _EPYT_.security,
337
  $container.data('currpage', currpage);
338
  $container.find('.epyt-gallery-list').addClass('epyt-loading');
339
 
340
+ $.post(_EPYT_.ajaxurl, pageData, function (response)
341
+ {
342
  $container.find('.epyt-gallery-list').html(response);
343
+ $container.find('.epyt-current').each(function ()
344
+ {
345
  $(this).text($container.data('currpage'));
346
  });
347
  $container.find('.epyt-gallery-thumb[data-videoid="' + $container.data('currvid') + '"]').addClass('epyt-current-video');
352
  }
353
 
354
  })
355
+ .fail(function ()
356
+ {
357
  alert('Sorry, there was an error loading the next page.');
358
  })
359
+ .always(function ()
360
+ {
361
  $container.find('.epyt-gallery-list').removeClass('epyt-loading');
362
 
363
  if ($container.find('.epyt-pagebutton').first().data('autonext') != '1')
388
  {
389
  window._EPADashboard_.apiInit();
390
  window._EPADashboard_.log('YT API ready');
391
+ }
392
+ else
393
  {
394
+ $(window).on('load._EPYT_', function ()
395
+ {
396
  window._EPADashboard_.apiInit();
397
  window._EPADashboard_.log('YT API ready 2');
398
  });
399
  }
400
  };
401
 
402
+ window._EPADashboard_.loadYTAPI();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
403
 
404
  if (window._EPYT_.pageLoaded)
405
  {
406
  window._EPADashboard_.doubleCheck();
407
+ }
408
+ else
409
  {
410
+ $(window).on('load._EPYT_', function ()
411
+ {
412
  window._EPADashboard_.doubleCheck();
413
  });
414
  }
415
 
416
 
417
+ $(document).ready(function ()
418
+ {
419
  window._EPADashboard_.pageReady();
420
 
421
+ window._EPADashboard_.loadYTAPI();
422
+
423
  if (window._EPYT_.ajax_compat)
424
  {
425
+ $(window).on('load._EPYT_', function ()
426
+ {
427
+ $(document).ajaxSuccess(function (e, xhr, settings)
428
+ {
429
  if (xhr && xhr.responseText && xhr.responseText.indexOf('<iframe ') !== -1)
430
  {
431
+ window._EPADashboard_.loadYTAPI();
432
  window._EPADashboard_.apiInit();
433
  window._EPADashboard_.log('YT API AJAX');
434
  window._EPADashboard_.pageReady();
scripts/ytprefs.min.js CHANGED
@@ -1,2 +1,2 @@
1
 
2
- (function(a,b){a._EPYT_=a._EPYT_||{ajaxurl:"/wp-admin/admin-ajax.php",security:"",gallery_scrolloffset:100,eppathtoscripts:"/wp-content/plugins/youtube-embed-plus/scripts/",epresponsiveselector:["iframe.__youtube_prefs_widget__"],epdovol:true,evselector:'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]',stopMobileBuffer:true,ajax_compat:false,usingdefault:true};if(a.location.toString().indexOf("https://")===0){a._EPYT_.ajaxurl=a._EPYT_.ajaxurl.replace("http://","https://")}a._EPYT_.pageLoaded=false;b(a).on("load._EPYT_",function(){a._EPYT_.pageLoaded=true});if(!document.querySelectorAll){document.querySelectorAll=function(e){var g=document,f=g.documentElement.firstChild,d=g.createElement("STYLE");f.appendChild(d);g.__qsaels=[];d.styleSheet.cssText=e+"{x:expression(document.__qsaels.push(this))}";a.scrollBy(0,0);return g.__qsaels}}if(typeof a._EPADashboard_==="undefined"){a._EPADashboard_={initStarted:false,checkCount:0,onPlayerReady:function(g){try{if(typeof _EPYT_.epdovol!=="undefined"&&_EPYT_.epdovol){var e=parseInt(g.target.getIframe().getAttribute("data-vol"));if(!isNaN(e)){if(e===0){g.target.mute()}else{if(g.target.isMuted()){g.target.unMute()}g.target.setVolume(e)}}}var d=parseInt(g.target.getIframe().getAttribute("data-epautoplay"));if(!isNaN(d)&&d===1){g.target.playVideo()}}catch(f){}},onPlayerStateChange:function(g){var f=g.target.getIframe();if(g.data===a.YT.PlayerState.PLAYING&&g.target.ponce!==true&&f.src.indexOf("autoplay=1")===-1){g.target.ponce=true}var d=b(f).closest(".epyt-gallery");if(!d.length){d=b("#"+b(f).data("epytgalleryid"))}if(d.length){var e=d.find(".epyt-pagebutton").first().data("autonext")=="1";if(e&&g.data===a.YT.PlayerState.ENDED){var h=d.find(".epyt-current-video");if(!h.length){h=d.find(".epyt-gallery-thumb").first()}var i=h.find(" ~ .epyt-gallery-thumb").first();if(i.length){i.click()}else{d.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click()}}}},justid:function(d){return new RegExp("[\\?&]v=([^&#]*)").exec(d)[1]},setupevents:function(e){a._EPADashboard_.log("Setting up YT API events: "+e);if(typeof(a.YT)!=="undefined"&&a.YT!==null&&a.YT.loaded){var d=document.getElementById(e);if(!d.epytsetupdone){d.epytsetupdone=true;return new a.YT.Player(e,{events:{onReady:a._EPADashboard_.onPlayerReady,onStateChange:a._EPADashboard_.onPlayerStateChange}})}}},apiInit:function(){if(typeof(a.YT)!=="undefined"){a._EPADashboard_.initStarted=true;var d=document.querySelectorAll(_EPYT_.evselector);for(var e=0;e<d.length;e++){if(!d[e].hasAttribute("id")){d[e].id="_dytid_"+Math.round(Math.random()*8999+1000)}a._EPADashboard_.setupevents(d[e].id)}}},log:function(e){try{console.log(e)}catch(d){}},doubleCheck:function(){a._EPADashboard_.checkInterval=setInterval(function(){a._EPADashboard_.checkCount++;if(a._EPADashboard_.checkCount>=5||a._EPADashboard_.initStarted){clearInterval(a._EPADashboard_.checkInterval)}else{a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API init check")}},1000)},selectText:function(f){if(document.selection){var d=document.body.createTextRange();d.moveToElementText(f);d.select()}else{if(a.getSelection){var e=a.getSelection();var d=document.createRange();d.selectNode(f);e.removeAllRanges();e.addRange(d)}}},setVidSrc:function(d,e){d.attr("src",e);d.get(0).epytsetupdone=false;a._EPADashboard_.setupevents(d.attr("id"))},pageReady:function(){b(".epyt-gallery").each(function(){var h=b(this);var g=b(this).find("iframe").first();var e=g.attr("src");if(!e){e=g.data("ep-src")}var f=b(this).find(".epyt-gallery-list .epyt-gallery-thumb").first().data("videoid");e=e.replace(f,"GALLERYVIDEOID");g.data("ep-gallerysrc",e);var d=h.find(".epyt-gallery-list");h.on("click",".epyt-gallery-list .epyt-gallery-thumb",function(){h.find(".epyt-gallery-list .epyt-gallery-thumb").removeClass("epyt-current-video");b(this).addClass("epyt-current-video");var i=b(this).data("videoid");h.data("currvid",i);var m=g.data("ep-gallerysrc").replace("GALLERYVIDEOID",i);var l=h.find(".epyt-pagebutton").first().data("thumbplay");if(l!=="0"&&l!==0){if(m.indexOf("autoplay")>0){m=m.replace("autoplay=0","autoplay=1")}else{m+="&autoplay=1"}g.addClass("epyt-thumbplay")}var j=Math.max(b("body").scrollTop(),b("html").scrollTop());var k=g.offset().top-parseInt(_EPYT_.gallery_scrolloffset);if(j>k){b("html, body").animate({scrollTop:k},500,function(){a._EPADashboard_.setVidSrc(g,m)})}else{a._EPADashboard_.setVidSrc(g,m)}}).on("keydown",".epyt-gallery-list .epyt-gallery-thumb, .epyt-pagebutton",function(j){var i=j.which;if((i===13)||(i===32)){j.preventDefault();b(this).click()}});h.on("mouseenter",".epyt-gallery-list .epyt-gallery-thumb",function(){b(this).addClass("hover")});h.on("mouseleave",".epyt-gallery-list .epyt-gallery-thumb",function(){b(this).removeClass("hover")});h.on("click",".epyt-pagebutton",function(){var k={action:"my_embedplus_gallery_page",security:_EPYT_.security,options:{playlistId:b(this).data("playlistid"),pageToken:b(this).data("pagetoken"),pageSize:b(this).data("pagesize"),columns:b(this).data("epcolumns"),showTitle:b(this).data("showtitle"),showPaging:b(this).data("showpaging"),autonext:b(this).data("autonext"),hidethumbimg:b(this).data("hidethumbimg"),thumbplay:b(this).data("thumbplay")}};var i=b(this).hasClass("epyt-next");var j=parseInt(h.data("currpage")+"");j+=i?1:-1;h.data("currpage",j);h.find(".epyt-gallery-list").addClass("epyt-loading");b.post(_EPYT_.ajaxurl,k,function(l){h.find(".epyt-gallery-list").html(l);h.find(".epyt-current").each(function(){b(this).text(h.data("currpage"))});h.find('.epyt-gallery-thumb[data-videoid="'+h.data("currvid")+'"]').addClass("epyt-current-video");if(h.find(".epyt-pagebutton").first().data("autonext")=="1"){h.find(".epyt-gallery-thumb").first().click()}}).fail(function(){alert("Sorry, there was an error loading the next page.")}).always(function(){h.find(".epyt-gallery-list").removeClass("epyt-loading");if(h.find(".epyt-pagebutton").first().data("autonext")!="1"){var l=Math.max(b("body").scrollTop(),b("html").scrollTop());var m=h.find(".epyt-gallery-list").offset().top-parseInt(_EPYT_.gallery_scrolloffset);if(l>m){b("html, body").animate({scrollTop:m},500)}}})})})}}}a.onYouTubeIframeAPIReady=typeof a.onYouTubeIframeAPIReady!=="undefined"?a.onYouTubeIframeAPIReady:function(){if(a._EPYT_.pageLoaded){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API ready")}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API ready 2")})}};if(typeof a.YT==="undefined"){var c=document.createElement("script");c.src="//www.youtube.com/iframe_api";c.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(c)}else{if(a.YT.loaded){if(a._EPYT_.pageLoaded){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API available")}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API available 2")})}}}if(a._EPYT_.pageLoaded){a._EPADashboard_.doubleCheck()}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.doubleCheck()})}b(document).ready(function(){a._EPADashboard_.pageReady();if(a._EPYT_.ajax_compat){b(a).on("load._EPYT_",function(){b(document).ajaxSuccess(function(f,g,d){if(g&&g.responseText&&g.responseText.indexOf("<iframe ")!==-1){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API AJAX");a._EPADashboard_.pageReady()}})})}})})(window,jQuery);
1
 
2
+ (function(a,b){a._EPYT_=a._EPYT_||{ajaxurl:"/wp-admin/admin-ajax.php",security:"",gallery_scrolloffset:100,eppathtoscripts:"/wp-content/plugins/youtube-embed-plus/scripts/",epresponsiveselector:["iframe.__youtube_prefs_widget__"],epdovol:true,evselector:'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]',stopMobileBuffer:true,ajax_compat:false,usingdefault:true,ytapi_load:"light"};if(a.location.toString().indexOf("https://")===0){a._EPYT_.ajaxurl=a._EPYT_.ajaxurl.replace("http://","https://")}a._EPYT_.pageLoaded=false;b(a).on("load._EPYT_",function(){a._EPYT_.pageLoaded=true});if(!document.querySelectorAll){document.querySelectorAll=function(d){var f=document,e=f.documentElement.firstChild,c=f.createElement("STYLE");e.appendChild(c);f.__qsaels=[];c.styleSheet.cssText=d+"{x:expression(document.__qsaels.push(this))}";a.scrollBy(0,0);return f.__qsaels}}if(typeof a._EPADashboard_==="undefined"){a._EPADashboard_={initStarted:false,checkCount:0,onPlayerReady:function(f){try{if(typeof _EPYT_.epdovol!=="undefined"&&_EPYT_.epdovol){var d=parseInt(f.target.getIframe().getAttribute("data-vol"));if(!isNaN(d)){if(d===0){f.target.mute()}else{if(f.target.isMuted()){f.target.unMute()}f.target.setVolume(d)}}}var c=parseInt(f.target.getIframe().getAttribute("data-epautoplay"));if(!isNaN(c)&&c===1){f.target.playVideo()}}catch(e){}},onPlayerStateChange:function(f){var e=f.target.getIframe();if(f.data===a.YT.PlayerState.PLAYING&&f.target.ponce!==true&&e.src.indexOf("autoplay=1")===-1){f.target.ponce=true}var c=b(e).closest(".epyt-gallery");if(!c.length){c=b("#"+b(e).data("epytgalleryid"))}if(c.length){var d=c.find(".epyt-pagebutton").first().data("autonext")=="1";if(d&&f.data===a.YT.PlayerState.ENDED){var g=c.find(".epyt-current-video");if(!g.length){g=c.find(".epyt-gallery-thumb").first()}var h=g.find(" ~ .epyt-gallery-thumb").first();if(h.length){h.click()}else{c.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click()}}}},justid:function(c){return new RegExp("[\\?&]v=([^&#]*)").exec(c)[1]},setupevents:function(d){if(typeof(a.YT)!=="undefined"&&a.YT!==null&&a.YT.loaded){var c=document.getElementById(d);if(!c.epytsetupdone){a._EPADashboard_.log("Setting up YT API events: "+d);c.epytsetupdone=true;return new a.YT.Player(d,{events:{onReady:a._EPADashboard_.onPlayerReady,onStateChange:a._EPADashboard_.onPlayerStateChange}})}}},apiInit:function(){if(typeof(a.YT)!=="undefined"){a._EPADashboard_.initStarted=true;var c=document.querySelectorAll(_EPYT_.evselector);for(var d=0;d<c.length;d++){if(!c[d].hasAttribute("id")){c[d].id="_dytid_"+Math.round(Math.random()*8999+1000)}a._EPADashboard_.setupevents(c[d].id)}}},log:function(d){try{console.log(d)}catch(c){}},doubleCheck:function(){a._EPADashboard_.checkInterval=setInterval(function(){a._EPADashboard_.checkCount++;if(a._EPADashboard_.checkCount>=5||a._EPADashboard_.initStarted){clearInterval(a._EPADashboard_.checkInterval)}else{a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API init check")}},1000)},selectText:function(e){if(document.selection){var c=document.body.createTextRange();c.moveToElementText(e);c.select()}else{if(a.getSelection){var d=a.getSelection();var c=document.createRange();c.selectNode(e);d.removeAllRanges();d.addRange(c)}}},setVidSrc:function(c,d){c.attr("src",d);c.get(0).epytsetupdone=false;a._EPADashboard_.setupevents(c.attr("id"))},loadYTAPI:function(){if(typeof a.YT==="undefined"){if(a._EPYT_.ytapi_load!=="never"&&(a._EPYT_.ytapi_load==="always"||b('iframe[src*="youtube.com/embed/"]').length)){var c=document.createElement("script");c.src="//www.youtube.com/iframe_api";c.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(c)}}else{if(a.YT.loaded){if(a._EPYT_.pageLoaded){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API available")}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API available 2")})}}}},pageReady:function(){b(".epyt-gallery").each(function(){var f=b(this);var e=b(this).find("iframe").first();var c=e.attr("src");if(!c){c=e.data("ep-src")}var d=b(this).find(".epyt-gallery-list .epyt-gallery-thumb").first().data("videoid");c=c.replace(d,"GALLERYVIDEOID");e.data("ep-gallerysrc",c);f.on("click",".epyt-gallery-list .epyt-gallery-thumb",function(){f.find(".epyt-gallery-list .epyt-gallery-thumb").removeClass("epyt-current-video");b(this).addClass("epyt-current-video");var g=b(this).data("videoid");f.data("currvid",g);var k=e.data("ep-gallerysrc").replace("GALLERYVIDEOID",g);var j=f.find(".epyt-pagebutton").first().data("thumbplay");if(j!=="0"&&j!==0){if(k.indexOf("autoplay")>0){k=k.replace("autoplay=0","autoplay=1")}else{k+="&autoplay=1"}e.addClass("epyt-thumbplay")}var h=Math.max(b("body").scrollTop(),b("html").scrollTop());var i=e.offset().top-parseInt(_EPYT_.gallery_scrolloffset);if(h>i){b("html, body").animate({scrollTop:i},500,function(){a._EPADashboard_.setVidSrc(e,k)})}else{a._EPADashboard_.setVidSrc(e,k)}}).on("keydown",".epyt-gallery-list .epyt-gallery-thumb, .epyt-pagebutton",function(h){var g=h.which;if((g===13)||(g===32)){h.preventDefault();b(this).click()}});f.on("mouseenter",".epyt-gallery-list .epyt-gallery-thumb",function(){b(this).addClass("hover")});f.on("mouseleave",".epyt-gallery-list .epyt-gallery-thumb",function(){b(this).removeClass("hover")});f.on("click",".epyt-pagebutton",function(){var i={action:"my_embedplus_gallery_page",security:_EPYT_.security,options:{playlistId:b(this).data("playlistid"),pageToken:b(this).data("pagetoken"),pageSize:b(this).data("pagesize"),columns:b(this).data("epcolumns"),showTitle:b(this).data("showtitle"),showPaging:b(this).data("showpaging"),autonext:b(this).data("autonext"),hidethumbimg:b(this).data("hidethumbimg"),thumbplay:b(this).data("thumbplay")}};var g=b(this).hasClass("epyt-next");var h=parseInt(f.data("currpage")+"");h+=g?1:-1;f.data("currpage",h);f.find(".epyt-gallery-list").addClass("epyt-loading");b.post(_EPYT_.ajaxurl,i,function(j){f.find(".epyt-gallery-list").html(j);f.find(".epyt-current").each(function(){b(this).text(f.data("currpage"))});f.find('.epyt-gallery-thumb[data-videoid="'+f.data("currvid")+'"]').addClass("epyt-current-video");if(f.find(".epyt-pagebutton").first().data("autonext")=="1"){f.find(".epyt-gallery-thumb").first().click()}}).fail(function(){alert("Sorry, there was an error loading the next page.")}).always(function(){f.find(".epyt-gallery-list").removeClass("epyt-loading");if(f.find(".epyt-pagebutton").first().data("autonext")!="1"){var j=Math.max(b("body").scrollTop(),b("html").scrollTop());var k=f.find(".epyt-gallery-list").offset().top-parseInt(_EPYT_.gallery_scrolloffset);if(j>k){b("html, body").animate({scrollTop:k},500)}}})})})}}}a.onYouTubeIframeAPIReady=typeof a.onYouTubeIframeAPIReady!=="undefined"?a.onYouTubeIframeAPIReady:function(){if(a._EPYT_.pageLoaded){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API ready")}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API ready 2")})}};a._EPADashboard_.loadYTAPI();if(a._EPYT_.pageLoaded){a._EPADashboard_.doubleCheck()}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.doubleCheck()})}b(document).ready(function(){a._EPADashboard_.pageReady();a._EPADashboard_.loadYTAPI();if(a._EPYT_.ajax_compat){b(a).on("load._EPYT_",function(){b(document).ajaxSuccess(function(d,f,c){if(f&&f.responseText&&f.responseText.indexOf("<iframe ")!==-1){a._EPADashboard_.loadYTAPI();a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API AJAX");a._EPADashboard_.pageReady()}})})}})})(window,jQuery);
styles/ytprefs-wizard.css CHANGED
@@ -45,10 +45,16 @@ input.ui-widget[type=text] {
45
  font-weight: bold;
46
  }
47
 
 
 
 
 
48
  .ui-button .ui-icon {
49
  transform: scale(1.35,1.35);
 
50
  }
51
 
 
52
  .copycode {
53
  background-color: #eeeeff;
54
  border: 2px solid #c7d6e4;
45
  font-weight: bold;
46
  }
47
 
48
+ #epyt_wiz_wrap .ui-icon {
49
+ display: inline-block;
50
+ }
51
+
52
  .ui-button .ui-icon {
53
  transform: scale(1.35,1.35);
54
+ display: inline-block;
55
  }
56
 
57
+
58
  .copycode {
59
  background-color: #eeeeff;
60
  border: 2px solid #c7d6e4;
styles/ytprefs-wizard.min.css CHANGED
@@ -1,2 +1,2 @@
1
 
2
- #wphead{display:none}#wpbody{margin-left:0}#adminmenuback{display:none}#adminmenu,adminmenuwrap{display:none}#wpcontent,.auto-fold #wpcontent{margin-left:0}#wpadminbar{display:none}html.wp-toolbar{padding:0}#footer,#wpfooter,.auto-fold #wpfooter{display:none}#wpfooter{clear:both}.clearboth{clear:both}.pad20{padding:20px}.center{text-align:center}.bold{font-weight:bold}.orange{color:#f85d00}.smallnote{font-size:small;font-style:italic}.ui-accordion .ui-accordion-header{margin-top:15px;font-weight:bold}.ui-accordion .ui-accordion-content.header-go-content{display:none!important;height:0!important}input.ui-widget[type=text]{margin:0;padding:.4em 1em;width:450px}.txt-button-align input.ui-widget[type=text],.txt-button-align button{vertical-align:top}#epyt_wiz_wrap .ui-button{font-weight:bold}.ui-button .ui-icon{transform:scale(1.35,1.35)}.copycode{background-color:#eef;border:2px solid #c7d6e4;display:inline-block;font-size:.9em;overflow-x:hidden;vertical-align:middle;white-space:nowrap;width:400px;padding-left:15px;padding-right:15px}.pointer{cursor:pointer}.relative{position:relative}.epyt-search-results a.pointer.thumb.load-movie{float:left;width:160px;height:90px;background-position:center;background-size:cover;display:block;margin:0 25px 10px 0}.epyt-search-results .resultdiv{margin-bottom:40px}.epyt-search-results .resultinfo{text-align:left}.epyt-search-results .resulttitle{font-weight:bold}.epyt-search-results .moviecontainer{margin-bottom:40px;margin-top:-30px}.epyt-search-results .closeme{right:110px;top:-10px;position:absolute;font-weight:bold;font-size:50px;cursor:pointer}.epyt-search-results .resulttitle .ui-icon{transform:scale(1.35,1.35)}.epyt-pagination{clear:both;text-align:center;padding:10px 8px 10px 8px;display:none}.epyt-pagination>div,.epyt-pagenumbers>div{display:inline-block;padding:0 2px 0 2px;vertical-align:middle}.epyt-pagination .epyt-pagebutton{cursor:pointer;display:inline-block;padding:0 10px 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-pagebutton.hide,.epyt-pagenumbers.hide{display:none!important;opacity:0!important;visibility:hidden!important}.ui-tabs .ui-tabs-anchor{font-weight:bold}.playlist-tabs{margin-bottom:20px}.icon-playlist{float:left;height:auto;margin:15px 30px 0 0;max-width:150px}a.ythealth{clear:both;float:right;margin-top:15px;position:relative}a.ythealth .tip{position:absolute;width:450px;right:0;top:-100px;display:none;background-color:#fff;padding:20px;border:2px solid #ddd;border-radius:5px}a.ythealth:hover .tip{display:block}
1
 
2
+ #wphead{display:none}#wpbody{margin-left:0}#adminmenuback{display:none}#adminmenu,adminmenuwrap{display:none}#wpcontent,.auto-fold #wpcontent{margin-left:0}#wpadminbar{display:none}html.wp-toolbar{padding:0}#footer,#wpfooter,.auto-fold #wpfooter{display:none}#wpfooter{clear:both}.clearboth{clear:both}.pad20{padding:20px}.center{text-align:center}.bold{font-weight:bold}.orange{color:#f85d00}.smallnote{font-size:small;font-style:italic}.ui-accordion .ui-accordion-header{margin-top:15px;font-weight:bold}.ui-accordion .ui-accordion-content.header-go-content{display:none!important;height:0!important}input.ui-widget[type=text]{margin:0;padding:.4em 1em;width:450px}.txt-button-align input.ui-widget[type=text],.txt-button-align button{vertical-align:top}#epyt_wiz_wrap .ui-button{font-weight:bold}#epyt_wiz_wrap .ui-icon{display:inline-block}.ui-button .ui-icon{transform:scale(1.35,1.35);display:inline-block}.copycode{background-color:#eef;border:2px solid #c7d6e4;display:inline-block;font-size:.9em;overflow-x:hidden;vertical-align:middle;white-space:nowrap;width:400px;padding-left:15px;padding-right:15px}.pointer{cursor:pointer}.relative{position:relative}.epyt-search-results a.pointer.thumb.load-movie{float:left;width:160px;height:90px;background-position:center;background-size:cover;display:block;margin:0 25px 10px 0}.epyt-search-results .resultdiv{margin-bottom:40px}.epyt-search-results .resultinfo{text-align:left}.epyt-search-results .resulttitle{font-weight:bold}.epyt-search-results .moviecontainer{margin-bottom:40px;margin-top:-30px}.epyt-search-results .closeme{right:110px;top:-10px;position:absolute;font-weight:bold;font-size:50px;cursor:pointer}.epyt-search-results .resulttitle .ui-icon{transform:scale(1.35,1.35)}.epyt-pagination{clear:both;text-align:center;padding:10px 8px 10px 8px;display:none}.epyt-pagination>div,.epyt-pagenumbers>div{display:inline-block;padding:0 2px 0 2px;vertical-align:middle}.epyt-pagination .epyt-pagebutton{cursor:pointer;display:inline-block;padding:0 10px 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-pagebutton.hide,.epyt-pagenumbers.hide{display:none!important;opacity:0!important;visibility:hidden!important}.ui-tabs .ui-tabs-anchor{font-weight:bold}.playlist-tabs{margin-bottom:20px}.icon-playlist{float:left;height:auto;margin:15px 30px 0 0;max-width:150px}a.ythealth{clear:both;float:right;margin-top:15px;position:relative}a.ythealth .tip{position:absolute;width:450px;right:0;top:-100px;display:none;background-color:#fff;padding:20px;border:2px solid #ddd;border-radius:5px}a.ythealth:hover .tip{display:block}
youtube.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: YouTube
4
  Plugin URI: https://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx
5
  Description: YouTube Embed and YouTube Gallery WordPress Plugin. Embed a responsive video, YouTube channel, playlist gallery, or live stream
6
- Version: 11.8.6.1
7
  Author: EmbedPlus Team
8
  Author URI: https://www.embedplus.com
9
  */
@@ -33,7 +33,7 @@ class YouTubePrefs
33
  {
34
 
35
  public static $curltimeout = 20;
36
- public static $version = '11.8.6.1';
37
  public static $opt_version = 'version';
38
  public static $optembedwidth = null;
39
  public static $optembedheight = null;
@@ -74,6 +74,7 @@ class YouTubePrefs
74
  public static $opt_restrict_wizard = 'restrict_wizard';
75
  public static $opt_restrict_wizard_roles = 'restrict_wizard_roles';
76
  public static $opt_ajax_compat = 'ajax_compat';
 
77
  public static $opt_defaultdims = 'defaultdims';
78
  public static $opt_defaultwidth = 'width';
79
  public static $opt_defaultheight = 'height';
@@ -727,7 +728,7 @@ class YouTubePrefs
727
  <div class="wiz-accordion">
728
  <h3 class="header-go"><a href="<?php echo admin_url('admin.php?page=youtube-my-preferences#jumpdefaults'); ?>">Check my general YouTube embedding instructions and settings. </a></h3>
729
  <div class="header-go-content"></div>
730
- <h3 id="h3_video"><a href="#">Embed a single video.</a></h3>
731
  <div>
732
  <h4 class="center">Single video directions</h4>
733
  <p>
@@ -746,7 +747,7 @@ class YouTubePrefs
746
  </form>
747
  <?php echo $step1_video_errors ? '<p class="orange bold">' . $step1_video_errors . '</p>' : ''; ?>
748
  </div>
749
- <h3 id="h3_playlist"><a href="#">Embed a playlist. </a></h3>
750
  <div>
751
  <h4 class="center">Playlist directions</h4>
752
  <div class="playlist-tabs">
@@ -786,7 +787,7 @@ class YouTubePrefs
786
  </form>
787
  <?php echo $step1_playlist_errors ? '<p class="orange bold">' . $step1_playlist_errors . '</p>' : ''; ?>
788
  </div>
789
- <h3 id="h3_channel"><a href="#">Embed a channel. </a></h3>
790
  <div>
791
  <h4 class="center">Channel directions</h4>
792
  <?php
@@ -819,7 +820,7 @@ class YouTubePrefs
819
  }
820
  ?>
821
  </div>
822
- <h3 id="h3_live"><a href="#">Embed a live stream. </a></h3>
823
  <div>
824
  <h4 class="center">Live stream directions (<a href="https://www.youtube.com/watch?v=dEQMTUke48E" target="_blank">Video tutorial here &raquo;</a>)</h4>
825
  <?php
@@ -851,13 +852,13 @@ class YouTubePrefs
851
  }
852
  ?>
853
  </div>
854
- <h3 class="header-go"><a href="<?php echo self::$epbase . '/dashboard/pro-easy-video-analytics.aspx'; ?>">Check my performance, blocked countries, deleted videos, etc. (PRO) </a></h3>
855
  <div class="header-go-content"></div>
856
  </div>
857
  <a id="lnkYthealth" class="ythealth imglink" href="<?php echo self::$epbase ?>/dashboard/pro-easy-video-analytics.aspx" target="_blank">
858
  <img src="<?php echo plugins_url('/images/ythealth.png', __FILE__) ?>">
859
  <div class="tip">
860
- <span class=orange>(PRO)</span> Click to request an instant YouTube diagnostic report to see what (if any) important service problems that Google/YouTube are having right now that might affect your embeds, playlists, and analytics. This report includes issues affecting all types of embeds (standard and advanced players) and sites (not just WordPress). It also considers different devices; e.g. phones, tablets, and PCs.
861
  </div>
862
  </a>
863
  <?php
@@ -1158,10 +1159,12 @@ class YouTubePrefs
1158
 
1159
  (function ($j)
1160
  {
1161
- $j(document).ready(function () {
 
1162
 
1163
 
1164
- $j('.acctitle').click(function () {
 
1165
  var $acctitle = $j(this);
1166
  var $accbox = $j(this).parent().children('.accbox');
1167
  var pid = $accbox.attr("data-postid");
@@ -1172,17 +1175,23 @@ class YouTubePrefs
1172
  timeout: 30000,
1173
  url: window._EPYTA_ ? window._EPYTA_.wpajaxurl : ajaxurl,
1174
  data: {action: 'my_embedplus_glance_vids', postid: pid},
1175
- success: function (response) {
1176
- if (response.type === "success") {
 
 
1177
  $accbox.html(response.data),
1178
  $accbox.show(400);
1179
- } else {
 
 
1180
  }
1181
  },
1182
- error: function (xhr, ajaxOptions, thrownError) {
 
1183
 
1184
  },
1185
- complete: function () {
 
1186
  $acctitle.children('.accloader').remove();
1187
  }
1188
 
@@ -1484,23 +1493,30 @@ class YouTubePrefs
1484
  </div>
1485
  <iframe allowTransparency="true" src="<?php echo self::$epbase . '/both-plugins-conflict.aspx' ?>" style="width:2px; height: 2px;" ></iframe>
1486
  <script type="text/javascript">
1487
- (function ($) {
1488
- $(document).ready(function () {
1489
- $('.epxout').click(function () {
 
 
 
1490
  $.ajax({
1491
  type: "post",
1492
  dataType: "json",
1493
  timeout: 30000,
1494
  url: window._EPYTA_ ? window._EPYTA_.wpajaxurl : ajaxurl,
1495
  data: {action: 'my_embedplus_dismiss_double_plugin_warning'},
1496
- success: function (response) {
1497
- if (response.type === "success") {
 
 
1498
  $(".embedpluswarningbox").hide();
1499
  }
1500
  },
1501
- error: function (xhr, ajaxOptions, thrownError) {
 
1502
  },
1503
- complete: function () {
 
1504
  }
1505
  });
1506
  });
@@ -1546,6 +1562,7 @@ class YouTubePrefs
1546
  epdovol: true,
1547
  evselector: '<?php echo self::get_evselector(); ?>',
1548
  ajax_compat: <?php echo self::$alloptions[self::$opt_ajax_compat] == '1' ? 'true' : 'false' ?>,
 
1549
  stopMobileBuffer: <?php echo self::$alloptions[self::$opt_stop_mobile_buffer] == '1' ? 'true' : 'false' ?>
1550
  };</script>
1551
  <?php
@@ -1557,7 +1574,7 @@ class YouTubePrefs
1557
  $loggedin = current_user_can('edit_posts');
1558
  if (!($loggedin && self::$alloptions[self::$opt_admin_off_scripts]))
1559
  {
1560
- wp_enqueue_script('__ytprefsfitvids__', plugins_url('scripts/fitvids' . self::$min . '.js', __FILE__), array('__ytprefs__'), false, true);
1561
  }
1562
  }
1563
 
@@ -1607,6 +1624,7 @@ class YouTubePrefs
1607
  $_restrict_wizard = 0;
1608
  $_restrict_wizard_roles = self::$dft_roles;
1609
  $_ajax_compat = 0;
 
1610
  $_defaultdims = 0;
1611
  $_defaultwidth = '';
1612
  $_defaultheight = '';
@@ -1671,6 +1689,7 @@ class YouTubePrefs
1671
  $_restrict_wizard = self::tryget($arroptions, self::$opt_restrict_wizard, 0);
1672
  $_restrict_wizard_roles = self::tryget($arroptions, self::$opt_restrict_wizard_roles, self::$dft_roles);
1673
  $_ajax_compat = self::tryget($arroptions, self::$opt_ajax_compat, 0);
 
1674
  $_defaultdims = self::tryget($arroptions, self::$opt_defaultdims, 0);
1675
  $_defaultwidth = self::tryget($arroptions, self::$opt_defaultwidth, '');
1676
  $_defaultheight = self::tryget($arroptions, self::$opt_defaultheight, '');
@@ -1739,6 +1758,7 @@ class YouTubePrefs
1739
  self::$opt_restrict_wizard => $_restrict_wizard,
1740
  self::$opt_restrict_wizard_roles => $_restrict_wizard_roles,
1741
  self::$opt_ajax_compat => $_ajax_compat,
 
1742
  self::$opt_defaultdims => $_defaultdims,
1743
  self::$opt_defaultwidth => $_defaultwidth,
1744
  self::$opt_defaultheight => $_defaultheight,
@@ -2563,8 +2583,10 @@ class YouTubePrefs
2563
  add_thickbox();
2564
  ?>
2565
  <script type="text/javascript">
2566
- function widen_ytprefs_glance() {
2567
- setTimeout(function () {
 
 
2568
  jQuery("#TB_window").animate({marginLeft: '-' + parseInt((780 / 2), 10) + 'px', width: '780px'}, 300);
2569
  jQuery("#TB_window iframe").animate({width: '780px'}, 300);
2570
  }, 15);
@@ -2572,7 +2594,8 @@ class YouTubePrefs
2572
 
2573
  (function ($j)
2574
  {
2575
- $j(document).ready(function () {
 
2576
 
2577
  $j.ajax({
2578
  type: "post",
@@ -2580,8 +2603,10 @@ class YouTubePrefs
2580
  timeout: 30000,
2581
  url: window._EPYTA_ ? window._EPYTA_.wpajaxurl : ajaxurl,
2582
  data: {action: 'my_embedplus_glance_count'},
2583
- success: function (response) {
2584
- if (response.type === "success") {
 
 
2585
  $j(response.container).append(response.data);
2586
  $j(".ytprefs_glance_button").click(widen_ytprefs_glance);
2587
  $j(window).resize(widen_ytprefs_glance);
@@ -2589,13 +2614,17 @@ class YouTubePrefs
2589
  {
2590
  //ep_do_pointers($j);
2591
  }
2592
- } else {
 
 
2593
  }
2594
  },
2595
- error: function (xhr, ajaxOptions, thrownError) {
 
2596
 
2597
  },
2598
- complete: function () {
 
2599
  }
2600
  });
2601
  });
@@ -2623,7 +2652,8 @@ class YouTubePrefs
2623
  edge: '<?php echo $array['edge']; ?>',
2624
  align: '<?php echo $array['align']; ?>'
2625
  },
2626
- close: function () {
 
2627
  $.post(window._EPYTA_ ? window._EPYTA_.wpajaxurl : ajaxurl, {
2628
  pointer: '<?php echo $pointer; ?>',
2629
  action: 'dismiss-wp-pointer'
@@ -2653,11 +2683,13 @@ class YouTubePrefs
2653
  $new_pointer_content .= '<p>'; // ooopointer
2654
  if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
2655
  {
2656
- $new_pointer_content .= __("This version updates the API key instructions and simplifies channel embedding for both Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions &raquo;</a>");
 
2657
  }
2658
  else
2659
  {
2660
- $new_pointer_content .= __("This version updates the API key instructions and simplifies channel embedding for both Free and and Pro versions. " . '<strong>Important message to YouTube Pro users</strong>: From version 11.7 onward, you must <a href="https://www.embedplus.com/youtube-pro/download/?prokey=' . esc_attr(self::$alloptions[self::$opt_pro]) . '" target="_blank">download the separate plugin here</a> to regain your Pro features. All your settings will automatically migrate after installing the separate Pro download. Thank you for your support and patience during this transition.');
 
2661
  }
2662
  $new_pointer_content .= '</p>';
2663
 
@@ -2748,6 +2780,21 @@ class YouTubePrefs
2748
  $new_options[self::$opt_gallery_collapse_grid] = self::postchecked(self::$opt_gallery_collapse_grid) ? 1 : 0;
2749
 
2750
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2751
  $_restrict_wizard_roles = self::$dft_roles;
2752
  try
2753
  {
@@ -2949,7 +2996,6 @@ class YouTubePrefs
2949
  <style type="text/css">
2950
  .wrap {font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif; color: #000000;}
2951
  #ytform p { line-height: 20px; margin-bottom: 11px; }
2952
- #ytform ul li {margin-left: 30px; list-style: disc outside none;}
2953
  .ytindent {padding: 0px 0px 0px 20px; font-size: 13px;}
2954
  .ytindent ul, .ytindent p {font-size: 13px;}
2955
  .shadow {-webkit-box-shadow: 0px 0px 20px 0px #000000; box-shadow: 0px 0px 20px 0px #000000;}
@@ -2965,7 +3011,7 @@ class YouTubePrefs
2965
  #goprobox {border-radius: 15px; padding: 10px 15px 15px 15px; margin-top: 15px; border: 3px solid #CCE5EC; position: relative;}
2966
  #nonprosupport {border-radius: 15px; padding: 10px 15px 20px 15px; border: 3px solid #ff6655;}
2967
  .pronon {font-weight: bold; color: #f85d00;}
2968
- ul.reglist li {margin: 0px 0px 0px 30px; list-style: disc outside none;}
2969
  .procol {width: 475px; float: left;}
2970
  .ytindent .procol ul {font-size: 12px;}
2971
  .smallnote, .ytindent .smallnote {font-style: italic; font-size: 11px;}
@@ -3028,7 +3074,7 @@ class YouTubePrefs
3028
  .apikey-msg {display: inline-block; width: 45%; vertical-align: top;}
3029
  .apikey-video{margin-left: 3%; display: inline-block; width: 50%; position: relative; padding-top: 29%}
3030
  .apikey-video iframe{display: block; width: 100%; height: 100%; position: absolute; top: 0; left: 0;}
3031
- #boxnocookie {display: inline-block; border-radius: 3px; padding: 2px 4px 2px 4px; color: red; background-color: yellow; font-weight: bold; <?php echo $all[self::$opt_nocookie] ? '' : 'display: none;' ?>}
3032
  .strike {text-decoration: line-through;}
3033
  .upgchecks { padding: 20px; border-radius: 15px; border: 1px dotted #777777; background-color: #fcfcfc; }
3034
  .clearboth {clear: both;}
@@ -3148,7 +3194,7 @@ class YouTubePrefs
3148
  </p>
3149
  <p>
3150
  <input name="<?php echo self::$opt_fs; ?>" id="<?php echo self::$opt_fs; ?>" <?php checked($all[self::$opt_fs], 1); ?> type="checkbox" class="checkbox">
3151
- <label for="<?php echo self::$opt_fs; ?>"><?php _e('<b class="chktitle">Show Fullscreen Button:</b> <sup class="orange">NEW</sup> Show the fullscreen button.') ?></label>
3152
  </p>
3153
  <p>
3154
  <input name="<?php echo self::$opt_acctitle; ?>" id="<?php echo self::$opt_acctitle; ?>" <?php checked($all[self::$opt_acctitle], 1); ?> type="checkbox" class="checkbox">
@@ -3200,11 +3246,11 @@ class YouTubePrefs
3200
  </p>
3201
  <p>
3202
  <input name="<?php echo self::$opt_nocookie; ?>" id="<?php echo self::$opt_nocookie; ?>" <?php checked($all[self::$opt_nocookie], 1); ?> type="checkbox" class="checkbox">
3203
- <span id="boxnocookie">
3204
- Uncheck this option if you are planning to embed galleries and playlists on your site. Furthermore, videos on mobile devices may have problems if you leave this checked.
3205
- </span>
3206
  <label for="<?php echo self::$opt_nocookie; ?>">
3207
  <b class="chktitle">No Cookies:</b> Prevent YouTube from leaving tracking cookies on your visitors browsers unless they actual play the videos. This is coded to apply this behavior on links in your past post as well. <b>NOTE: Research shows that YouTube's support of Do Not Track can be error-prone. </b>
 
 
 
3208
  </label>
3209
  </p>
3210
  <p>
@@ -3335,7 +3381,7 @@ class YouTubePrefs
3335
  <img class="sshidethumbimg" src="<?php echo plugins_url('images/sshidethumbimg.jpg', __FILE__) ?>" />
3336
  <input disabled type="checkbox" class="checkbox">
3337
  <label>
3338
- <b class="chktitle">Hide Thumbnail Images:</b> <span class="pronon">(PRO Users)</span> <sup class="orange">NEW</sup>
3339
  (For "Grid" and "Vertical List" gallery layouts only) Hide the image for each thumbnail, leaving just the text. This can improve performance when imagery is not important.
3340
  <a href="<?php echo self::$epbase ?>/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx" target="_blank">See an example here &raquo;</a>
3341
  </label>
@@ -3411,6 +3457,14 @@ class YouTubePrefs
3411
  With tens of thousands of active users, our plugin may not work with every plugin out there. Below are some settings you may wish to try out.
3412
  </p>
3413
  <div class="ytindent chx">
 
 
 
 
 
 
 
 
3414
  <p>
3415
  <input name="<?php echo self::$opt_old_script_method; ?>" id="<?php echo self::$opt_old_script_method; ?>" <?php checked($all[self::$opt_old_script_method], 1); ?> type="checkbox" class="checkbox">
3416
  <label for="<?php echo self::$opt_old_script_method; ?>">
@@ -3464,7 +3518,7 @@ class YouTubePrefs
3464
  <p>
3465
  <input name="<?php echo self::$opt_ajax_compat; ?>" id="<?php echo self::$opt_ajax_compat; ?>" <?php checked($all[self::$opt_ajax_compat], 1); ?> type="checkbox" class="checkbox">
3466
  <label for="<?php echo self::$opt_ajax_compat; ?>">
3467
- <b class="chktitle">Ajax Theme:</b> <sup class="orange">BETA</sup>
3468
  If you have a theme that loads pages with AJAX transitions, try checking this option.
3469
  </label>
3470
  </p>
@@ -3580,7 +3634,7 @@ class YouTubePrefs
3580
  </p>
3581
  <p>
3582
  <input name="<?php echo self::$opt_gallery_hideprivate; ?>" id="<?php echo self::$opt_gallery_hideprivate; ?>" <?php checked($all[self::$opt_gallery_hideprivate], 1); ?> type="checkbox" class="checkbox">
3583
- <label for="<?php echo self::$opt_gallery_hideprivate; ?>"><b class="chktitle">Hide Private Thumbnails:</b> <sup class="orange">NEW</sup> Hide thumbnails for videos in a playlist that cannot be embedded yet. Note: This may make some page sizes look uneven.</label>
3584
  </p>
3585
  <p>
3586
  <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">
@@ -3650,7 +3704,7 @@ class YouTubePrefs
3650
  <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 '&'.
3651
  <br><span class="orange">PRO users: You can use the big <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 codes.</span>
3652
  <?php
3653
- _e('<ul>');
3654
  _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>");
3655
  _e("<li><strong>height</strong> - Sets the height of your player. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA&width=500<strong>&height=350</strong></em> </li>");
3656
  _e("<li><strong>autoplay</strong> - Set this to 1 to autoplay the video (or 0 to play the video once). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&autoplay=1</strong></em> (Note: Desktop browsers like Chrome and Safari are moving towards preventing autoplay for any video. So this general feature may be deprecated by most browsers in the near future)</li>");
@@ -3669,7 +3723,7 @@ class YouTubePrefs
3669
  _e('</ul>');
3670
 
3671
  _e("<p>You can also start and end each individual video at particular times. Like the above, each option should begin with '&'</p>");
3672
- _e('<ul>');
3673
  _e("<li><strong>start</strong> - Sets the time (in seconds) to start the video. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350<strong>&start=20</strong></em> </li>");
3674
  _e("<li><strong>end</strong> - Sets the time (in seconds) to stop the video. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350<strong>&end=100</strong></em> </li>");
3675
  _e('</ul>');
@@ -3844,7 +3898,8 @@ class YouTubePrefs
3844
  if (jQuery("#<?php echo self::$opt_gallery_collapse_grid; ?>").is(":checked"))
3845
  {
3846
  var emptyStacks = [];
3847
- jQuery("#box_collapse_grid input").each(function () {
 
3848
  var val = jQuery(this).val();
3849
  if (jQuery.trim(val) === '' || !jQuery.isNumeric(val))
3850
  {
@@ -3879,13 +3934,15 @@ class YouTubePrefs
3879
  }
3880
 
3881
 
3882
- jQuery(document).ready(function ($) {
 
3883
  jQuery('#<?php echo self::$opt_defaultdims; ?>').change(function ()
3884
  {
3885
  if (jQuery(this).is(":checked"))
3886
  {
3887
  jQuery("#boxdefaultdims").show(500);
3888
- } else
 
3889
  {
3890
  jQuery("#boxdefaultdims").hide(500);
3891
  }
@@ -3896,7 +3953,8 @@ class YouTubePrefs
3896
  if (jQuery(this).is(":checked"))
3897
  {
3898
  jQuery("#boxcustomarrows").show(500);
3899
- } else
 
3900
  {
3901
  jQuery("#boxcustomarrows").hide(500);
3902
  }
@@ -3907,7 +3965,8 @@ class YouTubePrefs
3907
  if (jQuery(this).is(":checked"))
3908
  {
3909
  jQuery("#box_collapse_grid").show(500);
3910
- } else
 
3911
  {
3912
  jQuery("#box_collapse_grid").hide(500);
3913
  }
@@ -3917,7 +3976,8 @@ class YouTubePrefs
3917
  if (jQuery(this).is(":checked"))
3918
  {
3919
  jQuery("#box_restrict_wizard").show(500);
3920
- } else
 
3921
  {
3922
  jQuery("#box_restrict_wizard").hide(500);
3923
  }
@@ -3928,7 +3988,8 @@ class YouTubePrefs
3928
  if (jQuery(this).is(":checked"))
3929
  {
3930
  jQuery("#boxchannelsub").show(500);
3931
- } else
 
3932
  {
3933
  jQuery("#boxchannelsub").hide(500);
3934
  }
@@ -3939,7 +4000,8 @@ class YouTubePrefs
3939
  if (jQuery(this).is(":checked"))
3940
  {
3941
  jQuery("#boxresponsive_all").show(500);
3942
- } else
 
3943
  {
3944
  jQuery("#boxresponsive_all").hide(500);
3945
  }
@@ -3949,7 +4011,8 @@ class YouTubePrefs
3949
  if (jQuery(this).is(":checked"))
3950
  {
3951
  jQuery("#boxmigratelist").show(500);
3952
- } else
 
3953
  {
3954
  jQuery("#boxmigratelist").hide(500);
3955
  }
@@ -3959,7 +4022,8 @@ class YouTubePrefs
3959
  if (jQuery(this).is(":checked"))
3960
  {
3961
  jQuery("#boxnocookie").show(500);
3962
- } else
 
3963
  {
3964
  jQuery("#boxnocookie").hide(500);
3965
  }
@@ -3970,7 +4034,8 @@ class YouTubePrefs
3970
  if (jQuery(this).is(":checked"))
3971
  {
3972
  jQuery("#boxdefaultvol").show(500);
3973
- } else
 
3974
  {
3975
  jQuery("#boxdefaultvol").hide(500);
3976
  }
@@ -3982,13 +4047,15 @@ class YouTubePrefs
3982
  //canrange = false;
3983
  if (canrange)
3984
  {
3985
- $("input#vol").prop("type", "range").addClass("vol-range").on("input change", function () {
 
3986
  $('.vol-output').text($(this).val() > 0 ? $(this).val() + '%' : 'Mute');
3987
  });
3988
  $('.vol-output').css("display", "inline-block").text($("input#vol").val() > 0 ? $("input#vol").val() + '%' : 'Mute');
3989
  $('.vol-seeslider').show();
3990
  $('.vol-seetextbox').hide();
3991
- } else
 
3992
  {
3993
  $("input#vol").width(40);
3994
  }
@@ -4009,8 +4076,10 @@ class YouTubePrefs
4009
  $button_label = 'Changes Saved';
4010
  ?>
4011
  <script type="text/javascript">
4012
- jQuery(document).ready(function () {
4013
- setTimeout(function () {
 
 
4014
  jQuery('input.ytprefs-submit').val('Save Changes');
4015
  }, 3000);
4016
  });</script>
@@ -4030,7 +4099,7 @@ class YouTubePrefs
4030
  if (!($loggedin && self::$alloptions[self::$opt_admin_off_scripts]))
4031
  {
4032
  wp_enqueue_style(
4033
- '__EPYT__style', plugins_url('styles/ytprefs' . self::$min . '.css', __FILE__)
4034
  );
4035
  $cols = floatval(self::$alloptions[self::$opt_gallery_columns]);
4036
  $cols = $cols == 0 ? 3.0 : $cols;
@@ -4059,7 +4128,7 @@ class YouTubePrefs
4059
 
4060
  wp_add_inline_style('__EPYT__style', $custom_css);
4061
 
4062
- wp_enqueue_script('__ytprefs__', plugins_url('scripts/ytprefs' . self::$min . '.js', __FILE__), array('jquery'));
4063
 
4064
  if (self::$alloptions[self::$opt_old_script_method] != 1)
4065
  {
@@ -4073,6 +4142,7 @@ class YouTubePrefs
4073
  'version' => self::$alloptions[self::$opt_version],
4074
  'evselector' => self::get_evselector(),
4075
  'ajax_compat' => self::$alloptions[self::$opt_ajax_compat] == '1' ? true : false,
 
4076
  'stopMobileBuffer' => self::$alloptions[self::$opt_stop_mobile_buffer] == '1' ? true : false
4077
  );
4078
 
@@ -4134,7 +4204,7 @@ class YouTubePrefs
4134
 
4135
  public static function admin_enqueue_scripts($hook)
4136
  {
4137
- wp_enqueue_style('embedplusyoutube', plugins_url() . '/youtube-embed-plus/scripts/embedplus_mce' . self::$min . '.css');
4138
  wp_enqueue_script('__ytprefs_admin__', plugins_url('scripts/ytprefs-admin' . self::$min . '.js', __FILE__), array('jquery'), self::$version, false);
4139
  $admin_script_vars = array(
4140
  'wpajaxurl' => admin_url('admin-ajax.php'),
@@ -4168,9 +4238,9 @@ class YouTubePrefs
4168
 
4169
  if ($hook == self::$wizard_hook)
4170
  {
4171
- wp_enqueue_style('__ytprefs_admin__wizard_ui', plugins_url() . '/youtube-embed-plus/styles/jquery-ui' . self::$min . '.css');
4172
- wp_enqueue_style('__ytprefs_admin__wizard', plugins_url() . '/youtube-embed-plus/styles/ytprefs-wizard' . self::$min . '.css');
4173
- wp_enqueue_script('__ytprefs_admin__wizard_script', plugins_url('scripts/ytprefs-wizard' . self::$min . '.js', __FILE__), array('jquery-ui-accordion', 'jquery-ui-tabs'));
4174
  }
4175
  }
4176
 
3
  Plugin Name: YouTube
4
  Plugin URI: https://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx
5
  Description: YouTube Embed and YouTube Gallery WordPress Plugin. Embed a responsive video, YouTube channel, playlist gallery, or live stream
6
+ Version: 11.8.7
7
  Author: EmbedPlus Team
8
  Author URI: https://www.embedplus.com
9
  */
33
  {
34
 
35
  public static $curltimeout = 20;
36
+ public static $version = '11.8.7';
37
  public static $opt_version = 'version';
38
  public static $optembedwidth = null;
39
  public static $optembedheight = null;
74
  public static $opt_restrict_wizard = 'restrict_wizard';
75
  public static $opt_restrict_wizard_roles = 'restrict_wizard_roles';
76
  public static $opt_ajax_compat = 'ajax_compat';
77
+ public static $opt_ytapi_load = 'ytapi_load';
78
  public static $opt_defaultdims = 'defaultdims';
79
  public static $opt_defaultwidth = 'width';
80
  public static $opt_defaultheight = 'height';
728
  <div class="wiz-accordion">
729
  <h3 class="header-go"><a href="<?php echo admin_url('admin.php?page=youtube-my-preferences#jumpdefaults'); ?>">Check my general YouTube embedding instructions and settings. </a></h3>
730
  <div class="header-go-content"></div>
731
+ <h3 id="h3_video"> <a href="#">Embed a single video.</a></h3>
732
  <div>
733
  <h4 class="center">Single video directions</h4>
734
  <p>
747
  </form>
748
  <?php echo $step1_video_errors ? '<p class="orange bold">' . $step1_video_errors . '</p>' : ''; ?>
749
  </div>
750
+ <h3 id="h3_playlist"> <a href="#">Embed a playlist. </a></h3>
751
  <div>
752
  <h4 class="center">Playlist directions</h4>
753
  <div class="playlist-tabs">
787
  </form>
788
  <?php echo $step1_playlist_errors ? '<p class="orange bold">' . $step1_playlist_errors . '</p>' : ''; ?>
789
  </div>
790
+ <h3 id="h3_channel"> <a href="#">Embed a channel. </a></h3>
791
  <div>
792
  <h4 class="center">Channel directions</h4>
793
  <?php
820
  }
821
  ?>
822
  </div>
823
+ <h3 id="h3_live"> <a href="#">Embed a live stream. </a></h3>
824
  <div>
825
  <h4 class="center">Live stream directions (<a href="https://www.youtube.com/watch?v=dEQMTUke48E" target="_blank">Video tutorial here &raquo;</a>)</h4>
826
  <?php
852
  }
853
  ?>
854
  </div>
855
+ <h3 class="header-go"> <a href="<?php echo self::$epbase . '/dashboard/pro-easy-video-analytics.aspx'; ?>">Check my performance, blocked countries, deleted videos, etc. (PRO) </a></h3>
856
  <div class="header-go-content"></div>
857
  </div>
858
  <a id="lnkYthealth" class="ythealth imglink" href="<?php echo self::$epbase ?>/dashboard/pro-easy-video-analytics.aspx" target="_blank">
859
  <img src="<?php echo plugins_url('/images/ythealth.png', __FILE__) ?>">
860
  <div class="tip">
861
+ <span class=orange>(PRO)</span> Click to request an instant YouTube diagnostic report to see what (if any) important service problems that Google/YouTube may be having right now that might affect your embeds and playlists.
862
  </div>
863
  </a>
864
  <?php
1159
 
1160
  (function ($j)
1161
  {
1162
+ $j(document).ready(function ()
1163
+ {
1164
 
1165
 
1166
+ $j('.acctitle').click(function ()
1167
+ {
1168
  var $acctitle = $j(this);
1169
  var $accbox = $j(this).parent().children('.accbox');
1170
  var pid = $accbox.attr("data-postid");
1175
  timeout: 30000,
1176
  url: window._EPYTA_ ? window._EPYTA_.wpajaxurl : ajaxurl,
1177
  data: {action: 'my_embedplus_glance_vids', postid: pid},
1178
+ success: function (response)
1179
+ {
1180
+ if (response.type === "success")
1181
+ {
1182
  $accbox.html(response.data),
1183
  $accbox.show(400);
1184
+ }
1185
+ else
1186
+ {
1187
  }
1188
  },
1189
+ error: function (xhr, ajaxOptions, thrownError)
1190
+ {
1191
 
1192
  },
1193
+ complete: function ()
1194
+ {
1195
  $acctitle.children('.accloader').remove();
1196
  }
1197
 
1493
  </div>
1494
  <iframe allowTransparency="true" src="<?php echo self::$epbase . '/both-plugins-conflict.aspx' ?>" style="width:2px; height: 2px;" ></iframe>
1495
  <script type="text/javascript">
1496
+ (function ($)
1497
+ {
1498
+ $(document).ready(function ()
1499
+ {
1500
+ $('.epxout').click(function ()
1501
+ {
1502
  $.ajax({
1503
  type: "post",
1504
  dataType: "json",
1505
  timeout: 30000,
1506
  url: window._EPYTA_ ? window._EPYTA_.wpajaxurl : ajaxurl,
1507
  data: {action: 'my_embedplus_dismiss_double_plugin_warning'},
1508
+ success: function (response)
1509
+ {
1510
+ if (response.type === "success")
1511
+ {
1512
  $(".embedpluswarningbox").hide();
1513
  }
1514
  },
1515
+ error: function (xhr, ajaxOptions, thrownError)
1516
+ {
1517
  },
1518
+ complete: function ()
1519
+ {
1520
  }
1521
  });
1522
  });
1562
  epdovol: true,
1563
  evselector: '<?php echo self::get_evselector(); ?>',
1564
  ajax_compat: <?php echo self::$alloptions[self::$opt_ajax_compat] == '1' ? 'true' : 'false' ?>,
1565
+ ytapi_load: '<?php echo esc_attr(self::$alloptions[self::$opt_ytapi_load]) ?>',
1566
  stopMobileBuffer: <?php echo self::$alloptions[self::$opt_stop_mobile_buffer] == '1' ? 'true' : 'false' ?>
1567
  };</script>
1568
  <?php
1574
  $loggedin = current_user_can('edit_posts');
1575
  if (!($loggedin && self::$alloptions[self::$opt_admin_off_scripts]))
1576
  {
1577
+ wp_enqueue_script('__ytprefsfitvids__', plugins_url('scripts/fitvids' . self::$min . '.js', __FILE__), array('__ytprefs__'), self::$version, true);
1578
  }
1579
  }
1580
 
1624
  $_restrict_wizard = 0;
1625
  $_restrict_wizard_roles = self::$dft_roles;
1626
  $_ajax_compat = 0;
1627
+ $_ytapi_load = 'light';
1628
  $_defaultdims = 0;
1629
  $_defaultwidth = '';
1630
  $_defaultheight = '';
1689
  $_restrict_wizard = self::tryget($arroptions, self::$opt_restrict_wizard, 0);
1690
  $_restrict_wizard_roles = self::tryget($arroptions, self::$opt_restrict_wizard_roles, self::$dft_roles);
1691
  $_ajax_compat = self::tryget($arroptions, self::$opt_ajax_compat, 0);
1692
+ $_ytapi_load = self::tryget($arroptions, self::$opt_ytapi_load, $_ytapi_load);
1693
  $_defaultdims = self::tryget($arroptions, self::$opt_defaultdims, 0);
1694
  $_defaultwidth = self::tryget($arroptions, self::$opt_defaultwidth, '');
1695
  $_defaultheight = self::tryget($arroptions, self::$opt_defaultheight, '');
1758
  self::$opt_restrict_wizard => $_restrict_wizard,
1759
  self::$opt_restrict_wizard_roles => $_restrict_wizard_roles,
1760
  self::$opt_ajax_compat => $_ajax_compat,
1761
+ self::$opt_ytapi_load => $_ytapi_load,
1762
  self::$opt_defaultdims => $_defaultdims,
1763
  self::$opt_defaultwidth => $_defaultwidth,
1764
  self::$opt_defaultheight => $_defaultheight,
2583
  add_thickbox();
2584
  ?>
2585
  <script type="text/javascript">
2586
+ function widen_ytprefs_glance()
2587
+ {
2588
+ setTimeout(function ()
2589
+ {
2590
  jQuery("#TB_window").animate({marginLeft: '-' + parseInt((780 / 2), 10) + 'px', width: '780px'}, 300);
2591
  jQuery("#TB_window iframe").animate({width: '780px'}, 300);
2592
  }, 15);
2594
 
2595
  (function ($j)
2596
  {
2597
+ $j(document).ready(function ()
2598
+ {
2599
 
2600
  $j.ajax({
2601
  type: "post",
2603
  timeout: 30000,
2604
  url: window._EPYTA_ ? window._EPYTA_.wpajaxurl : ajaxurl,
2605
  data: {action: 'my_embedplus_glance_count'},
2606
+ success: function (response)
2607
+ {
2608
+ if (response.type === "success")
2609
+ {
2610
  $j(response.container).append(response.data);
2611
  $j(".ytprefs_glance_button").click(widen_ytprefs_glance);
2612
  $j(window).resize(widen_ytprefs_glance);
2614
  {
2615
  //ep_do_pointers($j);
2616
  }
2617
+ }
2618
+ else
2619
+ {
2620
  }
2621
  },
2622
+ error: function (xhr, ajaxOptions, thrownError)
2623
+ {
2624
 
2625
  },
2626
+ complete: function ()
2627
+ {
2628
  }
2629
  });
2630
  });
2652
  edge: '<?php echo $array['edge']; ?>',
2653
  align: '<?php echo $array['align']; ?>'
2654
  },
2655
+ close: function ()
2656
+ {
2657
  $.post(window._EPYTA_ ? window._EPYTA_.wpajaxurl : ajaxurl, {
2658
  pointer: '<?php echo $pointer; ?>',
2659
  action: 'dismiss-wp-pointer'
2683
  $new_pointer_content .= '<p>'; // ooopointer
2684
  if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
2685
  {
2686
+ //$new_pointer_content .= __("This version updates the API key instructions and simplifies channel embedding for both Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions &raquo;</a>");
2687
+ $new_pointer_content .= __("This version improves GDPR compliance by allowing you to choose when YouTube.com\'s API is loaded, for both Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions &raquo;</a> (see <em>Compatibility</em> section).");
2688
  }
2689
  else
2690
  {
2691
+ //$new_pointer_content .= __("This version updates the API key instructions and simplifies channel embedding for both Free and and Pro versions. " . '<strong>Important message to YouTube Pro users</strong>: From version 11.7 onward, you must <a href="https://www.embedplus.com/youtube-pro/download/?prokey=' . esc_attr(self::$alloptions[self::$opt_pro]) . '" target="_blank">download the separate plugin here</a> to regain your Pro features. All your settings will automatically migrate after installing the separate Pro download. Thank you for your support and patience during this transition.');
2692
+ $new_pointer_content .= __("This version improves GDPR compliance by allowing you to choose when YouTube.com\'s API is loaded, for both Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions &raquo;</a> (see <em>Compatibility</em> section). " . '<strong>Important message to YouTube Pro users</strong>: From version 11.7 onward, you must <a href="https://www.embedplus.com/youtube-pro/download/?prokey=' . esc_attr(self::$alloptions[self::$opt_pro]) . '" target="_blank">download the separate plugin here</a> to regain your Pro features. All your settings will automatically migrate after installing the separate Pro download. Thank you for your support and patience during this transition.');
2693
  }
2694
  $new_pointer_content .= '</p>';
2695
 
2780
  $new_options[self::$opt_gallery_collapse_grid] = self::postchecked(self::$opt_gallery_collapse_grid) ? 1 : 0;
2781
 
2782
 
2783
+ $_ytapi_load = 'light';
2784
+ try
2785
+ {
2786
+ $_ytapi_load_temp = $_POST[self::$opt_ytapi_load];
2787
+ if (in_array($_ytapi_load_temp, array('always', 'light', 'never')))
2788
+ {
2789
+ $_ytapi_load = $_ytapi_load_temp;
2790
+ }
2791
+ }
2792
+ catch (Exception $ex)
2793
+ {
2794
+
2795
+ }
2796
+ $new_options[self::$opt_ytapi_load] = $_ytapi_load;
2797
+
2798
  $_restrict_wizard_roles = self::$dft_roles;
2799
  try
2800
  {
2996
  <style type="text/css">
2997
  .wrap {font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif; color: #000000;}
2998
  #ytform p { line-height: 20px; margin-bottom: 11px; }
 
2999
  .ytindent {padding: 0px 0px 0px 20px; font-size: 13px;}
3000
  .ytindent ul, .ytindent p {font-size: 13px;}
3001
  .shadow {-webkit-box-shadow: 0px 0px 20px 0px #000000; box-shadow: 0px 0px 20px 0px #000000;}
3011
  #goprobox {border-radius: 15px; padding: 10px 15px 15px 15px; margin-top: 15px; border: 3px solid #CCE5EC; position: relative;}
3012
  #nonprosupport {border-radius: 15px; padding: 10px 15px 20px 15px; border: 3px solid #ff6655;}
3013
  .pronon {font-weight: bold; color: #f85d00;}
3014
+ ul.reglist li {margin-left: 30px; list-style: disc outside none;}
3015
  .procol {width: 475px; float: left;}
3016
  .ytindent .procol ul {font-size: 12px;}
3017
  .smallnote, .ytindent .smallnote {font-style: italic; font-size: 11px;}
3074
  .apikey-msg {display: inline-block; width: 45%; vertical-align: top;}
3075
  .apikey-video{margin-left: 3%; display: inline-block; width: 50%; position: relative; padding-top: 29%}
3076
  .apikey-video iframe{display: block; width: 100%; height: 100%; position: absolute; top: 0; left: 0;}
3077
+ #boxnocookie {display: inline-block; border-radius: 3px; padding: 2px 4px 2px 4px; color: red; font-weight: bold; <?php echo $all[self::$opt_nocookie] ? '' : 'display: none;' ?>}
3078
  .strike {text-decoration: line-through;}
3079
  .upgchecks { padding: 20px; border-radius: 15px; border: 1px dotted #777777; background-color: #fcfcfc; }
3080
  .clearboth {clear: both;}
3194
  </p>
3195
  <p>
3196
  <input name="<?php echo self::$opt_fs; ?>" id="<?php echo self::$opt_fs; ?>" <?php checked($all[self::$opt_fs], 1); ?> type="checkbox" class="checkbox">
3197
+ <label for="<?php echo self::$opt_fs; ?>"><?php _e('<b class="chktitle">Show Fullscreen Button:</b> Show the fullscreen button.') ?></label>
3198
  </p>
3199
  <p>
3200
  <input name="<?php echo self::$opt_acctitle; ?>" id="<?php echo self::$opt_acctitle; ?>" <?php checked($all[self::$opt_acctitle], 1); ?> type="checkbox" class="checkbox">
3246
  </p>
3247
  <p>
3248
  <input name="<?php echo self::$opt_nocookie; ?>" id="<?php echo self::$opt_nocookie; ?>" <?php checked($all[self::$opt_nocookie], 1); ?> type="checkbox" class="checkbox">
 
 
 
3249
  <label for="<?php echo self::$opt_nocookie; ?>">
3250
  <b class="chktitle">No Cookies:</b> Prevent YouTube from leaving tracking cookies on your visitors browsers unless they actual play the videos. This is coded to apply this behavior on links in your past post as well. <b>NOTE: Research shows that YouTube's support of Do Not Track can be error-prone. </b>
3251
+ <span id="boxnocookie">
3252
+ You may have issues with this option if you are planning to embed galleries and playlists on your site. Furthermore, videos on mobile devices may have problems if you leave this checked.
3253
+ </span>
3254
  </label>
3255
  </p>
3256
  <p>
3381
  <img class="sshidethumbimg" src="<?php echo plugins_url('images/sshidethumbimg.jpg', __FILE__) ?>" />
3382
  <input disabled type="checkbox" class="checkbox">
3383
  <label>
3384
+ <b class="chktitle">Hide Thumbnail Images:</b> <span class="pronon">(PRO Users)</span>
3385
  (For "Grid" and "Vertical List" gallery layouts only) Hide the image for each thumbnail, leaving just the text. This can improve performance when imagery is not important.
3386
  <a href="<?php echo self::$epbase ?>/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx" target="_blank">See an example here &raquo;</a>
3387
  </label>
3457
  With tens of thousands of active users, our plugin may not work with every plugin out there. Below are some settings you may wish to try out.
3458
  </p>
3459
  <div class="ytindent chx">
3460
+ <p>
3461
+ <b class="chktitle">YouTube API Loading:</b> <sup class="orange">NEW</sup> Choose when to load the YouTube API. The "Restricted" or "Never" options will help with GDPR compliance:
3462
+ <ul class="indent-option">
3463
+ <li><label><input type="radio" name="<?php echo self::$opt_ytapi_load ?>" value="light" <?php checked($all[self::$opt_ytapi_load], 'light'); ?> /> <em>Restricted</em> - (Recommended) Only load the API on pages that have a YouTube video.</label></li>
3464
+ <li><label><input type="radio" name="<?php echo self::$opt_ytapi_load ?>" value="never" <?php checked($all[self::$opt_ytapi_load], 'never'); ?> /> <em>Never</em> - Do not load the YouTube API. Note: The "Never" choice may break features such as Volume Initialization and Gallery Continuous Play.</label></li>
3465
+ <li><label><input type="radio" name="<?php echo self::$opt_ytapi_load ?>" value="always" <?php checked($all[self::$opt_ytapi_load], 'always'); ?> /> <em>Always</em> - Load the API on all pages. In most cases, the "Always" choice is not necessary.</label></li>
3466
+ </ul>
3467
+ </p>
3468
  <p>
3469
  <input name="<?php echo self::$opt_old_script_method; ?>" id="<?php echo self::$opt_old_script_method; ?>" <?php checked($all[self::$opt_old_script_method], 1); ?> type="checkbox" class="checkbox">
3470
  <label for="<?php echo self::$opt_old_script_method; ?>">
3518
  <p>
3519
  <input name="<?php echo self::$opt_ajax_compat; ?>" id="<?php echo self::$opt_ajax_compat; ?>" <?php checked($all[self::$opt_ajax_compat], 1); ?> type="checkbox" class="checkbox">
3520
  <label for="<?php echo self::$opt_ajax_compat; ?>">
3521
+ <b class="chktitle">Ajax Theme:</b>
3522
  If you have a theme that loads pages with AJAX transitions, try checking this option.
3523
  </label>
3524
  </p>
3634
  </p>
3635
  <p>
3636
  <input name="<?php echo self::$opt_gallery_hideprivate; ?>" id="<?php echo self::$opt_gallery_hideprivate; ?>" <?php checked($all[self::$opt_gallery_hideprivate], 1); ?> type="checkbox" class="checkbox">
3637
+ <label for="<?php echo self::$opt_gallery_hideprivate; ?>"><b class="chktitle">Hide Private Thumbnails:</b> Hide thumbnails for videos in a playlist that cannot be embedded yet. Note: This may make some page sizes look uneven.</label>
3638
  </p>
3639
  <p>
3640
  <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">
3704
  <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 '&'.
3705
  <br><span class="orange">PRO users: You can use the big <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 codes.</span>
3706
  <?php
3707
+ _e('<ul class="reglist">');
3708
  _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>");
3709
  _e("<li><strong>height</strong> - Sets the height of your player. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA&width=500<strong>&height=350</strong></em> </li>");
3710
  _e("<li><strong>autoplay</strong> - Set this to 1 to autoplay the video (or 0 to play the video once). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&autoplay=1</strong></em> (Note: Desktop browsers like Chrome and Safari are moving towards preventing autoplay for any video. So this general feature may be deprecated by most browsers in the near future)</li>");
3723
  _e('</ul>');
3724
 
3725
  _e("<p>You can also start and end each individual video at particular times. Like the above, each option should begin with '&'</p>");
3726
+ _e('<ul class="reglist">');
3727
  _e("<li><strong>start</strong> - Sets the time (in seconds) to start the video. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350<strong>&start=20</strong></em> </li>");
3728
  _e("<li><strong>end</strong> - Sets the time (in seconds) to stop the video. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350<strong>&end=100</strong></em> </li>");
3729
  _e('</ul>');
3898
  if (jQuery("#<?php echo self::$opt_gallery_collapse_grid; ?>").is(":checked"))
3899
  {
3900
  var emptyStacks = [];
3901
+ jQuery("#box_collapse_grid input").each(function ()
3902
+ {
3903
  var val = jQuery(this).val();
3904
  if (jQuery.trim(val) === '' || !jQuery.isNumeric(val))
3905
  {
3934
  }
3935
 
3936
 
3937
+ jQuery(document).ready(function ($)
3938
+ {
3939
  jQuery('#<?php echo self::$opt_defaultdims; ?>').change(function ()
3940
  {
3941
  if (jQuery(this).is(":checked"))
3942
  {
3943
  jQuery("#boxdefaultdims").show(500);
3944
+ }
3945
+ else
3946
  {
3947
  jQuery("#boxdefaultdims").hide(500);
3948
  }
3953
  if (jQuery(this).is(":checked"))
3954
  {
3955
  jQuery("#boxcustomarrows").show(500);
3956
+ }
3957
+ else
3958
  {
3959
  jQuery("#boxcustomarrows").hide(500);
3960
  }
3965
  if (jQuery(this).is(":checked"))
3966
  {
3967
  jQuery("#box_collapse_grid").show(500);
3968
+ }
3969
+ else
3970
  {
3971
  jQuery("#box_collapse_grid").hide(500);
3972
  }
3976
  if (jQuery(this).is(":checked"))
3977
  {
3978
  jQuery("#box_restrict_wizard").show(500);
3979
+ }
3980
+ else
3981
  {
3982
  jQuery("#box_restrict_wizard").hide(500);
3983
  }
3988
  if (jQuery(this).is(":checked"))
3989
  {
3990
  jQuery("#boxchannelsub").show(500);
3991
+ }
3992
+ else
3993
  {
3994
  jQuery("#boxchannelsub").hide(500);
3995
  }
4000
  if (jQuery(this).is(":checked"))
4001
  {
4002
  jQuery("#boxresponsive_all").show(500);
4003
+ }
4004
+ else
4005
  {
4006
  jQuery("#boxresponsive_all").hide(500);
4007
  }
4011
  if (jQuery(this).is(":checked"))
4012
  {
4013
  jQuery("#boxmigratelist").show(500);
4014
+ }
4015
+ else
4016
  {
4017
  jQuery("#boxmigratelist").hide(500);
4018
  }
4022
  if (jQuery(this).is(":checked"))
4023
  {
4024
  jQuery("#boxnocookie").show(500);
4025
+ }
4026
+ else
4027
  {
4028
  jQuery("#boxnocookie").hide(500);
4029
  }
4034
  if (jQuery(this).is(":checked"))
4035
  {
4036
  jQuery("#boxdefaultvol").show(500);
4037
+ }
4038
+ else
4039
  {
4040
  jQuery("#boxdefaultvol").hide(500);
4041
  }
4047
  //canrange = false;
4048
  if (canrange)
4049
  {
4050
+ $("input#vol").prop("type", "range").addClass("vol-range").on("input change", function ()
4051
+ {
4052
  $('.vol-output').text($(this).val() > 0 ? $(this).val() + '%' : 'Mute');
4053
  });
4054
  $('.vol-output').css("display", "inline-block").text($("input#vol").val() > 0 ? $("input#vol").val() + '%' : 'Mute');
4055
  $('.vol-seeslider').show();
4056
  $('.vol-seetextbox').hide();
4057
+ }
4058
+ else
4059
  {
4060
  $("input#vol").width(40);
4061
  }
4076
  $button_label = 'Changes Saved';
4077
  ?>
4078
  <script type="text/javascript">
4079
+ jQuery(document).ready(function ()
4080
+ {
4081
+ setTimeout(function ()
4082
+ {
4083
  jQuery('input.ytprefs-submit').val('Save Changes');
4084
  }, 3000);
4085
  });</script>
4099
  if (!($loggedin && self::$alloptions[self::$opt_admin_off_scripts]))
4100
  {
4101
  wp_enqueue_style(
4102
+ '__EPYT__style', plugins_url('styles/ytprefs' . self::$min . '.css', __FILE__), array(), self::$version
4103
  );
4104
  $cols = floatval(self::$alloptions[self::$opt_gallery_columns]);
4105
  $cols = $cols == 0 ? 3.0 : $cols;
4128
 
4129
  wp_add_inline_style('__EPYT__style', $custom_css);
4130
 
4131
+ wp_enqueue_script('__ytprefs__', plugins_url('scripts/ytprefs' . self::$min . '.js', __FILE__), array('jquery'), self::$version);
4132
 
4133
  if (self::$alloptions[self::$opt_old_script_method] != 1)
4134
  {
4142
  'version' => self::$alloptions[self::$opt_version],
4143
  'evselector' => self::get_evselector(),
4144
  'ajax_compat' => self::$alloptions[self::$opt_ajax_compat] == '1' ? true : false,
4145
+ 'ytapi_load' => self::$alloptions[self::$opt_ytapi_load],
4146
  'stopMobileBuffer' => self::$alloptions[self::$opt_stop_mobile_buffer] == '1' ? true : false
4147
  );
4148
 
4204
 
4205
  public static function admin_enqueue_scripts($hook)
4206
  {
4207
+ wp_enqueue_style('embedplusyoutube', plugins_url() . '/youtube-embed-plus/scripts/embedplus_mce' . self::$min . '.css', array(), self::$version);
4208
  wp_enqueue_script('__ytprefs_admin__', plugins_url('scripts/ytprefs-admin' . self::$min . '.js', __FILE__), array('jquery'), self::$version, false);
4209
  $admin_script_vars = array(
4210
  'wpajaxurl' => admin_url('admin-ajax.php'),
4238
 
4239
  if ($hook == self::$wizard_hook)
4240
  {
4241
+ wp_enqueue_style('__ytprefs_admin__wizard_ui', plugins_url() . '/youtube-embed-plus/styles/jquery-ui' . self::$min . '.css', array(), self::$version);
4242
+ wp_enqueue_style('__ytprefs_admin__wizard', plugins_url() . '/youtube-embed-plus/styles/ytprefs-wizard' . self::$min . '.css', array(), self::$version);
4243
+ wp_enqueue_script('__ytprefs_admin__wizard_script', plugins_url('scripts/ytprefs-wizard' . self::$min . '.js', __FILE__), array('jquery-ui-accordion', 'jquery-ui-tabs'), self::$version);
4244
  }
4245
  }
4246