YouTube - Version 13.1.2.4

Version Description

Download this release

Release Info

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

Code changes from version 13.1.2.3 to 13.1.2.4

includes/vi/vi_admin_menu.php CHANGED
@@ -3,13 +3,4 @@
3
  if (self::vi_logged_in())
4
  {
5
  self::$admin_page_hooks[] = add_submenu_page('youtube-my-preferences', 'Monetize With vi', '<img style="width: 16px; height: 16px; vertical-align: text-top;" src="' . plugins_url(self::$folder_name . '/images/icon-monetize.svg') . '" />&nbsp;&nbsp;Monetize', 'manage_options', 'youtube-ep-vi', array(get_class(), 'vi_admin_dashboard'));
6
- }
7
- else if (!(bool) (self::$alloptions[self::$opt_vi_hide_monetize_tab]) || self::vi_script_setup_done())
8
- {
9
- $page_parent = null;
10
- if (filter_input(INPUT_GET, 'page') == 'youtube-ep-vi' || self::vi_script_setup_done())
11
- {
12
- $page_parent = 'youtube-my-preferences';
13
- }
14
- self::$admin_page_hooks[] = add_submenu_page($page_parent, 'Monetize With vi', '<img style="width: 16px; height: 16px; vertical-align: text-top;" src="' . plugins_url(self::$folder_name . '/images/icon-monetize.svg') . '" />&nbsp;&nbsp;Monetize', 'manage_options', 'youtube-ep-vi', array(get_class(), 'vi_admin_dashboard_pre'));
15
- }
3
  if (self::vi_logged_in())
4
  {
5
  self::$admin_page_hooks[] = add_submenu_page('youtube-my-preferences', 'Monetize With vi', '<img style="width: 16px; height: 16px; vertical-align: text-top;" src="' . plugins_url(self::$folder_name . '/images/icon-monetize.svg') . '" />&nbsp;&nbsp;Monetize', 'manage_options', 'youtube-ep-vi', array(get_class(), 'vi_admin_dashboard'));
6
+ }
 
 
 
 
 
 
 
 
 
includes/vi/vi_registration_form.php CHANGED
@@ -30,6 +30,9 @@
30
  </div>
31
  <div class="vi-demo-col-content">
32
  <div class="vi-demo">
 
 
 
33
  <?php
34
  $multiCatWarning = '';
35
  if (!empty(self::$alloptions[self::$opt_vi_js_settings]['iabCategory']))
@@ -81,11 +84,11 @@
81
  <h2>Earn 10x higher CPMs</h2>
82
  <p class="description">Where should we send your welcome and revenue info?</p>
83
  <p>
84
- <input class="textinput regular-text ytvi-register-email" type="text" placeholder="Your email" />
85
  </p>
86
  <p class="description">
87
  <label>
88
- <input type="checkbox" class="ytvi-step-1--confirm"/>
89
  I understand that vi will create my account using my email, my domain, and EmbedPlus as the referral.
90
  </label>
91
  </p>
@@ -162,21 +165,17 @@
162
  </div>
163
  </div>
164
  <?php
165
- if (!self::vi_cover_prompt_yes())
166
  {
167
  ?>
168
  <div class="clearboth vi-cover-clear"></div>
169
  <div class="vi-cover-prompt">
170
  <h1>
171
- Hey! We have a new optional feature to help you earn income by embedding relevant video content that offers you up to 10x higher CPMs than display advertising.
172
- <br>
173
- <br>
174
- Are you interested in learning more about this free feature?
175
  </h1>
176
  <p class="vi-cover-prompt-buttons">
177
- <button type="button" class="button-primary vi-cover-prompt-yes">Yes, tell me more.</button>
178
- <button type="button" class="button-secondary vi-cover-prompt-maybe">Maybe later.</button>
179
- <button type="button" class="button-secondary vi-cover-prompt-no">No, hide this feature.</button>
180
  </p>
181
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" class="viblurfilter-svg">
182
  <defs>
30
  </div>
31
  <div class="vi-demo-col-content">
32
  <div class="vi-demo">
33
+ <div class="login-expire">
34
+ Note: The vi feature is being deprecated in the next version.<br>Please contact ext@embedplus.com for questions.
35
+ </div>
36
  <?php
37
  $multiCatWarning = '';
38
  if (!empty(self::$alloptions[self::$opt_vi_js_settings]['iabCategory']))
84
  <h2>Earn 10x higher CPMs</h2>
85
  <p class="description">Where should we send your welcome and revenue info?</p>
86
  <p>
87
+ <input disabled class="textinput regular-text ytvi-register-email" type="text" placeholder="Your email" />
88
  </p>
89
  <p class="description">
90
  <label>
91
+ <input disabled type="checkbox" class="ytvi-step-1--confirm"/>
92
  I understand that vi will create my account using my email, my domain, and EmbedPlus as the referral.
93
  </label>
94
  </p>
165
  </div>
166
  </div>
167
  <?php
168
+ if (true) //!self::vi_cover_prompt_yes())
169
  {
170
  ?>
171
  <div class="clearboth vi-cover-clear"></div>
172
  <div class="vi-cover-prompt">
173
  <h1>
174
+ Note: The vi feature is being deprecated in the next version.<br>Please contact ext@embedplus.com for questions.
 
 
 
175
  </h1>
176
  <p class="vi-cover-prompt-buttons">
177
+ <button type="button" class="button-primary vi-cover-prompt-yes">Close</button>
178
+ <button type="button" class="button-secondary vi-cover-prompt-no">Hide this feature</button>
 
179
  </p>
180
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" class="viblurfilter-svg">
181
  <defs>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Embed Plus for YouTube - Gallery, Channel, Playlist, Live Stream
4
  Tags: youtube gallery, video gallery, youtube channel, youtube live, live stream
5
  Requires at least: 4.0
6
  Tested up to: 5.3
7
- Stable tag: 13.1.2.3
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 (with GDPR options)
@@ -13,7 +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
- * Compatible with the WordPress 5.0 Gutenberg block editor (it also stays backwards-compatible with the classic editor). Both the Gutenberg block selector and the Gutenberg classic block will show the YouTube wizard button. For the Gutenberg block selector, click on the (+) sign for the block editor list. The YouTube Wizard block is located under the "Embeds" category (make sure you choose "YouTube **Wizard**"). See more on [how to embed a YouTube video, gallery, or livestream with the WordPress Gutenberg block editor here >>](https://www.embedplus.com/embed-youtube-video-gallery-livestream-wordpress-gutenberg-block-editor.aspx)
17
  * Privacy and Consent - Improved privacy and GDPR compliance options like YouTube no cookie, YouTube API restrictions, and a customizable GDPR consent message
18
  * 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.
19
  * 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
@@ -147,6 +147,11 @@ You can also start and end each individual video at particular times. Like the a
147
 
148
  == Changelog ==
149
 
 
 
 
 
 
150
  = Embed Plus for YouTube WordPress Plugin 13.1.2.3 =
151
  * gallery thumbnail mobile tap/scroll fix
152
 
4
  Tags: youtube gallery, video gallery, youtube channel, youtube live, live stream
5
  Requires at least: 4.0
6
  Tested up to: 5.3
7
+ Stable tag: 13.1.2.4
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 (with GDPR options)
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
+ * Compatible with the WordPress 5.0+ Gutenberg block editor (it also stays backwards-compatible with the classic editor). Both the Gutenberg block selector and the Gutenberg classic block will show the YouTube wizard button. For the Gutenberg block selector, click on the (+) sign for the block editor list. The YouTube Wizard block is located under the "Embeds" category (make sure you choose "YouTube **Wizard**"). See more on [how to embed a YouTube video, gallery, or livestream with the WordPress Gutenberg block editor here >>](https://www.embedplus.com/embed-youtube-video-gallery-livestream-wordpress-gutenberg-block-editor.aspx)
17
  * Privacy and Consent - Improved privacy and GDPR compliance options like YouTube no cookie, YouTube API restrictions, and a customizable GDPR consent message
18
  * 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.
19
  * 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
147
 
148
  == Changelog ==
149
 
150
+ = Embed Plus for YouTube WordPress Plugin 13.1.2.4 =
151
+ * Pagination and autonext allow the current video to play
152
+ * Pagination on mobile fix
153
+ * vi deprecation announcement
154
+
155
  = Embed Plus for YouTube WordPress Plugin 13.1.2.3 =
156
  * gallery thumbnail mobile tap/scroll fix
157
 
scripts/ytprefs.js CHANGED
@@ -269,48 +269,51 @@
269
  {
270
  $iframe.data('ep-gallerysrc', '');
271
  }
272
- $container.on('click touchend', '.epyt-gallery-list .epyt-gallery-thumb', function ()
273
  {
274
  if (window._EPYT_.touchmoved)
275
  {
276
  return;
277
  }
278
- $container.find('.epyt-gallery-list .epyt-gallery-thumb').removeClass('epyt-current-video');
279
- $(this).addClass('epyt-current-video');
280
- var vid = $(this).data('videoid');
281
- $container.data('currvid', vid);
282
- var vidSrc = $iframe.data('ep-gallerysrc').replace('GALLERYVIDEOID', vid);
283
-
284
- var thumbplay = $container.find('.epyt-pagebutton').first().data('thumbplay');
285
- if (thumbplay !== '0' && thumbplay !== 0)
286
  {
287
- if (vidSrc.indexOf('autoplay') > 0)
 
 
 
 
 
 
 
288
  {
289
- vidSrc = vidSrc.replace('autoplay=0', 'autoplay=1');
 
 
 
 
 
 
 
 
 
290
  }
291
- else
 
 
 
 
292
  {
293
- vidSrc += '&autoplay=1';
 
 
 
 
 
294
  }
295
-
296
- $iframe.addClass('epyt-thumbplay');
297
- }
298
-
299
- // https://github.com/jquery/jquery-ui/blob/master/ui/scroll-parent.js
300
- var bodyScrollTop = Math.max($('body').scrollTop(), $('html').scrollTop());
301
- var scrollNext = $iframe.offset().top - parseInt(_EPYT_.gallery_scrolloffset);
302
- if (bodyScrollTop > scrollNext)
303
- {
304
- $('html, body').animate({
305
- scrollTop: scrollNext
306
- }, 500, function ()
307
  {
308
  window._EPADashboard_.setVidSrc($iframe, vidSrc);
309
- });
310
- }
311
- else
312
- {
313
- window._EPADashboard_.setVidSrc($iframe, vidSrc);
314
  }
315
 
316
  }).on('touchmove', function (e)
@@ -340,71 +343,74 @@
340
  $(this).removeClass('hover');
341
  });
342
 
343
- $container.on('click touchend', '.epyt-pagebutton', function ()
344
  {
345
  if (window._EPYT_.touchmoved)
346
  {
347
  return;
348
  }
349
- var pageData = {
350
- action: 'my_embedplus_gallery_page',
351
- security: _EPYT_.security,
352
- options: {
353
- playlistId: $(this).data('playlistid'),
354
- pageToken: $(this).data('pagetoken'),
355
- pageSize: $(this).data('pagesize'),
356
- columns: $(this).data('epcolumns'),
357
- showTitle: $(this).data('showtitle'),
358
- showPaging: $(this).data('showpaging'),
359
- autonext: $(this).data('autonext'),
360
- thumbplay: $(this).data('thumbplay')
361
- }
362
- };
363
-
364
- var forward = $(this).hasClass('epyt-next');
365
- var currpage = parseInt($container.data('currpage') + "");
366
- currpage += forward ? 1 : -1;
367
- $container.data('currpage', currpage);
368
- $container.find('.epyt-gallery-list').addClass('epyt-loading');
369
-
370
- $.post(_EPYT_.ajaxurl, pageData, function (response)
371
  {
372
- $container.find('.epyt-gallery-list').html(response);
373
- $container.find('.epyt-current').each(function ()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
374
  {
375
- $(this).text($container.data('currpage'));
376
- });
377
- $container.find('.epyt-gallery-thumb[data-videoid="' + $container.data('currvid') + '"]').addClass('epyt-current-video');
378
-
379
- if ($container.find('.epyt-pagebutton').first().data('autonext') == '1')
380
- {
381
- $container.find('.epyt-gallery-thumb').first().click();
382
- }
383
-
384
- })
385
- .fail(function ()
386
  {
387
- alert('Sorry, there was an error loading the next page.');
388
- })
389
- .always(function ()
 
 
390
  {
391
- $container.find('.epyt-gallery-list').removeClass('epyt-loading');
 
392
 
393
- if ($container.find('.epyt-pagebutton').first().data('autonext') != '1')
 
394
  {
395
- // https://github.com/jquery/jquery-ui/blob/master/ui/scroll-parent.js
396
- var bodyScrollTop = Math.max($('body').scrollTop(), $('html').scrollTop());
397
- var scrollNext = $container.find('.epyt-gallery-list').offset().top - parseInt(_EPYT_.gallery_scrolloffset);
398
- if (bodyScrollTop > scrollNext)
 
 
 
399
  {
400
- $('html, body').animate({
401
- scrollTop: scrollNext
402
- }, 500);
 
 
 
 
 
 
403
  }
404
- }
405
-
406
- });
407
 
 
 
408
  }).on('touchmove', function (e)
409
  {
410
  window._EPYT_.touchmoved = true;
269
  {
270
  $iframe.data('ep-gallerysrc', '');
271
  }
272
+ $container.on('click touchend', '.epyt-gallery-list .epyt-gallery-thumb', function (e)
273
  {
274
  if (window._EPYT_.touchmoved)
275
  {
276
  return;
277
  }
278
+ if (!$(this).hasClass('epyt-current-video'))
 
 
 
 
 
 
 
279
  {
280
+ $container.find('.epyt-gallery-list .epyt-gallery-thumb').removeClass('epyt-current-video');
281
+ $(this).addClass('epyt-current-video');
282
+ var vid = $(this).data('videoid');
283
+ $container.data('currvid', vid);
284
+ var vidSrc = $iframe.data('ep-gallerysrc').replace('GALLERYVIDEOID', vid);
285
+
286
+ var thumbplay = $container.find('.epyt-pagebutton').first().data('thumbplay');
287
+ if (thumbplay !== '0' && thumbplay !== 0)
288
  {
289
+ if (vidSrc.indexOf('autoplay') > 0)
290
+ {
291
+ vidSrc = vidSrc.replace('autoplay=0', 'autoplay=1');
292
+ }
293
+ else
294
+ {
295
+ vidSrc += '&autoplay=1';
296
+ }
297
+
298
+ $iframe.addClass('epyt-thumbplay');
299
  }
300
+
301
+ // https://github.com/jquery/jquery-ui/blob/master/ui/scroll-parent.js
302
+ var bodyScrollTop = Math.max($('body').scrollTop(), $('html').scrollTop());
303
+ var scrollNext = $iframe.offset().top - parseInt(_EPYT_.gallery_scrolloffset);
304
+ if (bodyScrollTop > scrollNext)
305
  {
306
+ $('html, body').animate({
307
+ scrollTop: scrollNext
308
+ }, 500, function ()
309
+ {
310
+ window._EPADashboard_.setVidSrc($iframe, vidSrc);
311
+ });
312
  }
313
+ else
 
 
 
 
 
 
 
 
 
 
 
314
  {
315
  window._EPADashboard_.setVidSrc($iframe, vidSrc);
316
+ }
 
 
 
 
317
  }
318
 
319
  }).on('touchmove', function (e)
343
  $(this).removeClass('hover');
344
  });
345
 
346
+ $container.on('click touchend', '.epyt-pagebutton', function (ev)
347
  {
348
  if (window._EPYT_.touchmoved)
349
  {
350
  return;
351
  }
352
+ if (!$container.find('.epyt-gallery-list').hasClass('epyt-loading'))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
353
  {
354
+ $container.find('.epyt-gallery-list').addClass('epyt-loading');
355
+ var humanClick = typeof (ev.originalEvent) !== 'undefined';
356
+ var pageData = {
357
+ action: 'my_embedplus_gallery_page',
358
+ security: _EPYT_.security,
359
+ options: {
360
+ playlistId: $(this).data('playlistid'),
361
+ pageToken: $(this).data('pagetoken'),
362
+ pageSize: $(this).data('pagesize'),
363
+ columns: $(this).data('epcolumns'),
364
+ showTitle: $(this).data('showtitle'),
365
+ showPaging: $(this).data('showpaging'),
366
+ autonext: $(this).data('autonext'),
367
+ thumbplay: $(this).data('thumbplay')
368
+ }
369
+ };
370
+
371
+ var forward = $(this).hasClass('epyt-next');
372
+ var currpage = parseInt($container.data('currpage') + "");
373
+ currpage += forward ? 1 : -1;
374
+ $container.data('currpage', currpage);
375
+
376
+ $.post(_EPYT_.ajaxurl, pageData, function (response)
377
  {
378
+ $container.find('.epyt-gallery-list').html(response);
379
+ $container.find('.epyt-current').each(function ()
 
 
 
 
 
 
 
 
 
380
  {
381
+ $(this).text($container.data('currpage'));
382
+ });
383
+ $container.find('.epyt-gallery-thumb[data-videoid="' + $container.data('currvid') + '"]').addClass('epyt-current-video');
384
+
385
+ if ($container.find('.epyt-pagebutton').first().data('autonext') == '1' && !humanClick)
386
  {
387
+ $container.find('.epyt-gallery-thumb').first().click();
388
+ }
389
 
390
+ })
391
+ .fail(function ()
392
  {
393
+ alert('Sorry, there was an error loading the next page.');
394
+ })
395
+ .always(function ()
396
+ {
397
+ $container.find('.epyt-gallery-list').removeClass('epyt-loading');
398
+
399
+ if ($container.find('.epyt-pagebutton').first().data('autonext') != '1')
400
  {
401
+ // https://github.com/jquery/jquery-ui/blob/master/ui/scroll-parent.js
402
+ var bodyScrollTop = Math.max($('body').scrollTop(), $('html').scrollTop());
403
+ var scrollNext = $container.find('.epyt-gallery-list').offset().top - parseInt(_EPYT_.gallery_scrolloffset);
404
+ if (bodyScrollTop > scrollNext)
405
+ {
406
+ $('html, body').animate({
407
+ scrollTop: scrollNext
408
+ }, 500);
409
+ }
410
  }
 
 
 
411
 
412
+ });
413
+ }
414
  }).on('touchmove', function (e)
415
  {
416
  window._EPYT_.touchmoved = true;
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/",eppath:"/wp-content/plugins/youtube-embed-plus/",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"};a._EPYT_.touchmoved=false;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}if(f.data===a.YT.PlayerState.ENDED&&b(e).data("relstop")=="1"&&typeof f.target.stopVideo==="function"){f.target.stopVideo()}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="https://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);if(!f.data("epytevents")||!b("body").hasClass("block-editor-page")){f.data("epytevents","1");var e=b(this).find("iframe, div.__youtube_prefs_gdpr__").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");if(typeof(c)!=="undefined"){c=c.replace(d,"GALLERYVIDEOID");e.data("ep-gallerysrc",c)}else{if(e.hasClass("__youtube_prefs_gdpr__")){e.data("ep-gallerysrc","")}}f.on("click touchend",".epyt-gallery-list .epyt-gallery-thumb",function(){if(a._EPYT_.touchmoved){return}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("touchmove",function(g){a._EPYT_.touchmoved=true}).on("touchstart",function(){a._EPYT_.touchmoved=false}).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 touchend",".epyt-pagebutton",function(){if(a._EPYT_.touchmoved){return}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"),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)}}})}).on("touchmove",function(g){a._EPYT_.touchmoved=true}).on("touchstart",function(){a._EPYT_.touchmoved=false})}});b("button.__youtube_prefs_gdpr__").on("click",function(c){c.preventDefault();if(b.cookie){b.cookie("ytprefs_gdpr_consent","1",{expires:30,path:"/"});a.top.location.reload()}})}}}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);
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/",eppath:"/wp-content/plugins/youtube-embed-plus/",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"};a._EPYT_.touchmoved=false;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}if(f.data===a.YT.PlayerState.ENDED&&b(e).data("relstop")=="1"&&typeof f.target.stopVideo==="function"){f.target.stopVideo()}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="https://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);if(!f.data("epytevents")||!b("body").hasClass("block-editor-page")){f.data("epytevents","1");var e=b(this).find("iframe, div.__youtube_prefs_gdpr__").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");if(typeof(c)!=="undefined"){c=c.replace(d,"GALLERYVIDEOID");e.data("ep-gallerysrc",c)}else{if(e.hasClass("__youtube_prefs_gdpr__")){e.data("ep-gallerysrc","")}}f.on("click touchend",".epyt-gallery-list .epyt-gallery-thumb",function(k){if(a._EPYT_.touchmoved){return}if(!b(this).hasClass("epyt-current-video")){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 l=e.data("ep-gallerysrc").replace("GALLERYVIDEOID",g);var j=f.find(".epyt-pagebutton").first().data("thumbplay");if(j!=="0"&&j!==0){if(l.indexOf("autoplay")>0){l=l.replace("autoplay=0","autoplay=1")}else{l+="&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,l)})}else{a._EPADashboard_.setVidSrc(e,l)}}}).on("touchmove",function(g){a._EPYT_.touchmoved=true}).on("touchstart",function(){a._EPYT_.touchmoved=false}).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 touchend",".epyt-pagebutton",function(k){if(a._EPYT_.touchmoved){return}if(!f.find(".epyt-gallery-list").hasClass("epyt-loading")){f.find(".epyt-gallery-list").addClass("epyt-loading");var g=typeof(k.originalEvent)!=="undefined";var j={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"),thumbplay:b(this).data("thumbplay")}};var h=b(this).hasClass("epyt-next");var i=parseInt(f.data("currpage")+"");i+=h?1:-1;f.data("currpage",i);b.post(_EPYT_.ajaxurl,j,function(l){f.find(".epyt-gallery-list").html(l);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"&&!g){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 l=Math.max(b("body").scrollTop(),b("html").scrollTop());var m=f.find(".epyt-gallery-list").offset().top-parseInt(_EPYT_.gallery_scrolloffset);if(l>m){b("html, body").animate({scrollTop:m},500)}}})}}).on("touchmove",function(g){a._EPYT_.touchmoved=true}).on("touchstart",function(){a._EPYT_.touchmoved=false})}});b("button.__youtube_prefs_gdpr__").on("click",function(c){c.preventDefault();if(b.cookie){b.cookie("ytprefs_gdpr_consent","1",{expires:30,path:"/"});a.top.location.reload()}})}}}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);
youtube.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Embed Plus for YouTube - Gallery, Channel, Playlist, Live Stream
4
  Plugin URI: https://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx?ref=plugin
5
  Description: YouTube Embed and YouTube Gallery WordPress Plugin. Embed a responsive video, YouTube channel, playlist gallery, or live stream
6
- Version: 13.1.2.3
7
  Author: Embed Plus for YouTube Team
8
  Author URI: https://www.embedplus.com
9
  */
@@ -34,7 +34,7 @@ class YouTubePrefs
34
 
35
  public static $folder_name = 'youtube-embed-plus';
36
  public static $curltimeout = 30;
37
- public static $version = '13.1.2.3';
38
  public static $opt_version = 'version';
39
  public static $optembedwidth = null;
40
  public static $optembedheight = null;
@@ -113,7 +113,7 @@ class YouTubePrefs
113
  public static $yt_options = array();
114
  public static $dft_bpts = array(array('bp' => array('min' => 0, 'max' => 767), 'cols' => 1));
115
  public static $dft_roles = array('administrator', 'editor', 'author', 'contributor', 'subscriber');
116
- //public static $epbase = 'http://localhost:2346';
117
  public static $epbase = '//www.embedplus.com';
118
  public static $double_plugin = false;
119
  public static $scriptsprinted = 0;
@@ -136,7 +136,7 @@ class YouTubePrefs
136
  public static $boilerplate_api_error_message = ' Please make sure you performed the <a href="https://www.youtube.com/watch?v=6gD0X76-v_g" target="_blank">steps in this video</a> to create and save a proper server API key.';
137
  public static $dft_gdpr_consent_message = '<p><strong>Please accept YouTube cookies to play this video.</strong> By accepting you will be accessing content from YouTube, a service provided by an external third party.</p><p><a href="https://policies.google.com/privacy" target="_blank">YouTube privacy policy</a></p><p>If you accept this notice, your choice will be saved and the page will refresh.</p>';
138
  ///////////////////////////////////////////////////////////////////////////////////////////////////
139
-
140
  public static $vi_last_category_update_interval = '1 hour';
141
  public static $vi_script_tag_done = false;
142
  public static $vi_dft_js_settings = array(
@@ -185,6 +185,7 @@ class YouTubePrefs
185
 
186
  public function __construct()
187
  {
 
188
  register_deactivation_hook(__FILE__, array(get_class(), 'on_deactivation'));
189
  add_action('admin_init', array(get_class(), 'check_double_plugin_warning'));
190
  add_action('admin_notices', array(get_class(), 'separate_version_message'));
@@ -1756,8 +1757,8 @@ class YouTubePrefs
1756
  $_vi_hide_monetize_tab = 0;
1757
  $_vi_endpoints = '';
1758
  $_vi_token = '';
1759
- $_vi_last_login = date('Y-m-d H:i:s', strtotime('2000-01-01'));
1760
- $_vi_last_category_update = date('Y-m-d H:i:s', strtotime('2000-01-01'));
1761
  $_vi_adstxt = '';
1762
  $_vi_js_settings = self::$vi_dft_js_settings;
1763
  $_vi_js_script = '';
@@ -2918,10 +2919,11 @@ class YouTubePrefs
2918
  $new_pointer_content = '<h3>' . __('New Update') . '</h3>'; // ooopointer
2919
 
2920
  $new_pointer_content .= '<p>'; // ooopointer
2921
- $new_pointer_content .= "This version fixes a gallery scrolling issue for both Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions</a>, and an automatic featured thumbnail issue for <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions</a>.";
2922
- //$new_pointer_content .= "This version brings back the ability to hide related/suggested videos that show up at the end of YouTube embeds. It also allows monetized sites that are embedding video intelligence (vi) ads to select multiple IAB categories to get more content variety. "
2923
- //. (self::vi_logged_in() ? "<a href=\"" . admin_url('admin.php?page=youtube-ep-vi') . "\">Login here to see &raquo;</a>" : "<a rel=\"#jumpmonetize\" class=\"epyt-jumptab\" href=\"" . admin_url('admin.php?page=youtube-my-preferences#jumpmonetize') . "\">Login here to see &raquo;</a>");
2924
-
 
2925
  if (!empty(self::$alloptions[self::$opt_pro]) && strlen(trim(self::$alloptions[self::$opt_pro])) > 0)
2926
  {
2927
  $new_pointer_content .= ' <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.';
@@ -2956,18 +2958,18 @@ class YouTubePrefs
2956
  <a class="nav-tab" href="#jumpgallery">Galleries</a>
2957
  <a class="nav-tab href-link" style="background-color: #daebf1;" rel="#jumpupgrade" target="_blank" href="<?php echo self::$epbase . "/dashboard/pro-easy-video-analytics.aspx?ref=protab" ?>">Upgrade?</a>
2958
  <?php
2959
- if (!(bool) (self::$alloptions[self::$opt_vi_hide_monetize_tab]))
2960
  {
2961
  if (self::vi_logged_in())
2962
  {
2963
  ?>
2964
- <a class="nav-tab href-link" href="<?php echo admin_url('admin.php?page=youtube-ep-vi') ?>">Monetize <sup class="orange">new</sup></a>
2965
  <?php
2966
  }
2967
  else
2968
  {
2969
  ?>
2970
- <a class="nav-tab" href="#jumpmonetize">Monetize</a>
2971
  <?php
2972
  }
2973
  }
@@ -3610,9 +3612,9 @@ class YouTubePrefs
3610
  Check this to hide the installation setup wizard when this page loads.
3611
  </label>
3612
  </p>
3613
- <p class="<?php echo self::vi_logged_in() || !empty($all[self::$opt_vi_active]) ? 'hidden' : '' ?>">
3614
  <input name="<?php echo self::$opt_vi_hide_monetize_tab; ?>" id="<?php echo self::$opt_vi_hide_monetize_tab; ?>" <?php checked($all[self::$opt_vi_hide_monetize_tab], 1); ?> type="checkbox" class="checkbox">
3615
- <label for="<?php echo self::$opt_vi_hide_monetize_tab; ?>"><b class="chktitle">Hide "Monetize" Feature:</b> Hide the tab(s) that allow you earn money embedding videos from video intelligence (after saving this option, please refresh this page again).</label>
3616
  </p>
3617
  <p id="not_live_content_scroll">
3618
  <label for="<?php echo self::$opt_not_live_content; ?>">
@@ -3621,20 +3623,6 @@ class YouTubePrefs
3621
  Instead of showing that player, you can display some "coming soon" content in that space for your visitors to see until your channel begins to live stream.
3622
  The plugin will automatically switch to your channel's live stream once it's active.
3623
  Below, enter what you would like to appear until then. <strong><span class="orange">NOTE:</span> Do not put another live stream embed below.</strong>
3624
- <?php
3625
- if (self::vi_logged_in())
3626
- {
3627
- ?>
3628
- One new option is to embed a quality video advertisement so that you can get gain revenue during times when your live stream is not active. Simply click the "$ Video Ad" button below to enter the proper shortcode and the plugin will manage the rest.
3629
- <?php
3630
- }
3631
- else
3632
- {
3633
- ?>
3634
- One new option is to earn money from that inactive space by embedding a quality video advertisement containing content that matches your site's topics. <a href="#jumpmonetize" class="epyt-jumptab">Learn more and activate it here &raquo;</a>
3635
- <?php
3636
- }
3637
- ?>
3638
  If you just want to show the standard countdown player that YouTube provides, just leave the below empty and save.
3639
  </label>
3640
  <?php
@@ -4056,9 +4044,6 @@ class YouTubePrefs
4056
  <br>
4057
  <code>&lt;?php echo do_shortcode('[embedyt]....[/embedyt]'); ?&gt;</code>
4058
  </p>
4059
- <p>
4060
- <b>For video ads:</b> First sign up with <a target="_blank" href="<?php echo admin_url('admin.php?page=youtube-ep-vi') ?>">video intelligence</a>. Once you're approved and logged in, you can use the following short code to display revenue-generating video ads on your site: <code>[embed-vi-ad]</code>.
4061
- </p>
4062
  <p>
4063
  <b>Examples:</b><br><br>
4064
  <img style="width: 900px; height: auto;" class="shadow" src="<?php echo plugins_url('images/sshowto.png', __FILE__) ?>" />
@@ -6177,7 +6162,7 @@ class YouTubePrefs
6177
  public static function vi_print_toggle_button()
6178
  {
6179
  ?>
6180
- <button <?php echo self::vi_script_setup_done() ? '' : ' disabled '; ?> class="button-primary ytvi-btn-toggle <?php echo self::$alloptions[self::$opt_vi_active] ? 'ytvi-btn-active' : 'ytvi-btn-inactive' ?>">
6181
  vi ads are: <strong><?php echo self::$alloptions[self::$opt_vi_active] ? 'On' : 'Off' ?></strong>
6182
  <?php
6183
  if (!self::vi_script_setup_done())
@@ -6258,6 +6243,9 @@ class YouTubePrefs
6258
  <a class="button-secondary ytvi-btn-logout">Logout of vi settings</a>
6259
  <?php self::vi_print_toggle_button(); ?>
6260
  </h1>
 
 
 
6261
  <br>
6262
  <div class="updated ytvi-msg-congrats">
6263
  <p>
@@ -7604,6 +7592,11 @@ margin: 0 auto;
7604
 
7605
  }
7606
 
 
 
 
 
 
7607
  public static function vi_last_login_valid()
7608
  {
7609
  $last_login = strtotime(self::$alloptions[self::$opt_vi_last_login]);
3
  Plugin Name: Embed Plus for YouTube - Gallery, Channel, Playlist, Live Stream
4
  Plugin URI: https://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx?ref=plugin
5
  Description: YouTube Embed and YouTube Gallery WordPress Plugin. Embed a responsive video, YouTube channel, playlist gallery, or live stream
6
+ Version: 13.1.2.4
7
  Author: Embed Plus for YouTube Team
8
  Author URI: https://www.embedplus.com
9
  */
34
 
35
  public static $folder_name = 'youtube-embed-plus';
36
  public static $curltimeout = 30;
37
+ public static $version = '13.1.2.4';
38
  public static $opt_version = 'version';
39
  public static $optembedwidth = null;
40
  public static $optembedheight = null;
113
  public static $yt_options = array();
114
  public static $dft_bpts = array(array('bp' => array('min' => 0, 'max' => 767), 'cols' => 1));
115
  public static $dft_roles = array('administrator', 'editor', 'author', 'contributor', 'subscriber');
116
+ //public static $epbase = 'https://localhost:44328';
117
  public static $epbase = '//www.embedplus.com';
118
  public static $double_plugin = false;
119
  public static $scriptsprinted = 0;
136
  public static $boilerplate_api_error_message = ' Please make sure you performed the <a href="https://www.youtube.com/watch?v=6gD0X76-v_g" target="_blank">steps in this video</a> to create and save a proper server API key.';
137
  public static $dft_gdpr_consent_message = '<p><strong>Please accept YouTube cookies to play this video.</strong> By accepting you will be accessing content from YouTube, a service provided by an external third party.</p><p><a href="https://policies.google.com/privacy" target="_blank">YouTube privacy policy</a></p><p>If you accept this notice, your choice will be saved and the page will refresh.</p>';
138
  ///////////////////////////////////////////////////////////////////////////////////////////////////
139
+ public static $vi_default_date = ''; // date('Y-m-d H:i:s', strtotime('2000-01-01'));
140
  public static $vi_last_category_update_interval = '1 hour';
141
  public static $vi_script_tag_done = false;
142
  public static $vi_dft_js_settings = array(
185
 
186
  public function __construct()
187
  {
188
+ self::$vi_default_date = date('Y-m-d H:i:s', strtotime('2000-01-01'));
189
  register_deactivation_hook(__FILE__, array(get_class(), 'on_deactivation'));
190
  add_action('admin_init', array(get_class(), 'check_double_plugin_warning'));
191
  add_action('admin_notices', array(get_class(), 'separate_version_message'));
1757
  $_vi_hide_monetize_tab = 0;
1758
  $_vi_endpoints = '';
1759
  $_vi_token = '';
1760
+ $_vi_last_login = self::$vi_default_date;
1761
+ $_vi_last_category_update = self::$vi_default_date;
1762
  $_vi_adstxt = '';
1763
  $_vi_js_settings = self::$vi_dft_js_settings;
1764
  $_vi_js_script = '';
2919
  $new_pointer_content = '<h3>' . __('New Update') . '</h3>'; // ooopointer
2920
 
2921
  $new_pointer_content .= '<p>'; // ooopointer
2922
+ $new_pointer_content .= "This update fixes pagination and autonext issues for Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions</a>.";
2923
+ if (self::vi_logged_in())
2924
+ {
2925
+ $new_pointer_content .= "<br><br><strong>Note:</strong> You are currently logged into the vi intelligence feature. vi support is being deprecated in the next version. Please contact ext@embedplus.com for questions.";
2926
+ }
2927
  if (!empty(self::$alloptions[self::$opt_pro]) && strlen(trim(self::$alloptions[self::$opt_pro])) > 0)
2928
  {
2929
  $new_pointer_content .= ' <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.';
2958
  <a class="nav-tab" href="#jumpgallery">Galleries</a>
2959
  <a class="nav-tab href-link" style="background-color: #daebf1;" rel="#jumpupgrade" target="_blank" href="<?php echo self::$epbase . "/dashboard/pro-easy-video-analytics.aspx?ref=protab" ?>">Upgrade?</a>
2960
  <?php
2961
+ if (!(bool) (self::$alloptions[self::$opt_vi_hide_monetize_tab]) && self::vi_ever_logged_in())
2962
  {
2963
  if (self::vi_logged_in())
2964
  {
2965
  ?>
2966
+ <a class="nav-tab href-link nav-tab-invalid" href="<?php echo admin_url('admin.php?page=youtube-ep-vi') ?>">Monetize</a>
2967
  <?php
2968
  }
2969
  else
2970
  {
2971
  ?>
2972
+ <a class="nav-tab nav-tab-invalid" href="#jumpmonetize">Monetize</a>
2973
  <?php
2974
  }
2975
  }
3612
  Check this to hide the installation setup wizard when this page loads.
3613
  </label>
3614
  </p>
3615
+ <p class="<?php echo self::vi_logged_in() || !empty($all[self::$opt_vi_active]) || !self::vi_ever_logged_in() ? 'hidden' : '' ?>">
3616
  <input name="<?php echo self::$opt_vi_hide_monetize_tab; ?>" id="<?php echo self::$opt_vi_hide_monetize_tab; ?>" <?php checked($all[self::$opt_vi_hide_monetize_tab], 1); ?> type="checkbox" class="checkbox">
3617
+ <label for="<?php echo self::$opt_vi_hide_monetize_tab; ?>"><b class="chktitle">Hide "Monetize" Feature:</b> (deprecated) Hide the tab(s) for the deprecated video intelligence feature.</label>
3618
  </p>
3619
  <p id="not_live_content_scroll">
3620
  <label for="<?php echo self::$opt_not_live_content; ?>">
3623
  Instead of showing that player, you can display some "coming soon" content in that space for your visitors to see until your channel begins to live stream.
3624
  The plugin will automatically switch to your channel's live stream once it's active.
3625
  Below, enter what you would like to appear until then. <strong><span class="orange">NOTE:</span> Do not put another live stream embed below.</strong>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3626
  If you just want to show the standard countdown player that YouTube provides, just leave the below empty and save.
3627
  </label>
3628
  <?php
4044
  <br>
4045
  <code>&lt;?php echo do_shortcode('[embedyt]....[/embedyt]'); ?&gt;</code>
4046
  </p>
 
 
 
4047
  <p>
4048
  <b>Examples:</b><br><br>
4049
  <img style="width: 900px; height: auto;" class="shadow" src="<?php echo plugins_url('images/sshowto.png', __FILE__) ?>" />
6162
  public static function vi_print_toggle_button()
6163
  {
6164
  ?>
6165
+ <button style="z-index: 10" <?php echo self::vi_script_setup_done() ? '' : ' disabled '; ?> class="button-primary ytvi-btn-toggle <?php echo self::$alloptions[self::$opt_vi_active] ? 'ytvi-btn-active' : 'ytvi-btn-inactive' ?>">
6166
  vi ads are: <strong><?php echo self::$alloptions[self::$opt_vi_active] ? 'On' : 'Off' ?></strong>
6167
  <?php
6168
  if (!self::vi_script_setup_done())
6243
  <a class="button-secondary ytvi-btn-logout">Logout of vi settings</a>
6244
  <?php self::vi_print_toggle_button(); ?>
6245
  </h1>
6246
+ <div class="update-nag notice">
6247
+ <p>This feature is being deprecated in the next version. Please contact ext@embedplus.com for questions.</p>
6248
+ </div>
6249
  <br>
6250
  <div class="updated ytvi-msg-congrats">
6251
  <p>
7592
 
7593
  }
7594
 
7595
+ public static function vi_ever_logged_in()
7596
+ {
7597
+ return self::$alloptions[self::$opt_vi_last_login] != self::$vi_default_date;
7598
+ }
7599
+
7600
  public static function vi_last_login_valid()
7601
  {
7602
  $last_login = strtotime(self::$alloptions[self::$opt_vi_last_login]);