YouTube - Version 13.1

Version Description

Download this release

Release Info

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

Code changes from version 13.0.1 to 13.1

includes/gutenberg/gutenberg_hooks.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  // Hook: Frontend assets.
4
- add_action('enqueue_block_assets', array(get_class(), 'gb_block_assets'));
5
 
6
  // Hook: Editor assets.
7
  add_action('enqueue_block_editor_assets', array(get_class(), 'gb_editor_assets'));
1
  <?php
2
 
3
  // Hook: Frontend assets.
4
+ //add_action('enqueue_block_assets', array(get_class(), 'gb_block_assets'));
5
 
6
  // Hook: Editor assets.
7
  add_action('enqueue_block_editor_assets', array(get_class(), 'gb_editor_assets'));
includes/vi/vi_login_success_content.php CHANGED
@@ -11,7 +11,7 @@
11
  else
12
  {
13
  ?>
14
- You're now ready to monetize &raquo;
15
  <?php
16
  }
17
  ?>
11
  else
12
  {
13
  ?>
14
+ Click here to begin customizing &raquo;
15
  <?php
16
  }
17
  ?>
includes/vi/vi_registration_form.php CHANGED
@@ -31,11 +31,28 @@
31
  <div class="vi-demo-col-content">
32
  <div class="vi-demo">
33
  <?php
34
- if (self::vi_script_setup_done() && !self::vi_last_login_valid())
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  {
36
  ?>
37
  <div class="login-expire">
38
- For your security, your session expires every 30 days. Please login to vi again below to view your settings.
39
  </div>
40
  <?php
41
  }
@@ -117,16 +134,16 @@
117
  <div class="ytvi-registration">
118
  <div class="ytvi-step-2-msg">
119
  <ol>
120
- <li><strong>Register</strong> below</li>
121
- <li><strong>Check your email</strong> for a confirmation link</li>
122
  <li><strong>Come right back here</strong> after creating your password
123
  <?php
124
  $curr_screen = get_current_screen();
125
- echo strpos($curr_screen->id, 'youtube-ep-vi') !== false || strpos($curr_screen->id, 'youtube-my-preferences') !== false ? 'and refresh this page' : 'and <a target="_blank" href="' . admin_url('admin.php?page=youtube-ep-vi') . '">click here</a>'
126
- ?> (Note: <u><strong>Skip</strong> the "integration tags" step</u> that you might see after confirmation, because this plugin will automatically do that step for you.)
127
  </li>
128
  <li>
129
- <strong>Login below</strong> to complete the setup.
130
  </li>
131
  </ol>
132
  </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']))
36
+ {
37
+ $iabCategoryList = explode(',', self::$alloptions[self::$opt_vi_js_settings]['iabCategory']);
38
+ if (count($iabCategoryList) > 1)
39
+ {
40
+ $multiCatWarning = ' Note: If you selected more than one video category, you must stay logged in to this settings page for your categories to automatically add variety to your ads.';
41
+ }
42
+ }
43
+ if (self::$alloptions[self::$opt_vi_token] === false)
44
+ {
45
+ ?>
46
+ <div class="login-expire">
47
+ For your security, your session has expired. Please login to vi again below to view your settings. <?php echo $multiCatWarning; ?>
48
+ </div>
49
+ <?php
50
+ }
51
+ else if ((self::vi_script_setup_done() && !self::vi_last_login_valid()))
52
  {
53
  ?>
54
  <div class="login-expire">
55
+ For your security, your session expires every 30 days. Please login to vi again below to view your settings. <?php echo $multiCatWarning; ?>
56
  </div>
57
  <?php
58
  }
134
  <div class="ytvi-registration">
135
  <div class="ytvi-step-2-msg">
136
  <ol>
137
+ <li><strong>Register</strong> below.</li>
138
+ <li><strong>Check your email</strong> for a confirmation link. Vi will verify your site for quality standards, so it may take about 48 hours for approval. Weekend signups will be processed starting on Monday.</li>
139
  <li><strong>Come right back here</strong> after creating your password
140
  <?php
141
  $curr_screen = get_current_screen();
142
+ echo strpos($curr_screen->id, 'youtube-ep-vi') !== false || strpos($curr_screen->id, 'youtube-my-preferences') !== false ? 'and refresh this page.' : 'and <a target="_blank" href="' . admin_url('admin.php?page=youtube-ep-vi') . '">click here</a>.'
143
+ ?> (Note: <u><strong>Skip</strong> the "integration tags" step</u> that you might see after confirmation, because this plugin will automatically do that step for you.)
144
  </li>
145
  <li>
146
+ <strong>Login below</strong> to complete the setup.
147
  </li>
148
  </ol>
149
  </div>
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: embedplus
3
  Plugin Name: YouTube Embed
4
  Tags: youtube gallery, video gallery, youtube channel, youtube live, live stream
5
  Requires at least: 4.0
6
- Tested up to: 5.1
7
- Stable tag: 13.0.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 (with GDPR options)
@@ -148,6 +148,14 @@ You can also start and end each individual video at particular times. Like the a
148
 
149
  == Changelog ==
150
 
 
 
 
 
 
 
 
 
151
  = WordPress YouTube Embed 13.0.1 =
152
  * Clearer instructions
153
  * Feature deprecation (rel, showinfo)
3
  Plugin Name: YouTube Embed
4
  Tags: youtube gallery, video gallery, youtube channel, youtube live, live stream
5
  Requires at least: 4.0
6
+ Tested up to: 5.2
7
+ Stable tag: 13.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 (with GDPR options)
148
 
149
  == Changelog ==
150
 
151
+ = WordPress YouTube Embed 13.1 =
152
+ * Brings back the ability to hide related/suggested videos at end of playback
153
+ * Allows monetized sites to select multiple IAB categories
154
+ * Option to run shortcode in admin (compatibility tab)
155
+ * Lowers quota usage for live videos
156
+ * Fixes "missing dependencies" block editor CSS reference
157
+ * Fixes default dimensions issue
158
+
159
  = WordPress YouTube Embed 13.0.1 =
160
  * Clearer instructions
161
  * Feature deprecation (rel, showinfo)
scripts/ytprefs-admin.js CHANGED
@@ -105,6 +105,9 @@
105
  dataType: 'text',
106
  type: 'get',
107
  data: '',
 
 
 
108
  async: true
109
  }).always(function (data_jqXHR, textStatus, jqXHR_errorThrown)
110
  {
@@ -128,7 +131,51 @@
128
  }
129
  else
130
  {
131
- window._EPYTA_.adstxtVerify('');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  }
133
  });
134
  };
@@ -190,6 +237,16 @@
190
  jQuery('body').fitVidsEP();
191
  };
192
 
 
 
 
 
 
 
 
 
 
 
193
  $.fn.ytprefsFormJSON = function ()
194
  {
195
  var o = {};
@@ -615,16 +672,16 @@
615
  });
616
 
617
 
618
- var iab = $('.iab-cat-child').val();
619
- if (iab.length > 0)
620
  {
621
- var iabPrefix = iab.split('-')[0];
622
- $('.iab-cat-child-box').removeClass('hidden');
623
- $('.iab-cat-child-box select').prop('disabled', false);
624
-
625
- $('.iab-cat-parent option[value="' + iabPrefix + '"]').prop('selected', true);
626
- $('.iab-cat-child option').addClass('hidden');
627
- $('.iab-cat-child option[value^="' + iabPrefix + '-"], .iab-cat-child option[value="' + iabPrefix + '"]').removeClass('hidden');
628
  }
629
 
630
  $('.iab-cat-parent').on('change', function ()
@@ -641,12 +698,47 @@
641
  $('.iab-cat-child-box').removeClass('hidden');
642
  $('.iab-cat-child-box select').prop('disabled', false);
643
  $('.iab-cat-child option').addClass('hidden');
644
- $('.iab-cat-child option[value^="' + iabPrefix + '-"], .iab-cat-child option[value="' + iabPrefix + '"]').removeClass('hidden');
 
645
  }
646
 
647
 
648
  });
649
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
650
  window._EPYTA_.demoBackgroundColor();
651
  window._EPYTA_.demoTextColor();
652
  window._EPYTA_.demoFontFamily();
@@ -672,7 +764,7 @@
672
  },
673
  success: function (response)
674
  {
675
- if (response.type === 'error' || !response.data.mtdReport.length)
676
  {
677
  $('.vi-report-error').removeClass('hide');
678
  $('.vi-report').addClass('hide');
@@ -794,9 +886,15 @@
794
 
795
  $('.ytvi-btn-logout').on('click', function ()
796
  {
 
 
 
 
 
 
797
  alertify.confirm().set({
798
  title: "Logout of Monetize settings",
799
- message: "Logging out won't delete your settings. However, it will require you (or any other admins) to re-login to change vi ad settings in the future.<br><br>To actually disable vi ads, make sure the '<strong>vi ads are: On/Off</strong>' button is set to '<strong>Off</strong>.'",
800
  onok: function ()
801
  {
802
  $.ajax({
@@ -862,6 +960,14 @@
862
  {
863
  $btn.find('strong').text(response.button_text);
864
  $btn.toggleClass('ytvi-btn-active ytvi-btn-inactive');
 
 
 
 
 
 
 
 
865
  }
866
  },
867
  error: function (xhr, ajaxOptions, thrownError)
105
  dataType: 'text',
106
  type: 'get',
107
  data: '',
108
+ headers: {
109
+ 'Cache-Control': 'no-cache'
110
+ },
111
  async: true
112
  }).always(function (data_jqXHR, textStatus, jqXHR_errorThrown)
113
  {
131
  }
132
  else
133
  {
134
+ var jqXHR = data_jqXHR;
135
+ var errorThrown = jqXHR_errorThrown;
136
+ if (jqXHR.status == 404)
137
+ {
138
+ // retry
139
+ $.ajax({
140
+ url: location.protocol + "//" + location.hostname + "/ads.txt",
141
+ dataType: 'text',
142
+ type: 'get',
143
+ data: '',
144
+ headers: {
145
+ 'Cache-Control': 'no-cache'
146
+ },
147
+ async: true
148
+ }).always(function (data_jqXHR, textStatus, jqXHR_errorThrown)
149
+ {
150
+ if (textStatus === 'success')
151
+ {
152
+ var jqXHR = jqXHR_errorThrown;
153
+ var data = data_jqXHR;
154
+ switch (jqXHR.status)
155
+ {
156
+ case 200:
157
+ case 301:
158
+ case 302:
159
+ case 304:
160
+ case 307:
161
+ window._EPYTA_.adstxtVerify(data);
162
+ break;
163
+ default:
164
+ window._EPYTA_.adstxtVerify('');
165
+ break;
166
+ }
167
+ }
168
+ else
169
+ {
170
+ window._EPYTA_.adstxtVerify('');
171
+ }
172
+ }
173
+ );
174
+ }
175
+ else
176
+ {
177
+ window._EPYTA_.adstxtVerify('');
178
+ }
179
  }
180
  });
181
  };
237
  jQuery('body').fitVidsEP();
238
  };
239
 
240
+ window._EPYTA_.iabAdd = function (iabVal, iabText, iabTextParent)
241
+ {
242
+ var tagText = $('<div class="iab-cat-tag-button" data-tag="' + iabVal + '">' + iabTextParent + ' : ' + iabText + ' &times;</div>');
243
+ $('.iab-cat-tags-display').append(tagText);
244
+ $('.iab-cat-tags-display .iab-cat-tag-button').sort(function (a, b)
245
+ {
246
+ return $(a).text() > $(b).text() ? 1 : -1;
247
+ }).appendTo('.iab-cat-tags-display');
248
+ };
249
+
250
  $.fn.ytprefsFormJSON = function ()
251
  {
252
  var o = {};
672
  });
673
 
674
 
675
+ var iabValRaw = $('.iab-cat-tags').val();
676
+ if (iabValRaw.length > 0)
677
  {
678
+ var iabCurrent = iabValRaw.split(',');
679
+ iabCurrent.forEach(function (iabVal)
680
+ {
681
+ var iabText = $('.iab-cat-child option[value="' + iabVal + '"]').text();
682
+ var iabTextParent = $('.iab-cat-parent option[value="' + (iabVal.split('-')[0]) + '"]').text();
683
+ window._EPYTA_.iabAdd(iabVal, iabText, iabTextParent);
684
+ });
685
  }
686
 
687
  $('.iab-cat-parent').on('change', function ()
698
  $('.iab-cat-child-box').removeClass('hidden');
699
  $('.iab-cat-child-box select').prop('disabled', false);
700
  $('.iab-cat-child option').addClass('hidden');
701
+ $('.iab-cat-child option[value^="' + iabPrefix + '-"], .iab-cat-child option[value="' + iabPrefix + '"], .iab-cat-child option[value=""]').removeClass('hidden');
702
+ $('.iab-cat-child-box select').val('');
703
  }
704
 
705
 
706
  });
707
 
708
+ $('.iab-cat-child').on('change', function ()
709
+ {
710
+ var iabCurrent = $('.iab-cat-tags').val() ? $('.iab-cat-tags').val().split(',') : [];
711
+ if (iabCurrent.length < 4)
712
+ {
713
+ var iabVal = $(this).val();
714
+ var iabText = $(this).find('option:selected').text();
715
+ var iabTextParent = $('.iab-cat-parent').find('option:selected').text();
716
+ if (iabVal && iabCurrent.indexOf(iabVal) == -1)
717
+ {
718
+ iabCurrent.push(iabVal);
719
+ $('.iab-cat-tags').val(iabCurrent.join(','));
720
+ window._EPYTA_.iabAdd(iabVal, iabText, iabTextParent);
721
+ }
722
+ }
723
+ else
724
+ {
725
+ alertify.alert('You can choose up to 4 categories maximum. In order to add a new one, you must remove one of the existing ones.');
726
+ }
727
+ });
728
+
729
+ $('.iab-cat-tags-display').on('click', '.iab-cat-tag-button', function ()
730
+ {
731
+ var $tag = $(this);
732
+ var iabVal = $tag.data('tag');
733
+ var iabCurrent = $('.iab-cat-tags').val() ? $('.iab-cat-tags').val().split(',') : [];
734
+ iabCurrent = iabCurrent.filter(function (ele)
735
+ {
736
+ return ele != iabVal;
737
+ });
738
+ $('.iab-cat-tags').val(iabCurrent.join(','));
739
+ $tag.remove();
740
+ });
741
+
742
  window._EPYTA_.demoBackgroundColor();
743
  window._EPYTA_.demoTextColor();
744
  window._EPYTA_.demoFontFamily();
764
  },
765
  success: function (response)
766
  {
767
+ if (response.type === 'error' || !response.data.mtdReport.length || typeof (response.data.mtdReport[0].date) === 'undefined')
768
  {
769
  $('.vi-report-error').removeClass('hide');
770
  $('.vi-report').addClass('hide');
886
 
887
  $('.ytvi-btn-logout').on('click', function ()
888
  {
889
+ var multiCatWarning = '';
890
+ var iabValRaw = $('.iab-cat-tags').val();
891
+ if (iabValRaw.length > 0 && iabValRaw.split(',').length > 1)
892
+ {
893
+ multiCatWarning = ' (Note: If you selected more than one video category, you must stay logged in to this settings page for your categories to automatically add variety to your ads)';
894
+ }
895
  alertify.confirm().set({
896
  title: "Logout of Monetize settings",
897
+ message: "Logging out won't delete your settings. However, it will require you or any other admins to re-login to change vi ad settings in the future" + multiCatWarning + ".<br><br>To actually disable monetization, make sure the '<strong>vi ads are: On/Off</strong>' button is set to '<strong>Off</strong>.'",
898
  onok: function ()
899
  {
900
  $.ajax({
960
  {
961
  $btn.find('strong').text(response.button_text);
962
  $btn.toggleClass('ytvi-btn-active ytvi-btn-inactive');
963
+ if ($btn.hasClass('ytvi-btn-active'))
964
+ {
965
+ $('.ytvi-msg-congrats').show(200);
966
+ }
967
+ else
968
+ {
969
+ $('.ytvi-msg-congrats').hide();
970
+ }
971
  }
972
  },
973
  error: function (xhr, ajaxOptions, thrownError)
scripts/ytprefs-admin.min.js CHANGED
@@ -1,2 +1,2 @@
1
 
2
- (function(a,b){a._EPYTA_.widen_ytprefs_wiz=a._EPYTA_.widen_ytprefs_wiz||function(){setTimeout(function(){var c=Math.min(950,b(a).width()-100);var d=-1*c/2;b("#TB_window").addClass("epyt-thickbox").animate({marginLeft:d,width:c},150,"swing",function(){b("#TB_window").get(0).style.setProperty("width",c,"important")});b("#TB_overlay").addClass("epyt-thickbox");b("#TB_window iframe").animate({width:c},150)},750)};a._EPYTA_.ytvi_cancel=a._EPYTA_.ytvi_cancel||function(){b(".ytvi-step").hide("fade",{},500,function(){b(".ytvi-step-1").show("fade",{},500)})};a._EPYTA_.moneyFormat=a._EPYTA_.moneyFormat||function(c){return"$"+parseFloat(c).toFixed(2)};a._EPYTA_.escId=function(c){return"#"+c.replace(/(:|\.|\[|\]|,|=|@)/g,"\\$1")};a._EPYTA_.demoBackgroundColor=function(c,d){setTimeout(function(){b(".vi-story-demo--info").css("background-color",b(a._EPYTA_.escId("vi_js_settings[backgroundColor]")).val())},0)};a._EPYTA_.demoTextColor=function(c,d){setTimeout(function(){b(".vi-story-demo--info *").css("color",b(a._EPYTA_.escId("vi_js_settings[textColor]")).val())},0)};a._EPYTA_.demoFontFamily=function(){b(".vi-story-demo--title").css("font-family",b(a._EPYTA_.escId("vi_js_settings[font]")).val())};a._EPYTA_.demoFontSize=function(){b(".vi-story-demo--title").css("font-size",b(a._EPYTA_.escId("vi_js_settings[fontSize]")).val()+"px")};a._EPYTA_.onboardNext=function(c){b(".ytprefs-ob-step").removeClass("active-step");setTimeout(function(){a.scrollTo(0,0);c.next().addClass("active-step")},600)};a._EPYTA_.onboardPrev=function(c){b(".ytprefs-ob-step").removeClass("active-step");setTimeout(function(){a.scrollTo(0,0);c.prev().addClass("active-step")},600)};a._EPYTA_.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)}}};a._EPYTA_.adstxtLookup=function(){a._EPYTA_.adstxtLoading(true);b.ajax({url:location.protocol+"//"+location.hostname+"/ads.txt?c="+Date.now(),dataType:"text",type:"get",data:"",async:true}).always(function(c,g,f){if(g==="success"){var d=f;var e=c;switch(d.status){case 200:case 301:case 302:case 304:case 307:a._EPYTA_.adstxtVerify(e);break;default:a._EPYTA_.adstxtVerify("");break}}else{a._EPYTA_.adstxtVerify("")}})};a._EPYTA_.adstxtVerify=function(c){b.ajax({type:"post",dataType:"json",timeout:120000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_adstxt_status_soft_ajax",current_adstxt:c},success:function(d){if(d.code==2){b(".nav-tab-adstxt").addClass("nav-tab-valid")}else{if(d.code<=0){b(".nav-tab-adstxt").addClass("nav-tab-invalid")}}b(".adstxt-verify-message").html(d.message)},error:function(f,d,e){b(".nav-tab-adstxt").addClass("nav-tab-invalid");b(".adstxt-verify-message").html("Could not validate ads.txt: "+e)},complete:function(){a._EPYTA_.adstxtLoading(false)}})};a._EPYTA_.adstxtLoading=function(c){if(c){b(".nav-tab-adstxt").addClass("nav-tab-loading")}else{b(".nav-tab-adstxt").removeClass("nav-tab-loading")}};a._EPYTA_.gbPreviewSetup=function(){a._EPADashboard_.loadYTAPI();a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API GB");a._EPADashboard_.pageReady();jQuery("body").fitVidsEP()};b.fn.ytprefsFormJSON=function(){var d={};var c=this.serializeArray();b.each(c,function(){if(d[this.name]){if(!d[this.name].push){d[this.name]=[d[this.name]]}d[this.name].push(this.value||"")}else{d[this.name]=this.value||""}});return d};b(document).ready(function(){if(a.location.toString().indexOf("https://")===0){a._EPYTA_.wpajaxurl=a._EPYTA_.wpajaxurl.replace("http://","https://")}var g=a.addEventListener?"addEventListener":"attachEvent";var d=a[g];var c=g==="attachEvent"?"onmessage":"message";d(c,function(k){var i="";try{if(k.data.indexOf("youtubeembedplus")===0&&k.data.indexOf("clientId=")<0){i=k.data.split("|")[1];if(i.indexOf("[")!==0){i="<p>"+i+"</p>"}if(a.tinyMCE!==null&&a.tinyMCE.activeEditor!==null&&!a.tinyMCE.activeEditor.isHidden()){if(a._EPYTA_.mceBookmark){try{a.tinyMCE.activeEditor.selection.moveToBookmark(a._EPYTA_.mceBookmark)}catch(j){}}if(typeof a.tinyMCE.execInstanceCommand!=="undefined"){a.tinyMCE.execInstanceCommand(a.tinyMCE.activeEditor.id,"mceInsertContent",false,i)}else{send_to_editor(i)}setTimeout(function(){a._EPYTA_.mceBookmark=null},500)}else{i=i.replace("<p>","\n").replace("</p>","\n");if(typeof QTags.insertContent==="function"){QTags.insertContent(i)}else{send_to_editor(i)}}tb_remove()}}catch(j){}},false);b("body").on("click.tbyt","#ytprefs_wiz_button, .ytprefs_wiz_button_widget_text, .ytprefs-onboarding-launch",function(){a._EPYTA_.widen_ytprefs_wiz()});b("body").on("click.tbyt","#ytprefs_wiz_button_vi, .ytprefs_wiz_button_vi_widget_text",function(){send_to_editor("<p>[embed-vi-ad]</p>")});b(a).resize(a._EPYTA_.widen_ytprefs_wiz);b(document).on("wp-before-tinymce-init.ytprefs-media_button",function(i,j){$media_buttons=b(j.selector).closest(".wp-editor-wrap").find(".wp-media-buttons");if(!$media_buttons.find(".ytprefs_media_link").length){$media_buttons.append('<a href="'+encodeURI(a._EPYTA_.wizhref)+'" class="thickbox button ytprefs_media_link ytprefs_wiz_button_widget_text" title="Visual YouTube Search Tool and Wizard - For easier embedding"><span></span> YouTube</a>');if(a._EPYTA_.manage_options&&a._EPYTA_.vi_logged_in){$media_buttons.append('<a class="button ytprefs_vi_embed_shortcode" id="ytprefs_wiz_button_vi" title="Embed vi video ad"><span></span> Video Ad</a>')}}});if(b(".wrap-vi-settings").length){a._EPYTA_.adstxtLookup()}b('.wrap section a[href^="#jump"]').on("click",function(j){j.preventDefault();var i=b(this).attr("href");b('.nav-tab-wrapper a[href="'+i+'"]').click()});b(".ytprefs-ajax-form").on("keypress",function(i){if(i.which==13){i.preventDefault();b(this).find(".ytprefs-ajax-form--submit:not([disabled])").click()}});b(a).on("hashchange",function(){if(a.location.hash.length>0){$section=b("section"+a.location.hash);if($section.length>0){$section.find("h2").addClass("ytvi-hash-scroll");setTimeout(function(){$section.find("h2").removeClass("ytvi-hash-scroll")},2000)}$jumper=b(".jumper"+a.location.hash);if($jumper.length>0){b(".jumper"+a.location.hash+" + h3.sect").addClass("ytvi-hash-scroll");setTimeout(function(){b(".jumper"+a.location.hash+" + h3.sect").removeClass("ytvi-hash-scroll")},2000)}}});b(".vi-cover-prompt-no").on("click",function(){b.ajax({type:"post",dataType:"json",timeout:120000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_hide_feature_ajax"},success:function(i){if(!i||i.type==="error"){alertify.alert(i.message)}else{if(a!=a.top){a.location.reload()}else{a.top.location.href=i.url}}},error:function(k,i,j){alertify.alert('Sorry, there was a network error. Please try again, or turn off this feature using the "Hide Monetize Feature" checkbox on the "Defaults" tab of the YouTube settings. If the issue persists, please contact ext@embedplus.com')},complete:function(){}})});b(".vi-cover-prompt-yes").on("click",function(){b(".vi-cover-prompt, .vi-cover-clear").fadeOut(500);var i=new Date();i.setTime(i.getTime()+(365*24*60*60*1000));document.cookie="vi_cover_prompt_yes=1;expires="+i.toUTCString()+";path="+a._EPYTA_.admin_url});b(".vi-cover-prompt-maybe").on("click",function(){var i=new Date();i.setTime(i.getTime()+(365*24*60*60*1000));document.cookie="vi_cover_prompt_yes=1;expires="+i.toUTCString()+";path="+a._EPYTA_.admin_url;if(a!=a.top){a.location.reload()}else{a.top.location.href=a._EPYTA_.admin_url_ytprefs}});if(b(".vi-demo-screen").length>1){var f=setInterval(function(){b(".vi-demo-screen-2").toggleClass("demo-hide");b(".vi-demo-mobile-caption").toggleClass("demo-hide")},20000)}b(".ytvi-step-1--submit-register").on("click",function(i){var j=b.trim(b(".ytvi-register-email").val());if(!j.length){alertify.alert("Please enter your email address.")}else{b(".ytvi-step-1--submit-register").prop("disabled",true);b(".ytvi-step-1").hide("fade",{},500,function(){b(".ytvi-step-2-loading").show("fade",{},500,function(){b.ajax({type:"post",dataType:"json",timeout:120000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_cache_endpoints_ajax",email:j,domain:a.location.href},success:function(k){if(k.type=="success"){b(".ytvi-step-2 .ytvi-registration iframe").attr("src",k.signupURLParams);setTimeout(function(){b(".ytvi-step-2-loading").hide("fade",{},500,function(){b(".ytvi-step-2").show("fade",{},500)})},3000);var m=new Date(),l=new Date();l.setTime(l.getTime()+(365*24*60*60*1000));document.cookie="vi_signup_attempt="+m.toUTCString()+";expires="+l.toUTCString()+";path="+a._EPYTA_.admin_url}else{if(k.type==="error"){alertify.alert(k.message);a._EPYTA_.ytvi_cancel()}}},error:function(m,k,l){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com");a._EPYTA_.ytvi_cancel()},complete:function(){b(".ytvi-step-1--submit-register").prop("disabled",false)}})})})}});b(".ytvi-registration--cancel").on("click",function(){a._EPYTA_.ytvi_cancel()});b(".ytvi-step-1--confirm").on("change",function(){if(b(this).is(":checked")){b(".ytvi-step-1--submit-register").prop("disabled",false)}else{b(".ytvi-step-1--submit-register").prop("disabled",true)}});b(".ytvi-step-1--submit-login").on("click",function(k){var l=b.trim(b(".ytvi-login-email").val());var i=b.trim(b(".ytvi-password").val());var j="";j+=l.length?"":"Please enter your email address. ";j+=i.length?"":"Please enter your vi dashboard password.";if(j.length){alertify.alert(j)}else{b(".ytvi-step-1--submit-login").prop("disabled",true);b(".ytvi-step-1").hide("fade",{},500,function(){b(".ytvi-login-loading").show("fade",{},500,function(){b.ajax({type:"post",dataType:"json",timeout:12000000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_login_ajax",email:l,password:i},success:function(m){if(m.type==="error"){alertify.alert(m.message);a._EPYTA_.ytvi_cancel()}else{b(".ytvi-login-loading").hide("fade",{},500,function(){document.cookie="vi_signup_attempt=; expires=Thu, 01 Jan 1970 00:00:01 GMT;";b(".ytvi-login-success-message").html(m.message);b(".ytvi-login-success").show("fade",{},500,function(){})})}},error:function(o,m,n){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com");a._EPYTA_.ytvi_cancel()},complete:function(){b(".ytvi-step-1--submit-login").prop("disabled",false)}})})})}});b("a.vi-logged-in-goto").each(function(){if(b(this).attr("href").indexOf(a.location.pathname+a.location.search)>0||a.location.search.indexOf("youtube-my-preferences")>0){b(this).removeAttr("target")}});if(b(".wrap-vi-settings").length){b(".vi-how-works").on("click",function(){var i=b(this).data("jump");b('.nav-tab-wrapper > a[href="'+i+'"]').click()});b(document).on("click",".wrap-vi-settings .nav-tab-wrapper a",function(){$a=b(this);b(".wrap-vi-settings .nav-tab-wrapper a").removeClass("nav-tab-active");$a.addClass("nav-tab-active");b(".wrap-vi-settings section").hide();b(".wrap-vi-settings section").filter($a.attr("href")).fadeIn(200);return false});var e=b(".iab-cat-child").val();if(e.length>0){var h=e.split("-")[0];b(".iab-cat-child-box").removeClass("hidden");b(".iab-cat-child-box select").prop("disabled",false);b('.iab-cat-parent option[value="'+h+'"]').prop("selected",true);b(".iab-cat-child option").addClass("hidden");b('.iab-cat-child option[value^="'+h+'-"], .iab-cat-child option[value="'+h+'"]').removeClass("hidden")}b(".iab-cat-parent").on("change",function(){var i=b(this).val();b(".iab-cat-child").val(i);if(i==""){b(".iab-cat-child-box").addClass("hidden");b(".iab-cat-child-box select").prop("disabled",true)}else{b(".iab-cat-child-box").removeClass("hidden");b(".iab-cat-child-box select").prop("disabled",false);b(".iab-cat-child option").addClass("hidden");b('.iab-cat-child option[value^="'+i+'-"], .iab-cat-child option[value="'+i+'"]').removeClass("hidden")}});a._EPYTA_.demoBackgroundColor();a._EPYTA_.demoTextColor();a._EPYTA_.demoFontFamily();a._EPYTA_.demoFontSize();b(a._EPYTA_.escId("vi_js_settings[backgroundColor]")).wpColorPicker({change:a._EPYTA_.demoBackgroundColor});b(a._EPYTA_.escId("vi_js_settings[textColor]")).wpColorPicker({change:a._EPYTA_.demoTextColor});b(a._EPYTA_.escId("vi_js_settings[font]")).on("change",a._EPYTA_.demoFontFamily);b(a._EPYTA_.escId("vi_js_settings[fontSize]")).on("change",a._EPYTA_.demoFontSize);b.ajax({type:"post",dataType:"json",timeout:12000000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_reports_ajax"},success:function(l){if(l.type==="error"||!l.data.mtdReport.length){b(".vi-report-error").removeClass("hide");b(".vi-report").addClass("hide")}else{var n=l.data.mtdReport.map(function(p,o){return{x:moment(p.date,"YYYY-MM-DD").format(),y:p.revenue}});b(".vi-total-earnings-num").text(a._EPYTA_.moneyFormat(l.data.netRevenue));var k=moment(n.length?n[0].x:new Date()).format("MMMM YYYY");var j=document.getElementById("vi-report-canvas").getContext("2d");var m={type:"line",data:{datasets:[{label:k+" Earnings (USD)",backgroundColor:"#1193aa",borderColor:"#1193aa",fill:false,data:n}]},options:{responsive:true,maintainAspectRatio:false,plugins:{deferred:{delay:1000},},title:{display:false},legend:{labels:{fontSize:15,fontColor:"#000000"}},tooltips:{position:"nearest",mode:"index",intersect:false,callbacks:{label:function(o,p){return a._EPYTA_.moneyFormat(o.yLabel)},title:function(o,p){return moment(o[0].xLabel).format("LL")}}},scales:{xAxes:[{type:"time",time:{unit:"day",unitStepSize:1,displayFormats:{day:"MMM DD"}},display:true,scaleLabel:{display:true,labelString:"Date",fontSize:15,fontColor:"#000000"},ticks:{major:{fontStyle:"bold",fontColor:"#000000"}}}],yAxes:[{display:true,scaleLabel:{display:true,labelString:"Revenue",fontSize:15,fontColor:"#000000"},ticks:{callback:function(q,p,o){return a._EPYTA_.moneyFormat(q)}}}]}}};Chart.defaults.global.defaultFontFamily="'Segoe UI', Roboto, 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif";var i=new Chart(j,m)}},error:function(k,i,j){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com")},complete:function(){}});b(".ytvi-btn-logout").on("click",function(){alertify.confirm().set({title:"Logout of Monetize settings",message:"Logging out won't delete your settings. However, it will require you (or any other admins) to re-login to change vi ad settings in the future.<br><br>To actually disable vi ads, make sure the '<strong>vi ads are: On/Off</strong>' button is set to '<strong>Off</strong>.'",onok:function(){b.ajax({type:"post",dataType:"json",timeout:12000000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_logout_ajax"},success:function(i){if(i.type==="error"){alertify.alert(i.message)}else{location.href=i.url}},error:function(k,i,j){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com")},complete:function(){}})}}).show()})}b(".ytvi-btn-toggle").on("click",function(){var i=b(this);alertify.confirm().set({title:(i.hasClass("ytvi-btn-active")?"Turn off":"Turn on")+" your vi ads",message:i.hasClass("ytvi-btn-active")?"Are you sure you would like to deactivate your video ads? Please note that your ads will no longer appear on the front end and your revenue will be paused. If you would like them to reappear later, simply click on this button again.":"Click OK to confirm turning on your vi ads. They will appear on your site according to your <strong>Placement</strong> settings.",onok:function(){b.ajax({type:"post",dataType:"json",timeout:12000000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_toggle_ajax"},success:function(j){if(j.type==="error"){alertify.alert(j.message)}else{i.find("strong").text(j.button_text);i.toggleClass("ytvi-btn-active ytvi-btn-inactive")}},error:function(l,j,k){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com")},complete:function(){}})}}).show()});b(".ytvi-intro-video-modal").on("click",function(k){k.preventDefault();var i=Math.min(document.body.clientWidth*0.8,800);var j=9/16*i;alertify.YoutubeDialog("BcrNPnWUkVI").set({frameless:true,resizeable:true}).resizeTo(i,j)});b("#vi_show_gdpr_authorization").on("change",function(){if(b(this).is(":checked")){b(".opt_vi_show_privacy_button").show(300)}else{b(".opt_vi_show_privacy_button").hide(300)}});if(b(".wrap-ytprefs-onboarding").length){b(".ytprefs-ob-nav-close").on("click",function(){a.parent.tb_remove();a.top.location.reload()});b(".ytprefs-ob-nav-prev").on("click",function(){a._EPYTA_.onboardPrev(b(this).closest(".ytprefs-ob-step"))});b(".ytprefs-ob-filter li").hover(function(){var i="."+b(this).find('input[type="checkbox"]').data("obfilter")+"-icon";b(i).addClass("yob-icon-visible")},function(){var i="."+b(this).find('input[type="checkbox"]').data("obfilter")+"-icon";b(i).removeClass("yob-icon-visible")});b('.ytprefs-ob-filter input[type="checkbox"]').on("change",function(){var i=b(this);var j=i.data("obfilter");var k=b('.ytprefs-ob-filter input[type="checkbox"]:checked');if(k.length&&!(k.length===1&&k.is('[data-obfilter="yob-monetize"]'))){b(".ytprefs-ob-step1 .ytprefs-ob-nav-next").prop("disabled",false)}else{b(".ytprefs-ob-step1 .ytprefs-ob-nav-next").prop("disabled",true)}if(j=="yob-monetize"){b(".ytprefs-ob-step3 .ytprefs-ob-nav-ultimate, .ytprefs-ob-step3 .ytprefs-ob-nav-penultimate").toggleClass("ytprefs-ob-nav-hide")}else{if(i.is(":checked")){b(".ytprefs-ob-step2 ."+j).addClass(j+"-visible")}else{b(".ytprefs-ob-step2 ."+j).removeClass(j+"-visible")}}});b(".ytprefs-ob-step1 .ytprefs-ob-nav-next").on("click",function(){a._EPYTA_.onboardNext(b(this).closest(".ytprefs-ob-step"))});b("#form-onboarding").on("submit",function(k){k.preventDefault();(a.tinyMCE||a.tinymce).triggerSave();var i=b(this);i.find(".ytprefs-ob-nav-next").prop("disabled",true);var j=i.ytprefsFormJSON();j.security=a._EPYTA_.security;b.ajax({type:"post",dataType:"json",timeout:30000,url:a._EPYTA_?a._EPYTA_.wpajaxurl:ajaxurl,data:j,success:function(l){if(l.type=="success"){a._EPYTA_.onboardNext(i.closest(".ytprefs-ob-step"))}else{}},error:function(n,l,m){},complete:function(){i.find(".ytprefs-ob-nav-next").prop("disabled",false)}})});b(".ytprefs-ob-step3 .ytprefs-ob-nav-skip").on("click",function(){a._EPYTA_.onboardNext(b(this).closest(".ytprefs-ob-step"))});b("#form-onboarding-apikey").on("submit",function(k){k.preventDefault();var i=b(this);i.find(".ytprefs-ob-nav-next").prop("disabled",true);var j=i.ytprefsFormJSON();j.security=a._EPYTA_.security;b.ajax({type:"post",dataType:"json",timeout:30000,url:a._EPYTA_?a._EPYTA_.wpajaxurl:ajaxurl,data:j,success:function(l){if(l.type=="success"){if(i.find(".ytprefs-ob-nav-ultimate").hasClass("ytprefs-ob-nav-hide")){a._EPYTA_.onboardNext(i.closest(".ytprefs-ob-step"))}else{a.parent.tb_remove();a.top.location.reload()}}else{}},error:function(n,l,m){},complete:function(){i.find(".ytprefs-ob-nav-next").prop("disabled",false)}})})}});b(a).on("load",function(){if(_EPYTA_.onboarded!="1"){b(".ytprefs-onboarding-launch").click()}})})(window,jQuery);
1
 
2
+ (function(a,b){a._EPYTA_.widen_ytprefs_wiz=a._EPYTA_.widen_ytprefs_wiz||function(){setTimeout(function(){var c=Math.min(950,b(a).width()-100);var d=-1*c/2;b("#TB_window").addClass("epyt-thickbox").animate({marginLeft:d,width:c},150,"swing",function(){b("#TB_window").get(0).style.setProperty("width",c,"important")});b("#TB_overlay").addClass("epyt-thickbox");b("#TB_window iframe").animate({width:c},150)},750)};a._EPYTA_.ytvi_cancel=a._EPYTA_.ytvi_cancel||function(){b(".ytvi-step").hide("fade",{},500,function(){b(".ytvi-step-1").show("fade",{},500)})};a._EPYTA_.moneyFormat=a._EPYTA_.moneyFormat||function(c){return"$"+parseFloat(c).toFixed(2)};a._EPYTA_.escId=function(c){return"#"+c.replace(/(:|\.|\[|\]|,|=|@)/g,"\\$1")};a._EPYTA_.demoBackgroundColor=function(c,d){setTimeout(function(){b(".vi-story-demo--info").css("background-color",b(a._EPYTA_.escId("vi_js_settings[backgroundColor]")).val())},0)};a._EPYTA_.demoTextColor=function(c,d){setTimeout(function(){b(".vi-story-demo--info *").css("color",b(a._EPYTA_.escId("vi_js_settings[textColor]")).val())},0)};a._EPYTA_.demoFontFamily=function(){b(".vi-story-demo--title").css("font-family",b(a._EPYTA_.escId("vi_js_settings[font]")).val())};a._EPYTA_.demoFontSize=function(){b(".vi-story-demo--title").css("font-size",b(a._EPYTA_.escId("vi_js_settings[fontSize]")).val()+"px")};a._EPYTA_.onboardNext=function(c){b(".ytprefs-ob-step").removeClass("active-step");setTimeout(function(){a.scrollTo(0,0);c.next().addClass("active-step")},600)};a._EPYTA_.onboardPrev=function(c){b(".ytprefs-ob-step").removeClass("active-step");setTimeout(function(){a.scrollTo(0,0);c.prev().addClass("active-step")},600)};a._EPYTA_.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)}}};a._EPYTA_.adstxtLookup=function(){a._EPYTA_.adstxtLoading(true);b.ajax({url:location.protocol+"//"+location.hostname+"/ads.txt?c="+Date.now(),dataType:"text",type:"get",data:"",headers:{"Cache-Control":"no-cache"},async:true}).always(function(c,h,f){if(h==="success"){var d=f;var e=c;switch(d.status){case 200:case 301:case 302:case 304:case 307:a._EPYTA_.adstxtVerify(e);break;default:a._EPYTA_.adstxtVerify("");break}}else{var d=c;var g=f;if(d.status==404){b.ajax({url:location.protocol+"//"+location.hostname+"/ads.txt",dataType:"text",type:"get",data:"",headers:{"Cache-Control":"no-cache"},async:true}).always(function(i,m,l){if(m==="success"){var j=l;var k=i;switch(j.status){case 200:case 301:case 302:case 304:case 307:a._EPYTA_.adstxtVerify(k);break;default:a._EPYTA_.adstxtVerify("");break}}else{a._EPYTA_.adstxtVerify("")}})}else{a._EPYTA_.adstxtVerify("")}}})};a._EPYTA_.adstxtVerify=function(c){b.ajax({type:"post",dataType:"json",timeout:120000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_adstxt_status_soft_ajax",current_adstxt:c},success:function(d){if(d.code==2){b(".nav-tab-adstxt").addClass("nav-tab-valid")}else{if(d.code<=0){b(".nav-tab-adstxt").addClass("nav-tab-invalid")}}b(".adstxt-verify-message").html(d.message)},error:function(f,d,e){b(".nav-tab-adstxt").addClass("nav-tab-invalid");b(".adstxt-verify-message").html("Could not validate ads.txt: "+e)},complete:function(){a._EPYTA_.adstxtLoading(false)}})};a._EPYTA_.adstxtLoading=function(c){if(c){b(".nav-tab-adstxt").addClass("nav-tab-loading")}else{b(".nav-tab-adstxt").removeClass("nav-tab-loading")}};a._EPYTA_.gbPreviewSetup=function(){a._EPADashboard_.loadYTAPI();a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API GB");a._EPADashboard_.pageReady();jQuery("body").fitVidsEP()};a._EPYTA_.iabAdd=function(e,d,c){var f=b('<div class="iab-cat-tag-button" data-tag="'+e+'">'+c+" : "+d+" &times;</div>");b(".iab-cat-tags-display").append(f);b(".iab-cat-tags-display .iab-cat-tag-button").sort(function(h,g){return b(h).text()>b(g).text()?1:-1}).appendTo(".iab-cat-tags-display")};b.fn.ytprefsFormJSON=function(){var d={};var c=this.serializeArray();b.each(c,function(){if(d[this.name]){if(!d[this.name].push){d[this.name]=[d[this.name]]}d[this.name].push(this.value||"")}else{d[this.name]=this.value||""}});return d};b(document).ready(function(){if(a.location.toString().indexOf("https://")===0){a._EPYTA_.wpajaxurl=a._EPYTA_.wpajaxurl.replace("http://","https://")}var g=a.addEventListener?"addEventListener":"attachEvent";var e=a[g];var d=g==="attachEvent"?"onmessage":"message";e(d,function(k){var i="";try{if(k.data.indexOf("youtubeembedplus")===0&&k.data.indexOf("clientId=")<0){i=k.data.split("|")[1];if(i.indexOf("[")!==0){i="<p>"+i+"</p>"}if(a.tinyMCE!==null&&a.tinyMCE.activeEditor!==null&&!a.tinyMCE.activeEditor.isHidden()){if(a._EPYTA_.mceBookmark){try{a.tinyMCE.activeEditor.selection.moveToBookmark(a._EPYTA_.mceBookmark)}catch(j){}}if(typeof a.tinyMCE.execInstanceCommand!=="undefined"){a.tinyMCE.execInstanceCommand(a.tinyMCE.activeEditor.id,"mceInsertContent",false,i)}else{send_to_editor(i)}setTimeout(function(){a._EPYTA_.mceBookmark=null},500)}else{i=i.replace("<p>","\n").replace("</p>","\n");if(typeof QTags.insertContent==="function"){QTags.insertContent(i)}else{send_to_editor(i)}}tb_remove()}}catch(j){}},false);b("body").on("click.tbyt","#ytprefs_wiz_button, .ytprefs_wiz_button_widget_text, .ytprefs-onboarding-launch",function(){a._EPYTA_.widen_ytprefs_wiz()});b("body").on("click.tbyt","#ytprefs_wiz_button_vi, .ytprefs_wiz_button_vi_widget_text",function(){send_to_editor("<p>[embed-vi-ad]</p>")});b(a).resize(a._EPYTA_.widen_ytprefs_wiz);b(document).on("wp-before-tinymce-init.ytprefs-media_button",function(i,j){$media_buttons=b(j.selector).closest(".wp-editor-wrap").find(".wp-media-buttons");if(!$media_buttons.find(".ytprefs_media_link").length){$media_buttons.append('<a href="'+encodeURI(a._EPYTA_.wizhref)+'" class="thickbox button ytprefs_media_link ytprefs_wiz_button_widget_text" title="Visual YouTube Search Tool and Wizard - For easier embedding"><span></span> YouTube</a>');if(a._EPYTA_.manage_options&&a._EPYTA_.vi_logged_in){$media_buttons.append('<a class="button ytprefs_vi_embed_shortcode" id="ytprefs_wiz_button_vi" title="Embed vi video ad"><span></span> Video Ad</a>')}}});if(b(".wrap-vi-settings").length){a._EPYTA_.adstxtLookup()}b('.wrap section a[href^="#jump"]').on("click",function(j){j.preventDefault();var i=b(this).attr("href");b('.nav-tab-wrapper a[href="'+i+'"]').click()});b(".ytprefs-ajax-form").on("keypress",function(i){if(i.which==13){i.preventDefault();b(this).find(".ytprefs-ajax-form--submit:not([disabled])").click()}});b(a).on("hashchange",function(){if(a.location.hash.length>0){$section=b("section"+a.location.hash);if($section.length>0){$section.find("h2").addClass("ytvi-hash-scroll");setTimeout(function(){$section.find("h2").removeClass("ytvi-hash-scroll")},2000)}$jumper=b(".jumper"+a.location.hash);if($jumper.length>0){b(".jumper"+a.location.hash+" + h3.sect").addClass("ytvi-hash-scroll");setTimeout(function(){b(".jumper"+a.location.hash+" + h3.sect").removeClass("ytvi-hash-scroll")},2000)}}});b(".vi-cover-prompt-no").on("click",function(){b.ajax({type:"post",dataType:"json",timeout:120000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_hide_feature_ajax"},success:function(i){if(!i||i.type==="error"){alertify.alert(i.message)}else{if(a!=a.top){a.location.reload()}else{a.top.location.href=i.url}}},error:function(k,i,j){alertify.alert('Sorry, there was a network error. Please try again, or turn off this feature using the "Hide Monetize Feature" checkbox on the "Defaults" tab of the YouTube settings. If the issue persists, please contact ext@embedplus.com')},complete:function(){}})});b(".vi-cover-prompt-yes").on("click",function(){b(".vi-cover-prompt, .vi-cover-clear").fadeOut(500);var i=new Date();i.setTime(i.getTime()+(365*24*60*60*1000));document.cookie="vi_cover_prompt_yes=1;expires="+i.toUTCString()+";path="+a._EPYTA_.admin_url});b(".vi-cover-prompt-maybe").on("click",function(){var i=new Date();i.setTime(i.getTime()+(365*24*60*60*1000));document.cookie="vi_cover_prompt_yes=1;expires="+i.toUTCString()+";path="+a._EPYTA_.admin_url;if(a!=a.top){a.location.reload()}else{a.top.location.href=a._EPYTA_.admin_url_ytprefs}});if(b(".vi-demo-screen").length>1){var f=setInterval(function(){b(".vi-demo-screen-2").toggleClass("demo-hide");b(".vi-demo-mobile-caption").toggleClass("demo-hide")},20000)}b(".ytvi-step-1--submit-register").on("click",function(i){var j=b.trim(b(".ytvi-register-email").val());if(!j.length){alertify.alert("Please enter your email address.")}else{b(".ytvi-step-1--submit-register").prop("disabled",true);b(".ytvi-step-1").hide("fade",{},500,function(){b(".ytvi-step-2-loading").show("fade",{},500,function(){b.ajax({type:"post",dataType:"json",timeout:120000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_cache_endpoints_ajax",email:j,domain:a.location.href},success:function(k){if(k.type=="success"){b(".ytvi-step-2 .ytvi-registration iframe").attr("src",k.signupURLParams);setTimeout(function(){b(".ytvi-step-2-loading").hide("fade",{},500,function(){b(".ytvi-step-2").show("fade",{},500)})},3000);var m=new Date(),l=new Date();l.setTime(l.getTime()+(365*24*60*60*1000));document.cookie="vi_signup_attempt="+m.toUTCString()+";expires="+l.toUTCString()+";path="+a._EPYTA_.admin_url}else{if(k.type==="error"){alertify.alert(k.message);a._EPYTA_.ytvi_cancel()}}},error:function(m,k,l){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com");a._EPYTA_.ytvi_cancel()},complete:function(){b(".ytvi-step-1--submit-register").prop("disabled",false)}})})})}});b(".ytvi-registration--cancel").on("click",function(){a._EPYTA_.ytvi_cancel()});b(".ytvi-step-1--confirm").on("change",function(){if(b(this).is(":checked")){b(".ytvi-step-1--submit-register").prop("disabled",false)}else{b(".ytvi-step-1--submit-register").prop("disabled",true)}});b(".ytvi-step-1--submit-login").on("click",function(k){var l=b.trim(b(".ytvi-login-email").val());var i=b.trim(b(".ytvi-password").val());var j="";j+=l.length?"":"Please enter your email address. ";j+=i.length?"":"Please enter your vi dashboard password.";if(j.length){alertify.alert(j)}else{b(".ytvi-step-1--submit-login").prop("disabled",true);b(".ytvi-step-1").hide("fade",{},500,function(){b(".ytvi-login-loading").show("fade",{},500,function(){b.ajax({type:"post",dataType:"json",timeout:12000000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_login_ajax",email:l,password:i},success:function(m){if(m.type==="error"){alertify.alert(m.message);a._EPYTA_.ytvi_cancel()}else{b(".ytvi-login-loading").hide("fade",{},500,function(){document.cookie="vi_signup_attempt=; expires=Thu, 01 Jan 1970 00:00:01 GMT;";b(".ytvi-login-success-message").html(m.message);b(".ytvi-login-success").show("fade",{},500,function(){})})}},error:function(o,m,n){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com");a._EPYTA_.ytvi_cancel()},complete:function(){b(".ytvi-step-1--submit-login").prop("disabled",false)}})})})}});b("a.vi-logged-in-goto").each(function(){if(b(this).attr("href").indexOf(a.location.pathname+a.location.search)>0||a.location.search.indexOf("youtube-my-preferences")>0){b(this).removeAttr("target")}});if(b(".wrap-vi-settings").length){b(".vi-how-works").on("click",function(){var i=b(this).data("jump");b('.nav-tab-wrapper > a[href="'+i+'"]').click()});b(document).on("click",".wrap-vi-settings .nav-tab-wrapper a",function(){$a=b(this);b(".wrap-vi-settings .nav-tab-wrapper a").removeClass("nav-tab-active");$a.addClass("nav-tab-active");b(".wrap-vi-settings section").hide();b(".wrap-vi-settings section").filter($a.attr("href")).fadeIn(200);return false});var c=b(".iab-cat-tags").val();if(c.length>0){var h=c.split(",");h.forEach(function(k){var j=b('.iab-cat-child option[value="'+k+'"]').text();var i=b('.iab-cat-parent option[value="'+(k.split("-")[0])+'"]').text();a._EPYTA_.iabAdd(k,j,i)})}b(".iab-cat-parent").on("change",function(){var i=b(this).val();b(".iab-cat-child").val(i);if(i==""){b(".iab-cat-child-box").addClass("hidden");b(".iab-cat-child-box select").prop("disabled",true)}else{b(".iab-cat-child-box").removeClass("hidden");b(".iab-cat-child-box select").prop("disabled",false);b(".iab-cat-child option").addClass("hidden");b('.iab-cat-child option[value^="'+i+'-"], .iab-cat-child option[value="'+i+'"], .iab-cat-child option[value=""]').removeClass("hidden");b(".iab-cat-child-box select").val("")}});b(".iab-cat-child").on("change",function(){var l=b(".iab-cat-tags").val()?b(".iab-cat-tags").val().split(","):[];if(l.length<4){var k=b(this).val();var j=b(this).find("option:selected").text();var i=b(".iab-cat-parent").find("option:selected").text();if(k&&l.indexOf(k)==-1){l.push(k);b(".iab-cat-tags").val(l.join(","));a._EPYTA_.iabAdd(k,j,i)}}else{alertify.alert("You can choose up to 4 categories maximum. In order to add a new one, you must remove one of the existing ones.")}});b(".iab-cat-tags-display").on("click",".iab-cat-tag-button",function(){var i=b(this);var j=i.data("tag");var k=b(".iab-cat-tags").val()?b(".iab-cat-tags").val().split(","):[];k=k.filter(function(l){return l!=j});b(".iab-cat-tags").val(k.join(","));i.remove()});a._EPYTA_.demoBackgroundColor();a._EPYTA_.demoTextColor();a._EPYTA_.demoFontFamily();a._EPYTA_.demoFontSize();b(a._EPYTA_.escId("vi_js_settings[backgroundColor]")).wpColorPicker({change:a._EPYTA_.demoBackgroundColor});b(a._EPYTA_.escId("vi_js_settings[textColor]")).wpColorPicker({change:a._EPYTA_.demoTextColor});b(a._EPYTA_.escId("vi_js_settings[font]")).on("change",a._EPYTA_.demoFontFamily);b(a._EPYTA_.escId("vi_js_settings[fontSize]")).on("change",a._EPYTA_.demoFontSize);b.ajax({type:"post",dataType:"json",timeout:12000000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_reports_ajax"},success:function(l){if(l.type==="error"||!l.data.mtdReport.length||typeof(l.data.mtdReport[0].date)==="undefined"){b(".vi-report-error").removeClass("hide");b(".vi-report").addClass("hide")}else{var n=l.data.mtdReport.map(function(p,o){return{x:moment(p.date,"YYYY-MM-DD").format(),y:p.revenue}});b(".vi-total-earnings-num").text(a._EPYTA_.moneyFormat(l.data.netRevenue));var k=moment(n.length?n[0].x:new Date()).format("MMMM YYYY");var j=document.getElementById("vi-report-canvas").getContext("2d");var m={type:"line",data:{datasets:[{label:k+" Earnings (USD)",backgroundColor:"#1193aa",borderColor:"#1193aa",fill:false,data:n}]},options:{responsive:true,maintainAspectRatio:false,plugins:{deferred:{delay:1000},},title:{display:false},legend:{labels:{fontSize:15,fontColor:"#000000"}},tooltips:{position:"nearest",mode:"index",intersect:false,callbacks:{label:function(o,p){return a._EPYTA_.moneyFormat(o.yLabel)},title:function(o,p){return moment(o[0].xLabel).format("LL")}}},scales:{xAxes:[{type:"time",time:{unit:"day",unitStepSize:1,displayFormats:{day:"MMM DD"}},display:true,scaleLabel:{display:true,labelString:"Date",fontSize:15,fontColor:"#000000"},ticks:{major:{fontStyle:"bold",fontColor:"#000000"}}}],yAxes:[{display:true,scaleLabel:{display:true,labelString:"Revenue",fontSize:15,fontColor:"#000000"},ticks:{callback:function(q,p,o){return a._EPYTA_.moneyFormat(q)}}}]}}};Chart.defaults.global.defaultFontFamily="'Segoe UI', Roboto, 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif";var i=new Chart(j,m)}},error:function(k,i,j){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com")},complete:function(){}});b(".ytvi-btn-logout").on("click",function(){var j="";var i=b(".iab-cat-tags").val();if(i.length>0&&i.split(",").length>1){j=" (Note: If you selected more than one video category, you must stay logged in to this settings page for your categories to automatically add variety to your ads)"}alertify.confirm().set({title:"Logout of Monetize settings",message:"Logging out won't delete your settings. However, it will require you or any other admins to re-login to change vi ad settings in the future"+j+".<br><br>To actually disable monetization, make sure the '<strong>vi ads are: On/Off</strong>' button is set to '<strong>Off</strong>.'",onok:function(){b.ajax({type:"post",dataType:"json",timeout:12000000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_logout_ajax"},success:function(k){if(k.type==="error"){alertify.alert(k.message)}else{location.href=k.url}},error:function(m,k,l){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com")},complete:function(){}})}}).show()})}b(".ytvi-btn-toggle").on("click",function(){var i=b(this);alertify.confirm().set({title:(i.hasClass("ytvi-btn-active")?"Turn off":"Turn on")+" your vi ads",message:i.hasClass("ytvi-btn-active")?"Are you sure you would like to deactivate your video ads? Please note that your ads will no longer appear on the front end and your revenue will be paused. If you would like them to reappear later, simply click on this button again.":"Click OK to confirm turning on your vi ads. They will appear on your site according to your <strong>Placement</strong> settings.",onok:function(){b.ajax({type:"post",dataType:"json",timeout:12000000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_toggle_ajax"},success:function(j){if(j.type==="error"){alertify.alert(j.message)}else{i.find("strong").text(j.button_text);i.toggleClass("ytvi-btn-active ytvi-btn-inactive");if(i.hasClass("ytvi-btn-active")){b(".ytvi-msg-congrats").show(200)}else{b(".ytvi-msg-congrats").hide()}}},error:function(l,j,k){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com")},complete:function(){}})}}).show()});b(".ytvi-intro-video-modal").on("click",function(k){k.preventDefault();var i=Math.min(document.body.clientWidth*0.8,800);var j=9/16*i;alertify.YoutubeDialog("BcrNPnWUkVI").set({frameless:true,resizeable:true}).resizeTo(i,j)});b("#vi_show_gdpr_authorization").on("change",function(){if(b(this).is(":checked")){b(".opt_vi_show_privacy_button").show(300)}else{b(".opt_vi_show_privacy_button").hide(300)}});if(b(".wrap-ytprefs-onboarding").length){b(".ytprefs-ob-nav-close").on("click",function(){a.parent.tb_remove();a.top.location.reload()});b(".ytprefs-ob-nav-prev").on("click",function(){a._EPYTA_.onboardPrev(b(this).closest(".ytprefs-ob-step"))});b(".ytprefs-ob-filter li").hover(function(){var i="."+b(this).find('input[type="checkbox"]').data("obfilter")+"-icon";b(i).addClass("yob-icon-visible")},function(){var i="."+b(this).find('input[type="checkbox"]').data("obfilter")+"-icon";b(i).removeClass("yob-icon-visible")});b('.ytprefs-ob-filter input[type="checkbox"]').on("change",function(){var i=b(this);var j=i.data("obfilter");var k=b('.ytprefs-ob-filter input[type="checkbox"]:checked');if(k.length&&!(k.length===1&&k.is('[data-obfilter="yob-monetize"]'))){b(".ytprefs-ob-step1 .ytprefs-ob-nav-next").prop("disabled",false)}else{b(".ytprefs-ob-step1 .ytprefs-ob-nav-next").prop("disabled",true)}if(j=="yob-monetize"){b(".ytprefs-ob-step3 .ytprefs-ob-nav-ultimate, .ytprefs-ob-step3 .ytprefs-ob-nav-penultimate").toggleClass("ytprefs-ob-nav-hide")}else{if(i.is(":checked")){b(".ytprefs-ob-step2 ."+j).addClass(j+"-visible")}else{b(".ytprefs-ob-step2 ."+j).removeClass(j+"-visible")}}});b(".ytprefs-ob-step1 .ytprefs-ob-nav-next").on("click",function(){a._EPYTA_.onboardNext(b(this).closest(".ytprefs-ob-step"))});b("#form-onboarding").on("submit",function(k){k.preventDefault();(a.tinyMCE||a.tinymce).triggerSave();var i=b(this);i.find(".ytprefs-ob-nav-next").prop("disabled",true);var j=i.ytprefsFormJSON();j.security=a._EPYTA_.security;b.ajax({type:"post",dataType:"json",timeout:30000,url:a._EPYTA_?a._EPYTA_.wpajaxurl:ajaxurl,data:j,success:function(l){if(l.type=="success"){a._EPYTA_.onboardNext(i.closest(".ytprefs-ob-step"))}else{}},error:function(n,l,m){},complete:function(){i.find(".ytprefs-ob-nav-next").prop("disabled",false)}})});b(".ytprefs-ob-step3 .ytprefs-ob-nav-skip").on("click",function(){a._EPYTA_.onboardNext(b(this).closest(".ytprefs-ob-step"))});b("#form-onboarding-apikey").on("submit",function(k){k.preventDefault();var i=b(this);i.find(".ytprefs-ob-nav-next").prop("disabled",true);var j=i.ytprefsFormJSON();j.security=a._EPYTA_.security;b.ajax({type:"post",dataType:"json",timeout:30000,url:a._EPYTA_?a._EPYTA_.wpajaxurl:ajaxurl,data:j,success:function(l){if(l.type=="success"){if(i.find(".ytprefs-ob-nav-ultimate").hasClass("ytprefs-ob-nav-hide")){a._EPYTA_.onboardNext(i.closest(".ytprefs-ob-step"))}else{a.parent.tb_remove();a.top.location.reload()}}else{}},error:function(n,l,m){},complete:function(){i.find(".ytprefs-ob-nav-next").prop("disabled",false)}})})}});b(a).on("load",function(){if(_EPYTA_.onboarded!="1"){b(".ytprefs-onboarding-launch").click()}})})(window,jQuery);
scripts/ytprefs.js CHANGED
@@ -88,6 +88,11 @@
88
  {
89
  event.target.ponce = true;
90
  }
 
 
 
 
 
91
 
92
  var $gallery = $(ifm).closest('.epyt-gallery');
93
  if (!$gallery.length)
88
  {
89
  event.target.ponce = true;
90
  }
91
+
92
+ if (event.data === window.YT.PlayerState.ENDED && $(ifm).data('relstop') == '1')
93
+ {
94
+ event.target.stopVideo();
95
+ }
96
 
97
  var $gallery = $(ifm).closest('.epyt-gallery');
98
  if (!$gallery.length)
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"};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="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",".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"),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)}}})})}});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"};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"){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",".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"),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)}}})})}});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);
styles/ytprefs-onboarding.css CHANGED
@@ -132,7 +132,7 @@ input.ui-widget[type=text] {
132
  }
133
 
134
  .ytprefs-ob-content {
135
- max-width: 768px;
136
  margin: 0 auto;
137
  }
138
 
@@ -249,3 +249,12 @@ iframe#gdpr_consent_message_ifr {
249
  display: block;
250
  border: 5px solid #dddddd;
251
  }
 
 
 
 
 
 
 
 
 
132
  }
133
 
134
  .ytprefs-ob-content {
135
+ max-width: 800px;
136
  margin: 0 auto;
137
  }
138
 
249
  display: block;
250
  border: 5px solid #dddddd;
251
  }
252
+
253
+ .ytprefs-ob-success {
254
+ color: #00a000;
255
+ font-weight: bold;
256
+ }
257
+
258
+ .ytprefs-ob-success:after {
259
+ content: url('../images/adstxt-valid.png');
260
+ }
styles/ytprefs-onboarding.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}.indent-option{margin-left:25px}.ui-widget,.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:inherit}.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}.ui-widget-content a{color:#0073aa}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}.wrap-ytprefs-onboarding h1{line-height:40px}.wrap-ytprefs-onboarding h2{line-height:2em}.wrap-ytprefs-onboarding .box-vi-not-interested{display:none}.ytprefs-ob-step{position:absolute;visibility:hidden;opacity:0;transition:opacity 300ms,visibility 300ms;width:100%;height:0;top:-200000px}.ytprefs-ob-step.active-step{visibility:visible;opacity:1;height:auto;top:0}.ytprefs-ob-title{font-size:2em;line-height:2em;text-align:center}.ytprefs-ob-subtitle{font-size:1.4em;line-height:2em}.ytprefs-ob-content{max-width:768px;margin:0 auto}.ytprefs-ob-nav{text-align:center;margin-top:20px;padding-top:20px;border-top:2px solid #ddd;clear:both;margin-bottom:50px}.ytprefs-ob-nav .ytprefs-ob-nav-hide{display:none}.ytprefs-ob-nav button.button-secondary,.ytprefs-ob-nav button.button-primary{display:inline-block;margin:0 10px}.ytprefs-ob-nav button.ytprefs-ob-nav-prev,.ytprefs-ob-nav button.ytprefs-ob-nav-close{margin-right:25px}.ytprefs-ob-step1 ul.ytprefs-ob-filter li{margin-bottom:15px}.ytprefs-ob-step1 .ytprefs-hover-icons{width:160px;float:right;margin-left:30px;min-height:200px;position:relative}.ytprefs-ob-step1 .ytprefs-hover-icons img{position:absolute;top:0;left:0;opacity:0;display:block;width:100%;height:auto;transition:opacity 200ms}.ytprefs-ob-step1 .ytprefs-hover-icons img.yob-icon-visible{opacity:1}.ytprefs-ob-step2 .ytprefs-ob-setting{display:none;margin:10px 0 25px 0}.ytprefs-ob-step2 .ytprefs-ob-setting.yob-single-visible,.ytprefs-ob-step2 .ytprefs-ob-setting.yob-gallery-visible,.ytprefs-ob-step2 .ytprefs-ob-setting.yob-standalone-visible,.ytprefs-ob-step2 .ytprefs-ob-setting.yob-privacy-visible,.ytprefs-ob-step2 .ytprefs-ob-setting.yob-live-visible{display:block}.ytprefs-ob-step2 form #responsive ~ #boxresponsive_all{height:0;visibility:none;opacity:0;transition:opacity 300ms,visibility 300ms}.ytprefs-ob-step2 form #responsive:checked ~ #boxresponsive_all{height:auto;visibility:visible;opacity:1}.gdpr-options-left{width:65%;float:left}.gdpr-options-right{width:33%;float:right;margin-top:20px}.gdpr-options-right .img-gdpr-message{width:100%;height:auto}iframe#gdpr_consent_message_ifr{min-height:250px!important}.ytprefs-ob-step4 .ytprefs-ob-content{max-width:100%}.wiztab-screenshots{float:right;max-width:50%;height:auto;clear:right;margin-left:30px;margin-bottom:15px;display:block;border:5px solid #ddd}
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}.indent-option{margin-left:25px}.ui-widget,.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:inherit}.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}.ui-widget-content a{color:#0073aa}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}.wrap-ytprefs-onboarding h1{line-height:40px}.wrap-ytprefs-onboarding h2{line-height:2em}.wrap-ytprefs-onboarding .box-vi-not-interested{display:none}.ytprefs-ob-step{position:absolute;visibility:hidden;opacity:0;transition:opacity 300ms,visibility 300ms;width:100%;height:0;top:-200000px}.ytprefs-ob-step.active-step{visibility:visible;opacity:1;height:auto;top:0}.ytprefs-ob-title{font-size:2em;line-height:2em;text-align:center}.ytprefs-ob-subtitle{font-size:1.4em;line-height:2em}.ytprefs-ob-content{max-width:800px;margin:0 auto}.ytprefs-ob-nav{text-align:center;margin-top:20px;padding-top:20px;border-top:2px solid #ddd;clear:both;margin-bottom:50px}.ytprefs-ob-nav .ytprefs-ob-nav-hide{display:none}.ytprefs-ob-nav button.button-secondary,.ytprefs-ob-nav button.button-primary{display:inline-block;margin:0 10px}.ytprefs-ob-nav button.ytprefs-ob-nav-prev,.ytprefs-ob-nav button.ytprefs-ob-nav-close{margin-right:25px}.ytprefs-ob-step1 ul.ytprefs-ob-filter li{margin-bottom:15px}.ytprefs-ob-step1 .ytprefs-hover-icons{width:160px;float:right;margin-left:30px;min-height:200px;position:relative}.ytprefs-ob-step1 .ytprefs-hover-icons img{position:absolute;top:0;left:0;opacity:0;display:block;width:100%;height:auto;transition:opacity 200ms}.ytprefs-ob-step1 .ytprefs-hover-icons img.yob-icon-visible{opacity:1}.ytprefs-ob-step2 .ytprefs-ob-setting{display:none;margin:10px 0 25px 0}.ytprefs-ob-step2 .ytprefs-ob-setting.yob-single-visible,.ytprefs-ob-step2 .ytprefs-ob-setting.yob-gallery-visible,.ytprefs-ob-step2 .ytprefs-ob-setting.yob-standalone-visible,.ytprefs-ob-step2 .ytprefs-ob-setting.yob-privacy-visible,.ytprefs-ob-step2 .ytprefs-ob-setting.yob-live-visible{display:block}.ytprefs-ob-step2 form #responsive ~ #boxresponsive_all{height:0;visibility:none;opacity:0;transition:opacity 300ms,visibility 300ms}.ytprefs-ob-step2 form #responsive:checked ~ #boxresponsive_all{height:auto;visibility:visible;opacity:1}.gdpr-options-left{width:65%;float:left}.gdpr-options-right{width:33%;float:right;margin-top:20px}.gdpr-options-right .img-gdpr-message{width:100%;height:auto}iframe#gdpr_consent_message_ifr{min-height:250px!important}.ytprefs-ob-step4 .ytprefs-ob-content{max-width:100%}.wiztab-screenshots{float:right;max-width:50%;height:auto;clear:right;margin-left:30px;margin-bottom:15px;display:block;border:5px solid #ddd}.ytprefs-ob-success{color:#00a000;font-weight:bold}.ytprefs-ob-success:after{content:url('../images/adstxt-valid.png')}
styles/ytprefs.css CHANGED
@@ -325,6 +325,7 @@ columns
325
  background: transparent;
326
  -webkit-box-shadow: none;
327
  box-shadow: none;
 
328
  }
329
 
330
 
325
  background: transparent;
326
  -webkit-box-shadow: none;
327
  box-shadow: none;
328
+ margin: 0;
329
  }
330
 
331
 
styles/ytprefs.min.css CHANGED
@@ -1,2 +1,2 @@
1
 
2
- .epyt-debug{cursor:pointer;text-align:left;background-color:#ddd;color:#000}iframe.__youtube_prefs__{border-width:0}.epyt-gallery{text-align:center}.epyt-gallery iframe{margin-bottom:0}.epyt-gallery.epyt-lb iframe{display:none;height:0!important}.epyt-gallery-list{margin:0 -8px 0 -8px;position:relative;transition:opacity ease-out .3s;display:block}.epyt-gallery-list .epyt-gallery-thumb{box-sizing:border-box}.epyt-gallery-list p{display:none}.epyt-gallery-clear{clear:both}.epyt-gallery-list.epyt-loading{opacity:.5;transition:opacity ease-out .3s}.epyt-gallery-thumb{position:relative;box-sizing:border-box;overflow-y:hidden;display:block!important;cursor:pointer;opacity:1;float:left;padding:0 8px 10px 8px;height:auto}.epyt-gallery-thumb.hover{position:relative;opacity:1;transition:opacity ease-out .3s;height:auto}.epyt-gallery-img-box{width:100%}.epyt-gallery-img{height:0;width:100%;padding-top:56.25%!important;position:relative;overflow:hidden!important;background-size:cover!important;background-position:center!important}.epyt-gallery-playhover-textonly{position:absolute;top:-10px;left:0;width:100%;height:100%;text-align:center}.epyt-gallery-playhover{opacity:0;position:absolute;top:-10px;left:0;width:100%;height:100%;vertical-align:middle;text-align:center;transition:opacity ease-out .3s}.epyt-gallery-thumb.hover .epyt-gallery-playhover,.epyt-gallery-thumb.epyt-current-video .epyt-gallery-playhover{opacity:1;top:0;transition:all ease-out .3s}.epyt-gallery-thumb .epyt-gallery-playcrutch{display:inline-block;height:100%;vertical-align:middle;width:0}.epyt-gallery-playhover .epyt-play-img{height:auto!important;max-width:15%!important;padding:0!important;margin:0!important;min-width:30px!important;vertical-align:middle!important;display:inline-block!important;width:auto;border:0;box-sizing:border-box}.epyt-gallery-title{font-size:80%;line-height:120%;padding:10px}.epyt-gallery-notitle{padding:4px}.epyt-gallery-notitle span{display:none}.epyt-gallery-rowtitle{text-align:center;width:100%;position:absolute;left:0;top:100%;opacity:0;z-index:10;overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.epyt-gallery-rowtitle.hover{opacity:1;transition:opacity linear .2s}.epyt-gallery-rowbreak{clear:both}.epyt-pagination{clear:both;text-align:center;padding:10px 8px 10px 8px}.epyt-pagination.epyt-hide-pagination *{display:none!important}.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}body .lity-container{width:100%;max-width:964px}.epyt-curtain .lity-opened iframe{opacity:0;transition:opacity .3s linear .5s}.epyt-gallery-allthumbs.epyt-cols-1 .epyt-gallery-thumb{width:100%}.epyt-gallery-allthumbs.epyt-cols-2 .epyt-gallery-thumb{width:50%}.epyt-gallery-allthumbs.epyt-cols-3 .epyt-gallery-thumb{width:33.333%}.epyt-gallery-allthumbs.epyt-cols-4 .epyt-gallery-thumb{width:25%}.epyt-gallery-allthumbs.epyt-cols-5 .epyt-gallery-thumb{width:20%}.epyt-gallery-allthumbs.epyt-cols-6 .epyt-gallery-thumb{width:16.666%}.epyt-gallery-allthumbs.epyt-cols-7 .epyt-gallery-thumb{width:14.285%}.epyt-gallery-allthumbs.epyt-cols-8 .epyt-gallery-thumb{width:12.5%}.epyt-gallery-allthumbs.epyt-cols-9 .epyt-gallery-thumb{width:11.111%}.epyt-gallery-allthumbs.epyt-cols-10 .epyt-gallery-thumb{width:10%}.epyt-gallery-allthumbs.epyt-cols-11 .epyt-gallery-thumb{width:9.090%}.epyt-gallery-allthumbs.epyt-cols-12 .epyt-gallery-thumb{width:8.333%}.epyt-gallery-allthumbs.epyt-cols-13 .epyt-gallery-thumb{width:7.692%}.epyt-gallery-allthumbs.epyt-cols-14 .epyt-gallery-thumb{width:7.142%}.epyt-gallery-allthumbs.epyt-cols-15 .epyt-gallery-thumb{width:6.666%}.epyt-gallery-allthumbs.epyt-cols-16 .epyt-gallery-thumb{width:6.25%}.epyt-gallery-allthumbs.epyt-cols-17 .epyt-gallery-thumb{width:5.882%}.epyt-gallery-allthumbs.epyt-cols-18 .epyt-gallery-thumb{width:5.555%}.epyt-gallery-allthumbs.epyt-cols-19 .epyt-gallery-thumb{width:5.263%}.epyt-gallery-allthumbs.epyt-cols-20 .epyt-gallery-thumb{width:5%}.epyt-pagebutton.hide,.epyt-pagenumbers.hide{display:none!important;opacity:0!important;visibility:hidden!important}.epyt-gallery-subscribe{text-align:center;padding:15px 0 10px 0;clear:both}.epyt-gallery-subscribe a.epyt-gallery-subbutton,.epyt-gallery-subscribe a.epyt-gallery-subbutton:hover{display:inline-block;padding:5px 10px;background-color:#e62117!important;color:#fff!important;text-decoration:none!important;border-radius:3px}.epyt-gallery-subscribe a.epyt-gallery-subbutton img{width:20px!important;height:auto!important;vertical-align:middle!important;padding:0 6px 3px 0;display:inline-block;background:transparent;-webkit-box-shadow:none;box-shadow:none}body div.__youtube_prefs__.__youtube_prefs_gdpr__{background-color:#000;background-image:-webkit-linear-gradient(top,#000,#444);background-image:linear-gradient(to bottom,#000,#444);padding:25px;height:auto;text-align:left}body div.__youtube_prefs__.__youtube_prefs_gdpr__ *{color:#e3e3e3!important}body div.__youtube_prefs__.__youtube_prefs_gdpr__ a{text-decoration:underline}body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__,body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__:hover{display:inline-block;padding:5px 10px;background:#e62117!important;color:#fff!important;text-decoration:none!important;border-radius:3px;font-weight:normal;border-width:0;box-sizing:border-box}body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__ img{width:20px!important;height:auto!important;vertical-align:middle!important;padding:0 6px 3px 0;display:inline-block;background:transparent;-webkit-box-shadow:none;box-shadow:none;margin-left:8px}body .epyt-gallery-img-gdpr{background-color:#000;background-image:-webkit-linear-gradient(top,#000,#444);background-image:linear-gradient(to bottom,#000,#444)}.ytvi-story-container{display:block;max-width:100%}
1
 
2
+ .epyt-debug{cursor:pointer;text-align:left;background-color:#ddd;color:#000}iframe.__youtube_prefs__{border-width:0}.epyt-gallery{text-align:center}.epyt-gallery iframe{margin-bottom:0}.epyt-gallery.epyt-lb iframe{display:none;height:0!important}.epyt-gallery-list{margin:0 -8px 0 -8px;position:relative;transition:opacity ease-out .3s;display:block}.epyt-gallery-list .epyt-gallery-thumb{box-sizing:border-box}.epyt-gallery-list p{display:none}.epyt-gallery-clear{clear:both}.epyt-gallery-list.epyt-loading{opacity:.5;transition:opacity ease-out .3s}.epyt-gallery-thumb{position:relative;box-sizing:border-box;overflow-y:hidden;display:block!important;cursor:pointer;opacity:1;float:left;padding:0 8px 10px 8px;height:auto}.epyt-gallery-thumb.hover{position:relative;opacity:1;transition:opacity ease-out .3s;height:auto}.epyt-gallery-img-box{width:100%}.epyt-gallery-img{height:0;width:100%;padding-top:56.25%!important;position:relative;overflow:hidden!important;background-size:cover!important;background-position:center!important}.epyt-gallery-playhover-textonly{position:absolute;top:-10px;left:0;width:100%;height:100%;text-align:center}.epyt-gallery-playhover{opacity:0;position:absolute;top:-10px;left:0;width:100%;height:100%;vertical-align:middle;text-align:center;transition:opacity ease-out .3s}.epyt-gallery-thumb.hover .epyt-gallery-playhover,.epyt-gallery-thumb.epyt-current-video .epyt-gallery-playhover{opacity:1;top:0;transition:all ease-out .3s}.epyt-gallery-thumb .epyt-gallery-playcrutch{display:inline-block;height:100%;vertical-align:middle;width:0}.epyt-gallery-playhover .epyt-play-img{height:auto!important;max-width:15%!important;padding:0!important;margin:0!important;min-width:30px!important;vertical-align:middle!important;display:inline-block!important;width:auto;border:0;box-sizing:border-box}.epyt-gallery-title{font-size:80%;line-height:120%;padding:10px}.epyt-gallery-notitle{padding:4px}.epyt-gallery-notitle span{display:none}.epyt-gallery-rowtitle{text-align:center;width:100%;position:absolute;left:0;top:100%;opacity:0;z-index:10;overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.epyt-gallery-rowtitle.hover{opacity:1;transition:opacity linear .2s}.epyt-gallery-rowbreak{clear:both}.epyt-pagination{clear:both;text-align:center;padding:10px 8px 10px 8px}.epyt-pagination.epyt-hide-pagination *{display:none!important}.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}body .lity-container{width:100%;max-width:964px}.epyt-curtain .lity-opened iframe{opacity:0;transition:opacity .3s linear .5s}.epyt-gallery-allthumbs.epyt-cols-1 .epyt-gallery-thumb{width:100%}.epyt-gallery-allthumbs.epyt-cols-2 .epyt-gallery-thumb{width:50%}.epyt-gallery-allthumbs.epyt-cols-3 .epyt-gallery-thumb{width:33.333%}.epyt-gallery-allthumbs.epyt-cols-4 .epyt-gallery-thumb{width:25%}.epyt-gallery-allthumbs.epyt-cols-5 .epyt-gallery-thumb{width:20%}.epyt-gallery-allthumbs.epyt-cols-6 .epyt-gallery-thumb{width:16.666%}.epyt-gallery-allthumbs.epyt-cols-7 .epyt-gallery-thumb{width:14.285%}.epyt-gallery-allthumbs.epyt-cols-8 .epyt-gallery-thumb{width:12.5%}.epyt-gallery-allthumbs.epyt-cols-9 .epyt-gallery-thumb{width:11.111%}.epyt-gallery-allthumbs.epyt-cols-10 .epyt-gallery-thumb{width:10%}.epyt-gallery-allthumbs.epyt-cols-11 .epyt-gallery-thumb{width:9.090%}.epyt-gallery-allthumbs.epyt-cols-12 .epyt-gallery-thumb{width:8.333%}.epyt-gallery-allthumbs.epyt-cols-13 .epyt-gallery-thumb{width:7.692%}.epyt-gallery-allthumbs.epyt-cols-14 .epyt-gallery-thumb{width:7.142%}.epyt-gallery-allthumbs.epyt-cols-15 .epyt-gallery-thumb{width:6.666%}.epyt-gallery-allthumbs.epyt-cols-16 .epyt-gallery-thumb{width:6.25%}.epyt-gallery-allthumbs.epyt-cols-17 .epyt-gallery-thumb{width:5.882%}.epyt-gallery-allthumbs.epyt-cols-18 .epyt-gallery-thumb{width:5.555%}.epyt-gallery-allthumbs.epyt-cols-19 .epyt-gallery-thumb{width:5.263%}.epyt-gallery-allthumbs.epyt-cols-20 .epyt-gallery-thumb{width:5%}.epyt-pagebutton.hide,.epyt-pagenumbers.hide{display:none!important;opacity:0!important;visibility:hidden!important}.epyt-gallery-subscribe{text-align:center;padding:15px 0 10px 0;clear:both}.epyt-gallery-subscribe a.epyt-gallery-subbutton,.epyt-gallery-subscribe a.epyt-gallery-subbutton:hover{display:inline-block;padding:5px 10px;background-color:#e62117!important;color:#fff!important;text-decoration:none!important;border-radius:3px}.epyt-gallery-subscribe a.epyt-gallery-subbutton img{width:20px!important;height:auto!important;vertical-align:middle!important;padding:0 6px 3px 0;display:inline-block;background:transparent;-webkit-box-shadow:none;box-shadow:none;margin:0}body div.__youtube_prefs__.__youtube_prefs_gdpr__{background-color:#000;background-image:-webkit-linear-gradient(top,#000,#444);background-image:linear-gradient(to bottom,#000,#444);padding:25px;height:auto;text-align:left}body div.__youtube_prefs__.__youtube_prefs_gdpr__ *{color:#e3e3e3!important}body div.__youtube_prefs__.__youtube_prefs_gdpr__ a{text-decoration:underline}body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__,body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__:hover{display:inline-block;padding:5px 10px;background:#e62117!important;color:#fff!important;text-decoration:none!important;border-radius:3px;font-weight:normal;border-width:0;box-sizing:border-box}body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__ img{width:20px!important;height:auto!important;vertical-align:middle!important;padding:0 6px 3px 0;display:inline-block;background:transparent;-webkit-box-shadow:none;box-shadow:none;margin-left:8px}body .epyt-gallery-img-gdpr{background-color:#000;background-image:-webkit-linear-gradient(top,#000,#444);background-image:linear-gradient(to bottom,#000,#444)}.ytvi-story-container{display:block;max-width:100%}
styles/ytvi-admin.css CHANGED
@@ -654,4 +654,28 @@ h2 .vi-num {
654
  font-size: 45px;
655
  line-height: 45px;
656
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
657
  }
654
  font-size: 45px;
655
  line-height: 45px;
656
  }
657
+ }
658
+
659
+ .iab-cat-tags-display {
660
+ margin-top: 20px;
661
+ }
662
+
663
+ .iab-cat-tags-display:empty:after {
664
+ content: 'None selected yet';
665
+ font-style: italic;
666
+ }
667
+
668
+ .iab-cat-tag-button {
669
+ display: inline-block;
670
+ background-color: #0073aa;
671
+ color: #ffffff;
672
+ padding: 5px 10px;
673
+ border-radius: 30px;
674
+ font-size: 12px;
675
+ margin: 0 12px 12px 0;
676
+ cursor: pointer;
677
+ }
678
+
679
+ .ytvi-msg-congrats {
680
+ display: none;
681
  }
styles/ytvi-admin.min.css CHANGED
@@ -1,2 +1,2 @@
1
 
2
- .clearboth{clear:both}sup.orange{text-transform:lowercase;font-weight:bold;color:#f85d00}.align-middle{vertical-align:middle!important}.vi-registration-box{position:relative}.vi-cover-prompt{position:absolute;width:100%;height:100%;top:0;left:0;z-index:100;background-color:rgba(241,241,241,.88);text-align:center}.vi-cover-prompt::before{content:"";display:none;z-index:10000;position:absolute;width:100%;height:100%;margin:0;padding:0;-webkit-filter:url(#viblurfilter);-moz-filter:url(#viblurfilter);-o-filter:url(#viblurfilter);-ms-filter:url(#viblurfilter);filter:url(#viblurfilter)}.vi-cover-prompt-buttons button.button-primary,.vi-cover-prompt-buttons button.button-secondary{display:inline-block;margin:0 5px}.viblurfilter-svg{width:0;height:0;margin:0;padding:0;border:0}.vi-cover-prompt h1{text-align:center;margin-top:50px;text-shadow:0 0 14px #fff}.ytvi-wrap *{box-sizing:border-box}.ytvi-wrap .center{text-align:center}.ytvi-wrap input.regular-text{width:100%}.ytvi-step-1,.ytvi-step-2{text-align:left}.ytvi-step-1{width:auto;padding:0;max-width:870px;margin:0 auto}.ytvi-step-1 .button-primary{font-size:16px}.ytvi-step-1--form,.ytvi-login-success,.ytvi-step-2-loading,.ytvi-login-loading,.ytvi-login-complete{background:#fff;border:solid 1px #e5e5e5;padding:15px 0;width:100%;margin:30px auto}.ytvi-step-1--form .side-signup{width:49.5%;float:left;border-right:1px solid #ccc;padding:0 40px}.ytvi-step-1--form .side-login{width:49.5%;float:right;padding:0 40px 0 30px}.ytvi-step-1--form .side-login h2,.ytvi-step-1--form .side-signup h2{font-size:1.15em}.wrap .ytvi-step-1--form h2{margin:10px 0 15px 0;font-weight:normal}.ytvi-step-2-loading,.ytvi-step-2,.ytvi-login-loading,.ytvi-login-success{display:none}.ytvi-loading--message{text-align:center;font-size:16px}.ytvi-step-2 .ytvi-registration{max-width:870px;margin:0 auto}.ytvi-step-2 .ytvi-registration iframe{border-width:0;padding:0;margin:0 auto;width:100%;height:575px;display:block}.ytvi-step-2-msg{background-color:#d8ebf3;border:1px solid #d0d0d0;margin:0 26px;padding:10px}.ytvi-login-success,.ytvi-login-complete{max-width:100%;text-align:center;padding:25px 40px}.vi-adstxt-diff{text-align:left}.vi-adstxt-diff p{font-style:italic}.vi-adstxt-diff code,.adstxt-verify-message code,code.adstxt-block{white-space:pre;display:block;overflow:auto;margin:25px 0}section.pattern h2{background-color:rgba(255,255,255,0);transition:background-color 2s ease-out 0s}section.pattern h2.ytvi-hash-scroll{background-color:rgba(255,255,255,1);transition:background-color 0s}h3.sect{transition:background-color 2s ease-out 0s}h3.sect.ytvi-hash-scroll{background-color:rgba(255,255,255,1);transition:background-color 0s}.vi-forgot-pw{display:inline-block;float:right;padding-top:5px}.vi-contact-support{margin-top:30px;clear:left;padding-top:20px}.vi-logo-text{height:1.2em;width:auto;vertical-align:text-bottom}.vi-demo{max-width:1360px;margin:0 auto}p.vi-demo-lede,#ytform p.vi-demo-lede{font-size:17px;line-height:1.5}.wrap-vi-settings-pre p.vi-demo-lede{padding-top:.75em}.vi-demo-col-phone{float:right;width:330px;clear:right}.vi-demo-col-content{width:calc(100% - 340px)}.vi-demo-mobile{margin:0 auto;width:300px;background:transparent url(../images/vi-mobile-phone.png) no-repeat scroll;background-size:cover}.vi-demo-mobile-caption-list{position:relative;min-height:115px}.vi-demo-mobile-caption{font-style:italic;margin:0 10px;position:absolute;top:0;left:0;opacity:1;transition:ease-in-out opacity 3s}.vi-demo-mobile-ratio{position:relative;width:100%;height:0;padding-bottom:175.89%}.vi-demo-mobile-bg{position:absolute;top:0;left:0;width:100%;height:100%}.vi-demo-screen{position:absolute;top:5.5%;left:12%;width:76%;height:auto;z-index:1;opacity:1;transition:ease-in-out opacity 4s}.vi-demo-screen.demo-hide,.vi-demo-mobile-caption.demo-hide{opacity:0;transition:ease-in-out opacity 3s}.vi-demo-screen-2{z-index:2}p.vi-ad-source-row{text-align:center;margin-top:20px}.vi-ad-source-row img{vertical-align:middle;display:inline-block;margin-bottom:13px;padding:0 13px 0 13px;max-height:20px;height:auto;width:auto}.login-expire{background-color:#d8ebf3;border:1px solid #d0d0d0;padding:25px}.wrap-vi{max-width:1064px;margin-bottom:100px}.wrap-vi h1 .yt-admin-icon{width:16px;height:16px}.wrap-vi h1 a.button-primary,.wrap-vi h1 a.button-secondary,.wrap-ytprefs h2 a.button-primary,.wrap-ytprefs h2 a.button-secondary{float:right;margin-left:15px}.wrap-vi section{margin-left:20px;display:none;padding-top:15px}.wrap-vi th label{display:block}.wrap-vi th small{font-weight:normal;font-style:italic}.wrap-vi h2.nav-tab-wrapper{margin:22px 0 0 0}.wrap-vi section#jumphowitworks{display:block}.wrap-vi .no-js section{display:block}.wrap-vi h2{margin-bottom:30px;margin-left:0}.wrap-vi h3{font-size:1.2em;font-style:italic}.save-changes-follow{position:fixed;z-index:10000;bottom:0;right:0;background-color:#fff;padding:0 20px;border-top-left-radius:20px;border:2px solid #aaa;border-right-width:0;border-bottom-width:0;-webkit-box-shadow:0 0 10px 0 rgba(0,0,0,0.75);-moz-box-shadow:0 0 10px 0 rgba(0,0,0,0.75);box-shadow:0 0 10px 0 rgba(0,0,0,0.75)}.button-primary{white-space:nowrap}p.submit{margin:0;padding:15px 0 10px 0}.wp-core-ui p.submit .button-primary{font-weight:bold;font-size:21px;height:50px;padding:0 20px 1px;background:#2ea2cc;background:-moz-linear-gradient(top,#2ea2cc 0,#007396 98%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#2ea2cc),color-stop(98%,#007396));background:-webkit-linear-gradient(top,#2ea2cc 0,#007396 98%);background:-o-linear-gradient(top,#2ea2cc 0,#007396 98%);background:-ms-linear-gradient(top,#2ea2cc 0,#007396 98%);background:linear-gradient(to bottom,#2ea2cc 0,#007396 98%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#2ea2cc',endColorstr='#007396',GradientType=0)}p.submit em{display:inline-block;padding-left:20px;vertical-align:middle;width:240px;margin-top:-6px}.vi-red{color:#de1515}button.button-primary.ytvi-btn-toggle{float:right;position:relative}button.button-primary.ytvi-btn-inactive,button.button-primary.ytvi-btn-inactive:hover,.wp-core-ui button.button-primary.ytvi-btn-inactive[disabled],.wp-core-ui button.button-primary.ytvi-btn-inactive:disabled,a.button-primary.ytvi-btn-inactive,a.button-primary.ytvi-btn-inactive:hover{background:#e51f1f!important;border-color:#a22222!important;box-shadow:0 1px 0 #a22222!important;text-shadow:0 -1px 1px #a22222,1px 0 1px #a22222,0 1px 1px #a22222,-1px 0 1px #a22222!important;color:#fff!important}.wp-core-ui button.button-primary.ytvi-btn-inactive[disabled]:hover{background:rgba(229,31,31,.5)!important}button.button-primary.ytvi-btn-toggle .ytvi-notyet{display:none;position:absolute;background:white;width:540px;height:auto;top:25px;padding:15px 20px;border-radius:10px;box-shadow:5px 5px 10px 0 rgba(0,0,0,.2);right:0;text-align:left;color:#333!important;box-sizing:border-box;text-shadow:none!important;white-space:normal;border-top-right-radius:0;z-index:100}button.button-primary.ytvi-btn-toggle:hover .ytvi-notyet{display:block}.iab-cat-parent{margin-right:15px;display:inline-block}.iab-cat-child-box{display:inline-block}.iab-cat-child-box.hidden{opacity:.3}.iab-cat-child option.hidden{display:none}.wp-picker-container.wp-picker-active .wp-color-result-text{font-weight:bold}ul.list-ul{margin:15px 30px}ul.list-ul li{list-style-type:disc}.alertify .ajs-dialog{max-width:600px}.alertify .ajs-body .ajs-content{line-height:2em}.alertify .ajs-body .ajs-content code{white-space:pre;display:block;overflow:auto;line-height:1.4em;margin:1em auto}.ajs-button{cursor:pointer}.ss-vi-img{max-width:700px;height:auto}.ss-vi-wizbutton{max-width:100%;height:auto}.vi-how-works{margin-bottom:40px;position:relative;margin-left:10px}.vi-how-works::before{clear:both}.vi-how-works p{line-height:1}.vi-how-works img{width:50px;height:50px;float:left;margin-right:15px;transition:ease-in-out transform,opacity .1s;opacity:.5}.vi-how-works:hover img{transform:scale(1.1);opacity:1;transition:ease-in-out transform,opacity .2s}.vi-how-works h3{margin-bottom:0}.vi-how-works .vi-num{position:absolute;left:-20px;font-size:22px;font-weight:bold;color:#000;opacity:.2;font-style:italic;transition:ease-in-out transform,opacity .1s}.vi-how-works:hover .vi-num{transform:scale(1.1);opacity:1;transition:ease-in-out transform,opacity .2s}h2 .vi-num{font-style:italic;opacity:.5}.form-table.form-table--vi-appearance{width:100%}.form-table td{vertical-align:top}.vi-story-demo{width:65%;position:relative;margin:20px auto}.vi-story-demo--box{border:solid 1px #e3e3e3}.vi-story-demo--screen{width:100%;padding-top:57%;background-color:#888;position:relative}.vi-story-demo--screen span{color:#ccc;width:100%;text-align:center;font-size:20px;position:absolute;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);font-style:italic}.vi-story-demo--screen span small{background:#ddd;border-radius:5px;display:inline-block;padding:5px 10px;box-sizing:border-box;color:#333;max-width:90%}.vi-story-demo--info{padding:8px}.vi-story-demo--featured{height:20px;font-size:9px;text-align:right;margin-top:8px;text-transform:uppercase;line-height:20px;font-family:Verdana,sans-serif}.vi-story-demo--title{font-weight:bold;line-height:1.33}.vi-story-demo--featured span{opacity:.5}.vi-story-demo--box .vi-story-demo--featured img{width:20px;height:20px;vertical-align:middle;margin:-4px 0 0 5px}@media(min-width:768px){.form-table.form-table--vi-appearance{width:53%;float:left;clear:left}.vi-story-demo{float:right;width:44%;position:relative}}.nav-tab-valid,.nav-tab-valid:focus,.adstxt-verify-message-valid{color:#00a000;font-weight:bold}.adstxt-help{float:right;background-color:rgba(0,0,0,0.07);width:390px;margin:0 0 20px 10px;border-radius:20px;box-sizing:border-box;padding:20px 35px}.adstxt-help img{width:50px;height:auto;display:block;float:left}.nav-tab-valid:after{content:url('../images/adstxt-valid.png')}.nav-tab-invalid:after{content:url('../images/adstxt-warning.png')}.nav-tab-loading:after{content:url('../images/ajax-loader.gif')}.vi-report-error.hide,.vi-report.hide{display:none}.vi-report,.vi-report-error{text-align:center}.vi-total-earnings,.vi-total-earnings-error{float:left;width:25%;margin-top:60px;color:#1193aa}.vi-report-graph,.vi-report-graph-error{float:right;width:75%}.vi-report-canvas-box,.vi-report-canvas-box-error{height:300px;width:100%}.vi-total-earnings-num,.vi-total-earnings-num-error{margin-top:20px;font-weight:bold;font-size:3.7vw;line-height:3.7vw}.vi-total-earnings-num-error,.vi-report-canvas-box-error{color:#ccc;font-weight:normal;font-size:45px;line-height:45px}.vi-report-canvas-box-error{background-size:10% 10%;background-image:linear-gradient(to right,#ddd 1px,transparent 1px),linear-gradient(to bottom,#ddd 1px,transparent 1px)}@media(min-width:1280px){.vi-total-earnings-num,.vi-total-earnings-num-error{font-size:45px;line-height:45px}}
1
 
2
+ .clearboth{clear:both}sup.orange{text-transform:lowercase;font-weight:bold;color:#f85d00}.align-middle{vertical-align:middle!important}.vi-registration-box{position:relative}.vi-cover-prompt{position:absolute;width:100%;height:100%;top:0;left:0;z-index:100;background-color:rgba(241,241,241,.88);text-align:center}.vi-cover-prompt::before{content:"";display:none;z-index:10000;position:absolute;width:100%;height:100%;margin:0;padding:0;-webkit-filter:url(#viblurfilter);-moz-filter:url(#viblurfilter);-o-filter:url(#viblurfilter);-ms-filter:url(#viblurfilter);filter:url(#viblurfilter)}.vi-cover-prompt-buttons button.button-primary,.vi-cover-prompt-buttons button.button-secondary{display:inline-block;margin:0 5px}.viblurfilter-svg{width:0;height:0;margin:0;padding:0;border:0}.vi-cover-prompt h1{text-align:center;margin-top:50px;text-shadow:0 0 14px #fff}.ytvi-wrap *{box-sizing:border-box}.ytvi-wrap .center{text-align:center}.ytvi-wrap input.regular-text{width:100%}.ytvi-step-1,.ytvi-step-2{text-align:left}.ytvi-step-1{width:auto;padding:0;max-width:870px;margin:0 auto}.ytvi-step-1 .button-primary{font-size:16px}.ytvi-step-1--form,.ytvi-login-success,.ytvi-step-2-loading,.ytvi-login-loading,.ytvi-login-complete{background:#fff;border:solid 1px #e5e5e5;padding:15px 0;width:100%;margin:30px auto}.ytvi-step-1--form .side-signup{width:49.5%;float:left;border-right:1px solid #ccc;padding:0 40px}.ytvi-step-1--form .side-login{width:49.5%;float:right;padding:0 40px 0 30px}.ytvi-step-1--form .side-login h2,.ytvi-step-1--form .side-signup h2{font-size:1.15em}.wrap .ytvi-step-1--form h2{margin:10px 0 15px 0;font-weight:normal}.ytvi-step-2-loading,.ytvi-step-2,.ytvi-login-loading,.ytvi-login-success{display:none}.ytvi-loading--message{text-align:center;font-size:16px}.ytvi-step-2 .ytvi-registration{max-width:870px;margin:0 auto}.ytvi-step-2 .ytvi-registration iframe{border-width:0;padding:0;margin:0 auto;width:100%;height:575px;display:block}.ytvi-step-2-msg{background-color:#d8ebf3;border:1px solid #d0d0d0;margin:0 26px;padding:10px}.ytvi-login-success,.ytvi-login-complete{max-width:100%;text-align:center;padding:25px 40px}.vi-adstxt-diff{text-align:left}.vi-adstxt-diff p{font-style:italic}.vi-adstxt-diff code,.adstxt-verify-message code,code.adstxt-block{white-space:pre;display:block;overflow:auto;margin:25px 0}section.pattern h2{background-color:rgba(255,255,255,0);transition:background-color 2s ease-out 0s}section.pattern h2.ytvi-hash-scroll{background-color:rgba(255,255,255,1);transition:background-color 0s}h3.sect{transition:background-color 2s ease-out 0s}h3.sect.ytvi-hash-scroll{background-color:rgba(255,255,255,1);transition:background-color 0s}.vi-forgot-pw{display:inline-block;float:right;padding-top:5px}.vi-contact-support{margin-top:30px;clear:left;padding-top:20px}.vi-logo-text{height:1.2em;width:auto;vertical-align:text-bottom}.vi-demo{max-width:1360px;margin:0 auto}p.vi-demo-lede,#ytform p.vi-demo-lede{font-size:17px;line-height:1.5}.wrap-vi-settings-pre p.vi-demo-lede{padding-top:.75em}.vi-demo-col-phone{float:right;width:330px;clear:right}.vi-demo-col-content{width:calc(100% - 340px)}.vi-demo-mobile{margin:0 auto;width:300px;background:transparent url(../images/vi-mobile-phone.png) no-repeat scroll;background-size:cover}.vi-demo-mobile-caption-list{position:relative;min-height:115px}.vi-demo-mobile-caption{font-style:italic;margin:0 10px;position:absolute;top:0;left:0;opacity:1;transition:ease-in-out opacity 3s}.vi-demo-mobile-ratio{position:relative;width:100%;height:0;padding-bottom:175.89%}.vi-demo-mobile-bg{position:absolute;top:0;left:0;width:100%;height:100%}.vi-demo-screen{position:absolute;top:5.5%;left:12%;width:76%;height:auto;z-index:1;opacity:1;transition:ease-in-out opacity 4s}.vi-demo-screen.demo-hide,.vi-demo-mobile-caption.demo-hide{opacity:0;transition:ease-in-out opacity 3s}.vi-demo-screen-2{z-index:2}p.vi-ad-source-row{text-align:center;margin-top:20px}.vi-ad-source-row img{vertical-align:middle;display:inline-block;margin-bottom:13px;padding:0 13px 0 13px;max-height:20px;height:auto;width:auto}.login-expire{background-color:#d8ebf3;border:1px solid #d0d0d0;padding:25px}.wrap-vi{max-width:1064px;margin-bottom:100px}.wrap-vi h1 .yt-admin-icon{width:16px;height:16px}.wrap-vi h1 a.button-primary,.wrap-vi h1 a.button-secondary,.wrap-ytprefs h2 a.button-primary,.wrap-ytprefs h2 a.button-secondary{float:right;margin-left:15px}.wrap-vi section{margin-left:20px;display:none;padding-top:15px}.wrap-vi th label{display:block}.wrap-vi th small{font-weight:normal;font-style:italic}.wrap-vi h2.nav-tab-wrapper{margin:22px 0 0 0}.wrap-vi section#jumphowitworks{display:block}.wrap-vi .no-js section{display:block}.wrap-vi h2{margin-bottom:30px;margin-left:0}.wrap-vi h3{font-size:1.2em;font-style:italic}.save-changes-follow{position:fixed;z-index:10000;bottom:0;right:0;background-color:#fff;padding:0 20px;border-top-left-radius:20px;border:2px solid #aaa;border-right-width:0;border-bottom-width:0;-webkit-box-shadow:0 0 10px 0 rgba(0,0,0,0.75);-moz-box-shadow:0 0 10px 0 rgba(0,0,0,0.75);box-shadow:0 0 10px 0 rgba(0,0,0,0.75)}.button-primary{white-space:nowrap}p.submit{margin:0;padding:15px 0 10px 0}.wp-core-ui p.submit .button-primary{font-weight:bold;font-size:21px;height:50px;padding:0 20px 1px;background:#2ea2cc;background:-moz-linear-gradient(top,#2ea2cc 0,#007396 98%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#2ea2cc),color-stop(98%,#007396));background:-webkit-linear-gradient(top,#2ea2cc 0,#007396 98%);background:-o-linear-gradient(top,#2ea2cc 0,#007396 98%);background:-ms-linear-gradient(top,#2ea2cc 0,#007396 98%);background:linear-gradient(to bottom,#2ea2cc 0,#007396 98%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#2ea2cc',endColorstr='#007396',GradientType=0)}p.submit em{display:inline-block;padding-left:20px;vertical-align:middle;width:240px;margin-top:-6px}.vi-red{color:#de1515}button.button-primary.ytvi-btn-toggle{float:right;position:relative}button.button-primary.ytvi-btn-inactive,button.button-primary.ytvi-btn-inactive:hover,.wp-core-ui button.button-primary.ytvi-btn-inactive[disabled],.wp-core-ui button.button-primary.ytvi-btn-inactive:disabled,a.button-primary.ytvi-btn-inactive,a.button-primary.ytvi-btn-inactive:hover{background:#e51f1f!important;border-color:#a22222!important;box-shadow:0 1px 0 #a22222!important;text-shadow:0 -1px 1px #a22222,1px 0 1px #a22222,0 1px 1px #a22222,-1px 0 1px #a22222!important;color:#fff!important}.wp-core-ui button.button-primary.ytvi-btn-inactive[disabled]:hover{background:rgba(229,31,31,.5)!important}button.button-primary.ytvi-btn-toggle .ytvi-notyet{display:none;position:absolute;background:white;width:540px;height:auto;top:25px;padding:15px 20px;border-radius:10px;box-shadow:5px 5px 10px 0 rgba(0,0,0,.2);right:0;text-align:left;color:#333!important;box-sizing:border-box;text-shadow:none!important;white-space:normal;border-top-right-radius:0;z-index:100}button.button-primary.ytvi-btn-toggle:hover .ytvi-notyet{display:block}.iab-cat-parent{margin-right:15px;display:inline-block}.iab-cat-child-box{display:inline-block}.iab-cat-child-box.hidden{opacity:.3}.iab-cat-child option.hidden{display:none}.wp-picker-container.wp-picker-active .wp-color-result-text{font-weight:bold}ul.list-ul{margin:15px 30px}ul.list-ul li{list-style-type:disc}.alertify .ajs-dialog{max-width:600px}.alertify .ajs-body .ajs-content{line-height:2em}.alertify .ajs-body .ajs-content code{white-space:pre;display:block;overflow:auto;line-height:1.4em;margin:1em auto}.ajs-button{cursor:pointer}.ss-vi-img{max-width:700px;height:auto}.ss-vi-wizbutton{max-width:100%;height:auto}.vi-how-works{margin-bottom:40px;position:relative;margin-left:10px}.vi-how-works::before{clear:both}.vi-how-works p{line-height:1}.vi-how-works img{width:50px;height:50px;float:left;margin-right:15px;transition:ease-in-out transform,opacity .1s;opacity:.5}.vi-how-works:hover img{transform:scale(1.1);opacity:1;transition:ease-in-out transform,opacity .2s}.vi-how-works h3{margin-bottom:0}.vi-how-works .vi-num{position:absolute;left:-20px;font-size:22px;font-weight:bold;color:#000;opacity:.2;font-style:italic;transition:ease-in-out transform,opacity .1s}.vi-how-works:hover .vi-num{transform:scale(1.1);opacity:1;transition:ease-in-out transform,opacity .2s}h2 .vi-num{font-style:italic;opacity:.5}.form-table.form-table--vi-appearance{width:100%}.form-table td{vertical-align:top}.vi-story-demo{width:65%;position:relative;margin:20px auto}.vi-story-demo--box{border:solid 1px #e3e3e3}.vi-story-demo--screen{width:100%;padding-top:57%;background-color:#888;position:relative}.vi-story-demo--screen span{color:#ccc;width:100%;text-align:center;font-size:20px;position:absolute;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);font-style:italic}.vi-story-demo--screen span small{background:#ddd;border-radius:5px;display:inline-block;padding:5px 10px;box-sizing:border-box;color:#333;max-width:90%}.vi-story-demo--info{padding:8px}.vi-story-demo--featured{height:20px;font-size:9px;text-align:right;margin-top:8px;text-transform:uppercase;line-height:20px;font-family:Verdana,sans-serif}.vi-story-demo--title{font-weight:bold;line-height:1.33}.vi-story-demo--featured span{opacity:.5}.vi-story-demo--box .vi-story-demo--featured img{width:20px;height:20px;vertical-align:middle;margin:-4px 0 0 5px}@media(min-width:768px){.form-table.form-table--vi-appearance{width:53%;float:left;clear:left}.vi-story-demo{float:right;width:44%;position:relative}}.nav-tab-valid,.nav-tab-valid:focus,.adstxt-verify-message-valid{color:#00a000;font-weight:bold}.adstxt-help{float:right;background-color:rgba(0,0,0,0.07);width:390px;margin:0 0 20px 10px;border-radius:20px;box-sizing:border-box;padding:20px 35px}.adstxt-help img{width:50px;height:auto;display:block;float:left}.nav-tab-valid:after{content:url('../images/adstxt-valid.png')}.nav-tab-invalid:after{content:url('../images/adstxt-warning.png')}.nav-tab-loading:after{content:url('../images/ajax-loader.gif')}.vi-report-error.hide,.vi-report.hide{display:none}.vi-report,.vi-report-error{text-align:center}.vi-total-earnings,.vi-total-earnings-error{float:left;width:25%;margin-top:60px;color:#1193aa}.vi-report-graph,.vi-report-graph-error{float:right;width:75%}.vi-report-canvas-box,.vi-report-canvas-box-error{height:300px;width:100%}.vi-total-earnings-num,.vi-total-earnings-num-error{margin-top:20px;font-weight:bold;font-size:3.7vw;line-height:3.7vw}.vi-total-earnings-num-error,.vi-report-canvas-box-error{color:#ccc;font-weight:normal;font-size:45px;line-height:45px}.vi-report-canvas-box-error{background-size:10% 10%;background-image:linear-gradient(to right,#ddd 1px,transparent 1px),linear-gradient(to bottom,#ddd 1px,transparent 1px)}@media(min-width:1280px){.vi-total-earnings-num,.vi-total-earnings-num-error{font-size:45px;line-height:45px}}.iab-cat-tags-display{margin-top:20px}.iab-cat-tags-display:empty:after{content:'None selected yet';font-style:italic}.iab-cat-tag-button{display:inline-block;background-color:#0073aa;color:#fff;padding:5px 10px;border-radius:30px;font-size:12px;margin:0 12px 12px 0;cursor:pointer}.ytvi-msg-congrats{display:none}
youtube.php CHANGED
@@ -3,14 +3,14 @@
3
  Plugin Name: YouTube
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.0.1
7
  Author: EmbedPlus Team
8
  Author URI: https://www.embedplus.com
9
  */
10
 
11
  /*
12
  YouTube
13
- Copyright (C) 2018 EmbedPlus.com
14
 
15
  This program is free software: you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License as published by
@@ -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.0.1';
38
  public static $opt_version = 'version';
39
  public static $optembedwidth = null;
40
  public static $optembedheight = null;
@@ -70,6 +70,7 @@ class YouTubePrefs
70
  public static $opt_acctitle = 'acctitle';
71
  public static $opt_pro = 'pro';
72
  public static $opt_oldspacing = 'oldspacing';
 
73
  public static $opt_responsive = 'responsive';
74
  public static $opt_responsive_all = 'responsive_all';
75
  public static $opt_origin = 'origin';
@@ -127,6 +128,7 @@ class YouTubePrefs
127
  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>';
128
  ///////////////////////////////////////////////////////////////////////////////////////////////////
129
 
 
130
  public static $vi_script_tag_done = false;
131
  public static $vi_dft_js_settings = array(
132
  //"adUnitType" => "NATIVE_VIDEO_UNIT",
@@ -152,6 +154,7 @@ class YouTubePrefs
152
  public static $opt_vi_endpoints = 'vi_endpoints';
153
  public static $opt_vi_token = 'vi_token';
154
  public static $opt_vi_last_login = 'vi_last_login';
 
155
  public static $opt_vi_adstxt = 'vi_adstxt';
156
  public static $opt_vi_js_settings = 'vi_js_settings';
157
  public static $opt_vi_js_script = 'vi_js_script';
@@ -225,7 +228,7 @@ class YouTubePrefs
225
  self::do_ytprefs();
226
  add_action('admin_menu', array(get_class(), 'ytprefs_plugin_menu'));
227
  add_filter('plugin_action_links_' . plugin_basename(__FILE__), array(get_class(), 'my_plugin_action_links'));
228
-
229
  if (!is_admin())
230
  {
231
  if (self::$alloptions[self::$opt_old_script_method] == 1)
@@ -236,10 +239,10 @@ class YouTubePrefs
236
 
237
  add_action('wp_enqueue_scripts', array(get_class(), 'ytprefsscript'), 100);
238
  add_action('wp_enqueue_scripts', array(get_class(), 'fitvids'), 101);
239
-
240
- add_filter('ytprefs_gdpr_consent_message', array(get_class(), 'filter_gdpr_consent_message'));
241
  }
242
 
 
 
243
  add_action("wp_ajax_my_embedplus_onboarding_save_ajax", array(get_class(), 'onboarding_save_ajax'));
244
  add_action("wp_ajax_my_embedplus_onboarding_save_apikey_ajax", array(get_class(), 'onboarding_save_apikey_ajax'));
245
  add_action("wp_ajax_my_embedplus_glance_vids", array(get_class(), 'my_embedplus_glance_vids'));
@@ -642,14 +645,15 @@ class YouTubePrefs
642
 
643
 
644
 
 
645
  $step1_video_errors = '';
646
  $step1_video_error_invalid = 'Sorry, that does not seem to be a link to an existing video. Please confirm that the link works in your browser, and that <em>the owner of the video allowed embed sharing permissions (otherwise, contact the owner of the video to allow embedding)</em>. Then copy that full link in your address bar to paste here.';
647
  $step1_playlist_errors = '';
648
  $step1_playlist_error_invalid = 'Sorry, that does not seem to be a link to an existing playlist. Please confirm that the link works in your browser, and that <em>the owner of the playlist allowed embed sharing permissions (otherwise, contact the owner of the video to allow embedding)</em>. Then copy that full link in your address bar to paste here.';
649
  $step1_channel_errors = '';
650
- $step1_channel_error_invalid = 'Sorry, that does not seem to be a link to an existing video. Please confirm that the link works in your browser, and that <em>the owner of the video allowed embed sharing permissions (otherwise, contact the owner of the video to allow embedding)</em>. Then copy that full link in your address bar to paste here. If you are sure your link is correct, then your API key may be too restrictive (<a target="_blank" href="https://console.developers.google.com/apis/credentials">https://console.developers.google.com/apis/credentials</a>).';
651
  $step1_live_errors = '';
652
- $step1_live_error_invalid = 'Sorry, that does not seem to be a valid link to an existing video or channel. Please confirm that the link works in your browser, and that <em>the owner of the video allowed embed sharing permissions (otherwise, contact the owner of the video to allow embedding)</em>. Then copy that full link in your address bar to paste here. If you are sure your link is correct, then your API key may be too restrictive (<a target="_blank" href="https://console.developers.google.com/apis/credentials">https://console.developers.google.com/apis/credentials</a>).';
653
  $if_live_preview = false;
654
 
655
  $theytid = null;
@@ -965,84 +969,62 @@ class YouTubePrefs
965
 
966
  try
967
  {
968
- $thechannel = false;
969
- $chanmatch = array();
970
- preg_match('@/channel/(.+)@', $search, $chanmatch);
971
- if (!empty($chanmatch))
972
  {
973
- $thechannel = self::get_channel_snippet($chanmatch[1]);
974
  }
975
- else
976
  {
977
- $theytid = null;
978
- try
979
- {
980
- $theytid = self::try_get_ytid($search);
981
- }
982
- catch (Exception $ex)
983
- {
984
-
985
- }
986
- $chanvid = self::get_video_snippet($theytid);
987
- if ($chanvid)
988
- {
989
- $thechannel = self::get_channel_snippet($chanvid->snippet->channelId);
990
- }
991
  }
992
- if ($thechannel)
 
993
  {
994
- $live_attempt = self::get_live_snippet($thechannel->id);
995
- if ($live_attempt)
996
- {
997
- $if_live_preview = $live_attempt->id->videoId;
998
- }
999
- $rel = 'https://www.youtube.com/embed?live=1&channel=' . (esc_attr($thechannel->id));
1000
- ?>
1001
-
1002
- <div id="step2_channel" class="center">
1003
 
1004
- <h2>
1005
- <?php
1006
- echo 'Live Stream From Channel: ' . sanitize_text_field($thechannel->snippet->title);
1007
- ?>
1008
- </h2>
1009
- <p class="center">
1010
- <a class="ui-button ui-widget ui-corner-all inserttopost" rel="[embedyt] <?php echo $rel; ?>[/embedyt]"><span class="ui-icon ui-icon-arrowthickstop-1-s"></span> Insert Into Editor</a>
1011
- &nbsp; <a class="ui-button ui-widget ui-corner-all" href="<?php echo $get_pro_link; ?>" target="_blank"><span class="ui-icon ui-icon-gear"></span> Customize (PRO)</a>
1012
- </p>
1013
- <p>
1014
- Or Copy Code:
1015
- </p>
1016
- <p>
1017
- <span class="copycode">[embedyt] <?php echo $rel; ?>[/embedyt]</span>
1018
- </p>
1019
- <div class="clearboth" style="height: 10px;">
1020
- </div>
1021
  <?php
1022
- if ($if_live_preview)
1023
- {
1024
- ?>
1025
- <div class="center relative">
1026
- <iframe src="https://www.youtube.com/embed/<?php echo esc_attr($if_live_preview) ?>?rel=0" allowfullscreen="" width="854" height="480" frameborder="0"></iframe>
1027
- </div>
1028
- <?php
1029
- }
1030
  ?>
1031
- <p>
1032
- <strong>Is your live stream not working?</strong> According to Google/YouTube rules, there must be an active AdSense account that's connected to the live
1033
- stream's channel (for monetization) in order embed the stream. If you own the channel, we suggest that you attach an AdSense account. Otherwise, you will
1034
- likely just see a blank screen when you embed your stream, even if it is visible on YouTube.com.
1035
- Read more here: <a href="https://support.google.com/youtube/answer/2474026?hl=en" target="_blank">https://support.google.com/youtube/answer/2474026?hl=en</a>
1036
- </p>
 
 
 
 
 
 
1037
  </div>
1038
  <?php
1039
- }
1040
- else
1041
- {
1042
- $form_valid = false;
1043
- $step1_live_errors = $step1_live_error_invalid;
1044
- $acc_expand = 'h3_live';
1045
- }
 
 
 
 
 
 
 
 
 
 
1046
  }
1047
  catch (Exception $ex)
1048
  {
@@ -1174,7 +1156,7 @@ class YouTubePrefs
1174
  </div>
1175
  <h3 id="h3_live"> <a href="#">Embed a live stream. </a></h3>
1176
  <div>
1177
- <h4 class="center">Live stream directions (<a href="https://www.youtube.com/watch?v=dEQMTUke48E" target="_blank">Video tutorial here &raquo;</a>)</h4>
1178
  <?php
1179
  if (!self::has_api_key())
1180
  {
@@ -1183,14 +1165,20 @@ class YouTubePrefs
1183
  else
1184
  {
1185
  ?>
 
 
 
 
 
 
 
 
1186
  <ol>
1187
- <li>Enter in the URL of the channel that the live feed belongs to.
1188
- <ul class="ul-disc">
1189
- <li><small>Example: https://www.youtube.com/<strong>channel</strong>/UCnM5iMGiKsZg-iOlIO2ZkdQ </small></li>
1190
- <li><small>(If you do not know the exact channel URL, enter in the URL to any single video that belongs to that channel, to automatically retrieve the channel URL. Example: https://www.youtube.com/watch?v=fIW8Vvfbojc )</small></li>
1191
- </ul>
1192
  </li>
1193
- <li>On the YouTube plugin admin settings page, enter in the "Default Not Live Content" field what content should display while your channel is <em>not</em> currently streaming.
 
1194
  </li>
1195
  </ol>
1196
  <form name="wizform_live" method="post" action="" class="wizform" id="wizform_live">
@@ -1208,7 +1196,7 @@ class YouTubePrefs
1208
  if (current_user_can('manage_options') && !self::vi_logged_in() && !(bool) (self::$alloptions[self::$opt_vi_hide_monetize_tab]))
1209
  {
1210
  ?>
1211
- <h3 id="h3_vi_monetize"> <a href="#"> Explore monetization. <sup class="orange">new</sup> </a></h3>
1212
  <div class="h3_vi_monetize-content">
1213
  <div class="vi-registration-box">
1214
  <?php
@@ -1703,6 +1691,7 @@ class YouTubePrefs
1703
  $_migrate_embedplusvideo = 0;
1704
  $_controls = 2;
1705
  $_oldspacing = 1;
 
1706
  $_responsive = 0;
1707
  $_responsive_all = 1;
1708
  $_widgetfit = 1;
@@ -1749,6 +1738,7 @@ class YouTubePrefs
1749
  $_vi_endpoints = '';
1750
  $_vi_token = '';
1751
  $_vi_last_login = date('Y-m-d H:i:s', strtotime('2000-01-01'));
 
1752
  $_vi_adstxt = '';
1753
  $_vi_js_settings = self::$vi_dft_js_settings;
1754
  $_vi_js_script = '';
@@ -1792,6 +1782,7 @@ class YouTubePrefs
1792
  $_migrate_embedplusvideo = self::tryget($arroptions, self::$opt_migrate_embedplusvideo, 0);
1793
  $_controls = self::tryget($arroptions, self::$opt_controls, 2);
1794
  $_oldspacing = self::tryget($arroptions, self::$opt_oldspacing, 1);
 
1795
  $_responsive = self::tryget($arroptions, self::$opt_responsive, 0);
1796
  $_responsive_all = self::tryget($arroptions, self::$opt_responsive_all, 1);
1797
  $_widgetfit = self::tryget($arroptions, self::$opt_widgetfit, 1);
@@ -1825,13 +1816,14 @@ class YouTubePrefs
1825
  $_gallery_customprev = self::tryget($arroptions, self::$opt_gallery_customprev, $_gallery_customprev);
1826
  $_not_live_content = self::tryget($arroptions, self::$opt_not_live_content, $_not_live_content);
1827
  $_admin_off_scripts = self::tryget($arroptions, self::$opt_admin_off_scripts, $_admin_off_scripts);
1828
- $_onboarded = self::tryget($arroptions, self::$opt_onboarded, $_onboarded);
1829
 
1830
  $_vi_active = self::tryget($arroptions, self::$opt_vi_active, $_vi_active);
1831
  $_vi_hide_monetize_tab = self::tryget($arroptions, self::$opt_vi_hide_monetize_tab, $_vi_hide_monetize_tab);
1832
  $_vi_endpoints = self::tryget($arroptions, self::$opt_vi_endpoints, $_vi_endpoints);
1833
  $_vi_token = self::tryget($arroptions, self::$opt_vi_token, $_vi_token);
1834
  $_vi_last_login = self::tryget($arroptions, self::$opt_vi_last_login, $_vi_last_login);
 
1835
  $_vi_adstxt = self::tryget($arroptions, self::$opt_vi_adstxt, $_vi_adstxt);
1836
  $_vi_js_settings = self::tryget($arroptions, self::$opt_vi_js_settings, self::$vi_dft_js_settings);
1837
  $_vi_js_script = self::tryget($arroptions, self::$opt_vi_js_script, $_vi_js_script);
@@ -1876,6 +1868,7 @@ class YouTubePrefs
1876
  self::$opt_migrate_embedplusvideo => $_migrate_embedplusvideo,
1877
  self::$opt_controls => $_controls,
1878
  self::$opt_oldspacing => $_oldspacing,
 
1879
  self::$opt_responsive => $_responsive,
1880
  self::$opt_responsive_all => $_responsive_all,
1881
  self::$opt_widgetfit => $_widgetfit,
@@ -1917,6 +1910,7 @@ class YouTubePrefs
1917
  self::$opt_vi_endpoints => $_vi_endpoints,
1918
  self::$opt_vi_token => $_vi_token,
1919
  self::$opt_vi_last_login => $_vi_last_login,
 
1920
  self::$opt_vi_adstxt => $_vi_adstxt,
1921
  self::$opt_vi_js_settings => $_vi_js_settings,
1922
  self::$opt_vi_js_script => $_vi_js_script,
@@ -1949,7 +1943,7 @@ class YouTubePrefs
1949
  public static function do_ytprefs()
1950
  {
1951
  //add_filter('autoptimize_filter_js_exclude', array(get_class(), 'ao_override_jsexclude'), 10, 1);
1952
- if (!is_admin())
1953
  {
1954
  add_filter('the_content', array(get_class(), 'apply_prefs_content'), 1);
1955
  add_filter('widget_text', array(get_class(), 'apply_prefs_widget'), 1);
@@ -2318,36 +2312,75 @@ class YouTubePrefs
2318
  $linkparams['v'] = array_pop($vtemp);
2319
  }
2320
 
2321
- if (isset($linkparams['channel']) && isset($linkparams['live']) && $linkparams['live'] == '1')
2322
  {
2323
  $live_error_msg = ' To embed live videos, 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.';
2324
  if (isset(self::$alloptions[self::$opt_apikey]))
2325
  {
2326
-
2327
- try
2328
  {
2329
- $ytapilink_live = 'https://www.googleapis.com/youtube/v3/search?order=date&maxResults=1&type=video&eventType=live&safeSearch=none&videoEmbeddable=true&channelId=' . $linkparams['channel'] . '&part=snippet&key=' . self::$alloptions[self::$opt_apikey];
2330
- $apidata_live = wp_remote_get($ytapilink_live, array('timeout' => self::$curltimeout));
2331
- if (!is_wp_error($apidata_live))
2332
  {
2333
- $raw = wp_remote_retrieve_body($apidata_live);
2334
- if (!empty($raw))
 
2335
  {
2336
- $json = json_decode($raw, true);
2337
- if (!isset($json['error']) && is_array($json) && count($json['items']))
2338
  {
2339
- $linkparams['v'] = $json['items'][0]['id']['videoId'];
2340
- }
2341
- else if (isset($json['error']))
2342
- {
2343
- return $live_error_msg;
 
 
 
 
2344
  }
2345
  }
2346
  }
 
 
 
 
2347
  }
2348
- catch (Exception $ex)
2349
  {
2350
- return $live_error_msg;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2351
  }
2352
  }
2353
  else
@@ -2364,6 +2397,7 @@ class YouTubePrefs
2364
  $youtubebaseurl = 'youtube';
2365
  $voloutput = '';
2366
  $acctitle = '';
 
2367
 
2368
  $finalparams = $linkparams + self::$alloptions;
2369
 
@@ -2379,6 +2413,11 @@ class YouTubePrefs
2379
  $voloutput = ' data-vol="' . self::$alloptions[self::$opt_vol] . '" ';
2380
  }
2381
 
 
 
 
 
 
2382
  if (self::$alloptions[self::$opt_dohl] == 1)
2383
  {
2384
  $locale = get_locale();
@@ -2501,8 +2540,13 @@ class YouTubePrefs
2501
  $finalparams['autoplay'] = 0;
2502
  }
2503
 
 
 
 
 
 
2504
  $code1 = '<iframe ' . $centercode . ' id="_ytid_' . rand(10000, 99999) . '" width="' . self::$defaultwidth . '" height="' . self::$defaultheight . '" ' .
2505
- ' data-origwidth="' . self::$defaultwidth . '" data-origheight="' . self::$defaultheight . '" ' .
2506
  ' src="https://www.' . $youtubebaseurl . '.com/embed/' . $videoidoutput . '?';
2507
  $code2 = '" class="__youtube_prefs__' . ($iscontent ? '' : ' __youtube_prefs_widget__') .
2508
  '"' . $voloutput . $acctitle . $galleryid_ifm_data . ' allow="autoplay; encrypted-media" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe>';
@@ -2705,6 +2749,10 @@ class YouTubePrefs
2705
 
2706
  public static function get_oembed($url, $height, $width)
2707
  {
 
 
 
 
2708
  require_once(ABSPATH . WPINC . '/class-oembed.php');
2709
  $oembed = _wp_oembed_get_object();
2710
  $args = array();
@@ -2860,15 +2908,15 @@ class YouTubePrefs
2860
  $new_pointer_content = '<h3>' . __('New Update') . '</h3>'; // ooopointer
2861
 
2862
  $new_pointer_content .= '<p>'; // ooopointer
2863
-
2864
- $new_pointer_content .= "This version provides clearer instructions for many options across the plugin&apos;s settings and wizard pages in both Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions &raquo;</a>";
2865
- //$new_pointer_content .= "This version fixes a couple gallery bugs and improves ads.txt management for the monetization feature. <a rel=\"#jumpmonetize\" class=\"epyt-jumptab\" href=\"" . admin_url('admin.php?page=youtube-my-preferences#jumpmonetize') . "\">Login here to see &raquo;</a></li></ul>";
2866
-
2867
  if (!empty(self::$alloptions[self::$opt_pro]) && strlen(trim(self::$alloptions[self::$opt_pro])) > 0)
2868
  {
2869
  $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.';
2870
  }
2871
-
2872
  $new_pointer_content .= '</p>';
2873
 
2874
  return array(
@@ -2894,7 +2942,7 @@ class YouTubePrefs
2894
  <h3 class="nav-tab-wrapper">
2895
  <a class="nav-tab nav-tab-active" href="#jumpdefaults">Defaults</a>
2896
  <a class="nav-tab" href="#jumpapikey">API Key</a>
2897
- <a class="nav-tab" href="#jumpwiz">Wizard <sup class="orange">new</sup></a>
2898
  <a class="nav-tab" href="#jumpgallery">Galleries</a>
2899
  <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>
2900
  <?php
@@ -2958,7 +3006,7 @@ class YouTubePrefs
2958
  $new_options[self::$opt_iv_load_policy] = self::postchecked(self::$opt_iv_load_policy) ? 1 : 3;
2959
  $new_options[self::$opt_loop] = self::postchecked(self::$opt_loop) ? 1 : 0;
2960
  $new_options[self::$opt_modestbranding] = self::postchecked(self::$opt_modestbranding) ? 1 : 0;
2961
- $new_options[self::$opt_rel] = self::postchecked(self::$opt_rel) ? 1 : 0;
2962
  $new_options[self::$opt_showinfo] = self::postchecked(self::$opt_showinfo) ? 1 : 0;
2963
  $new_options[self::$opt_fs] = self::postchecked(self::$opt_fs) ? 1 : 0;
2964
  $new_options[self::$opt_playsinline] = self::postchecked(self::$opt_playsinline) ? 1 : 0;
@@ -2973,6 +3021,7 @@ class YouTubePrefs
2973
  $new_options[self::$opt_migrate_youtube] = self::postchecked(self::$opt_migrate_youtube) ? 1 : 0;
2974
  $new_options[self::$opt_migrate_embedplusvideo] = self::postchecked(self::$opt_migrate_embedplusvideo) ? 1 : 0;
2975
  $new_options[self::$opt_oldspacing] = self::postchecked(self::$opt_oldspacing) ? 1 : 0;
 
2976
  $new_options[self::$opt_responsive] = self::postchecked(self::$opt_responsive) ? 1 : 0;
2977
  $new_options[self::$opt_widgetfit] = self::postchecked(self::$opt_widgetfit) ? 1 : 0;
2978
  $new_options[self::$opt_evselector_light] = self::postchecked(self::$opt_evselector_light) ? 1 : 0;
@@ -2993,6 +3042,17 @@ class YouTubePrefs
2993
  $new_options[self::$opt_gallery_collapse_grid] = self::postchecked(self::$opt_gallery_collapse_grid) ? 1 : 0;
2994
  $new_options[self::$opt_vi_hide_monetize_tab] = self::postchecked(self::$opt_vi_hide_monetize_tab) ? 1 : 0;
2995
 
 
 
 
 
 
 
 
 
 
 
 
2996
 
2997
  $_gdpr_consent_message = '';
2998
  try
@@ -3467,12 +3527,17 @@ class YouTubePrefs
3467
  <label for="<?php echo self::$opt_modestbranding; ?>"><?php _e('<b class="chktitle">Modest Branding:</b> No YouTube logo will be shown on the control bar. Instead, as required by YouTube, the logo will only show as a watermark when the video is paused/stopped.') ?></label>
3468
  </p>
3469
  <p>
3470
- <input name="<?php echo self::$opt_rel; ?>" id="<?php echo self::$opt_rel; ?>" <?php checked($all[self::$opt_rel], 1); ?> type="checkbox" class="checkbox">
3471
- <label for="<?php echo self::$opt_rel; ?>">
3472
  <b class="chktitle">Related Videos:</b>
3473
- <strong>Google/YouTube no longer allows tools to control this feature. Learn more about the <a target="_blank" href="https://developers.google.com/youtube/player_parameters#Revision_History">deprecation of this feature here</a>.</strong>
3474
- <span class="epyt-deprecated">Show related and recommended videos during pause and at the end of playback.</span>
3475
  </label>
 
 
 
 
 
 
3476
  </p>
3477
  <p>
3478
  <input name="<?php echo self::$opt_showinfo; ?>" id="<?php echo self::$opt_showinfo; ?>" <?php checked($all[self::$opt_showinfo], 1); ?> type="checkbox" class="checkbox">
@@ -3572,20 +3637,30 @@ class YouTubePrefs
3572
  </p>
3573
  <p class="<?php echo self::vi_logged_in() || !empty($all[self::$opt_vi_active]) ? 'hidden' : '' ?>">
3574
  <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">
3575
- <label for="<?php echo self::$opt_vi_hide_monetize_tab; ?>"><b class="chktitle">Hide "Monetize" Feature:</b> Hide the tab(s) that allow you to sign up with vi.ai (after saving this option, please refresh this page again).</label>
3576
  </p>
3577
- <p>
3578
  <label for="<?php echo self::$opt_not_live_content; ?>">
3579
  <b class="chktitle">Default "Not Live" Content:</b>
3580
- When your channel is not streaming live, the YouTube live player will be inactive. Instead of showing that player, you can display something else in that space for your visitors to actually see until your channel begins to live stream. The plugin will automatically switch to your channel's live stream once it’s active. Below, enter what you would like to appear until then.
 
 
 
3581
  <?php
3582
  if (self::vi_logged_in())
3583
  {
3584
  ?>
3585
- 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 with manage the rest.
 
 
 
 
 
 
3586
  <?php
3587
  }
3588
  ?>
 
3589
  </label>
3590
  <?php
3591
  wp_editor(wp_kses_post($all[self::$opt_not_live_content]), self::$opt_not_live_content, array('textarea_rows' => 7));
@@ -3910,6 +3985,13 @@ class YouTubePrefs
3910
  <b class="chktitle">Legacy Spacing:</b> Continue the spacing style from version 4.0 and older. Those versions required you to manually add spacing above and below your video. Unchecking this will automatically add the spacing.
3911
  </label>
3912
  </p>
 
 
 
 
 
 
 
3913
  <p>
3914
  <input name="<?php echo self::$opt_evselector_light; ?>" id="<?php echo self::$opt_evselector_light; ?>" <?php checked($all[self::$opt_evselector_light], 1); ?> type="checkbox" class="checkbox">
3915
  <label for="<?php echo self::$opt_evselector_light; ?>">
@@ -3965,6 +4047,12 @@ class YouTubePrefs
3965
  <p>
3966
  <b>For self-contained channel playlists:</b> At your editor, click on the <img style="vertical-align: text-bottom;" src="<?php echo plugins_url('images/wizbuttonbig.png', __FILE__) ?>"> wizard button and choose the option <i>Search for a video or channel to insert in my editor.</i> Then, click on the <i>channel playlist</i> option there (instead of <i>single video</i>). Search for the channel username and follow the rest of the directions there.
3967
  </p>
 
 
 
 
 
 
3968
  <p>
3969
  <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>.
3970
  </p>
@@ -4491,6 +4579,7 @@ class YouTubePrefs
4491
  {
4492
  $result = array();
4493
  $default = array(
 
4494
  self::$opt_modestbranding => 0,
4495
  self::$opt_responsive => 0,
4496
  self::$opt_responsive_all => 0,
@@ -4615,14 +4704,14 @@ class YouTubePrefs
4615
  ?>
4616
  <div class="wrap wrap-ytprefs-onboarding">
4617
  <div class="ytprefs-ob-title">
4618
- YouTube Setup Guide: Most Common Settings
4619
  </div>
4620
  <div class="relative">
4621
  <div class="ytprefs-ob-step ytprefs-ob-step1 active-step">
4622
  <div class="ytprefs-ob-content">
4623
  <div class="ytprefs-ob-block">
4624
  <p>
4625
- With so many options available in this plugin, we created this easy setup guide to help you quickly make the most common settings. We hope it will get you embedding videos, galleries, and/or live streams sooner.
4626
  </p>
4627
  <p>
4628
  You'll have an opportunity to see and set many other options after completing this setup guide.
@@ -4665,6 +4754,19 @@ class YouTubePrefs
4665
  <form id="form-onboarding">
4666
  <input type="hidden" name="action" value="my_embedplus_onboarding_save_ajax"/>
4667
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4668
  <div class="ytprefs-ob-setting yob-single yob-gallery yob-standalone yob-live">
4669
  <input value="1" name="<?php echo self::$opt_modestbranding; ?>" id="<?php echo self::$opt_modestbranding; ?>" <?php checked($all[self::$opt_modestbranding], 1); ?> type="checkbox" class="checkbox">
4670
  <label for="<?php echo self::$opt_modestbranding; ?>"><?php _e('<b class="chktitle">Modest Branding:</b> No YouTube logo will be shown on the control bar. Instead, as required by YouTube, the logo will only show as a watermark when the video is paused/stopped.') ?></label>
@@ -4704,7 +4806,10 @@ class YouTubePrefs
4704
  <p>
4705
  <label for="<?php echo self::$opt_not_live_content; ?>">
4706
  <b class="chktitle">Default "Not Live" Content:</b>
4707
- When your channel is not streaming live, the YouTube live player will be inactive. Instead of showing that player, you can display something else in that space for your visitors to actually see until your channel begins to live stream. The plugin will automatically switch to your channel’s live stream once it’s active. Below, enter what you would like to appear until then.
 
 
 
4708
  <?php
4709
  if (self::vi_logged_in())
4710
  {
@@ -4713,6 +4818,7 @@ class YouTubePrefs
4713
  <?php
4714
  }
4715
  ?>
 
4716
  </label>
4717
  </p>
4718
  <?php
@@ -4800,9 +4906,24 @@ class YouTubePrefs
4800
  Some features (such as galleries, and some wizard features) now require you to create a free YouTube API <strong>Server</strong> key from Google.
4801
  Make sure it's a YouTube Data API v3 "Web Server" key as shown in the screenshot (i.e. not web browser or anything else).
4802
  </p>
4803
- <p>
4804
- <a href="https://www.youtube.com/watch?v=6gD0X76-v_g" target="_blank">Click this link &raquo;</a> and follow the video to get your API key. Don't worry, it's an easy process.
4805
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4806
  <p>
4807
  <input type="text" placeholder="Paste your YouTube API key here" name="<?php echo self::$opt_apikey; ?>" id="<?php echo self::$opt_apikey; ?>" value="<?php echo esc_attr(trim($all[self::$opt_apikey])); ?>" class="regular-text" style='max-width: 40%;'>
4808
  </p>
@@ -4825,7 +4946,7 @@ class YouTubePrefs
4825
  <div class="ytprefs-ob-step ytprefs-ob-step4">
4826
  <div class="ytprefs-ob-content">
4827
  <?php
4828
- if (!self::vi_logged_in())
4829
  {
4830
  echo '<div class="vi-registration-box">';
4831
  include_once(EPYTVI_INCLUDES_PATH . 'vi_registration_form.php');
@@ -4834,7 +4955,12 @@ class YouTubePrefs
4834
  }
4835
  else
4836
  {
4837
- include_once(EPYTVI_INCLUDES_PATH . 'vi_login_complete.php');
 
 
 
 
 
4838
  }
4839
  ?>
4840
 
@@ -5726,7 +5852,7 @@ class YouTubePrefs
5726
  {
5727
  return array(
5728
  'code' => -1,
5729
- 'message' => 'A quick reauthentication is needed to begin setting up your ads.txt file. First, log out of this Ads Settings page with the "Logout" button right above and then log back in with your vi login and password. Then come back to this tab for next steps. Your ads.txt verification file will enable you to make money through vi. <a href="https://www.vi.ai/publisherfaq/?aid=WP_embedplus&utm_source=Wordpress&utm_medium=WP_embedplus" target="_blank">FAQ &raquo;</a>'
5730
  );
5731
  }
5732
  else
@@ -5745,8 +5871,9 @@ class YouTubePrefs
5745
  {
5746
  return array(
5747
  'code' => 0,
5748
- 'message' => '<h3>Almost There!</h3> Looks like video intelligence has just updated its ad delivery partners. To get the most revenue out of your ads, open up your '
5749
  . ' <a href="' . self::base_url() . '/ads.txt" target="_blank">ads.txt</a> file and replace the vi lines (ending in # 41b5eef6) with the new lines you see below. Then, refresh this page. '
 
5750
  . ' <strong>If we helped you with your ads.txt in the past, feel free to contact us to help out again with this update.</strong> '
5751
  . '<code># video intelligence (vi.ai) ads.txt lines begin here:' . PHP_EOL . $user_adstxt . PHP_EOL . '# video intelligence (vi.ai) ads.txt lines end</code>'
5752
  );
@@ -5755,8 +5882,8 @@ class YouTubePrefs
5755
  {
5756
  return array(
5757
  'code' => 0,
5758
- 'message' => '<h3>Almost There!</h3>'
5759
- . 'In your current <a href="' . self::base_url() . '/ads.txt" target="_blank">ads.txt</a> file, just add in the additional lines you see below. Then, refresh this page.'
5760
  . '<code># video intelligence (vi.ai) ads.txt lines begin here:' . PHP_EOL . $user_adstxt . PHP_EOL . '# video intelligence (vi.ai) ads.txt lines end</code>'
5761
  );
5762
  }
@@ -5774,8 +5901,8 @@ class YouTubePrefs
5774
  // create manually
5775
  return array(
5776
  'code' => 0,
5777
- 'message' => '<h3>Almost There!</h3>'
5778
- . 'You can <a class="button button-small" href="' . admin_url('admin.php') . '?ytvi_adstxt_download=1&key=' . urlencode(self::$alloptions[self::$opt_vi_token]) . '">download this ads.txt</a> file and upload it to your site root (or copy the same text below). Then, refresh this page to verify.'
5779
  . '<code># video intelligence (vi.ai) ads.txt lines begin here:' . PHP_EOL . $user_adstxt . PHP_EOL . '# video intelligence (vi.ai) ads.txt lines end</code>'
5780
  );
5781
  }
@@ -5844,7 +5971,7 @@ class YouTubePrefs
5844
  $new_adstxt = $former_adstxt . (strlen($former_adstxt) > 0 ? PHP_EOL : '') . ($user_adstxt === false ? '' : $user_adstxt);
5845
 
5846
  $new_adstxt = '# video intelligence (vi.ai) ads.txt lines begin here:' . PHP_EOL . $new_adstxt . PHP_EOL . '# video intelligence (vi.ai) ads.txt lines end';
5847
-
5848
  header("Expires: 0");
5849
  header("Cache-Control: no-cache, no-store, must-revalidate");
5850
  header('Cache-Control: pre-check=0, post-check=0, max-age=0', false);
@@ -5922,6 +6049,18 @@ class YouTubePrefs
5922
  $options = $readonly + $options;
5923
 
5924
  $jsTagAPI = self::$alloptions[self::$opt_vi_endpoints]->jsTagAPI;
 
 
 
 
 
 
 
 
 
 
 
 
5925
  $apiResult = self::vi_remote_post($jsTagAPI, array(
5926
  'body' => json_encode($options)
5927
  ));
@@ -5932,7 +6071,8 @@ class YouTubePrefs
5932
  $mod_data = $apiResult->data;
5933
 
5934
  $new_options = array(
5935
- self::$opt_vi_js_script => $mod_data
 
5936
  );
5937
 
5938
  self::update_option_set($new_options);
@@ -5979,7 +6119,7 @@ class YouTubePrefs
5979
  $item[self::$opt_vi_js_settings]['iabCategory'] = sanitize_text_field($item[self::$opt_vi_js_settings]['iabCategory']);
5980
  if (empty($item[self::$opt_vi_js_settings]['iabCategory']))
5981
  {
5982
- $messages[] = 'Please choose a valid IAB category under Video Categories.';
5983
  }
5984
  $item[self::$opt_vi_js_settings]['language'] = sanitize_text_field($item[self::$opt_vi_js_settings]['language']);
5985
  if (empty($item[self::$opt_vi_js_settings]['language']))
@@ -6019,7 +6159,7 @@ class YouTubePrefs
6019
  }
6020
  else
6021
  {
6022
- $messages[] = 'A quick re-authentication is required to save your most recent customizations. Simply log out of this Ads Settings page with the "Logout" button right above and then log back in with your vi login and password. ';
6023
  $messages = array_merge($messages, $js);
6024
  }
6025
  }
@@ -6117,6 +6257,17 @@ class YouTubePrefs
6117
  <?php self::vi_print_toggle_button(); ?>
6118
  </h1>
6119
  <br>
 
 
 
 
 
 
 
 
 
 
 
6120
  <?php
6121
  if (!empty($notice))
6122
  {
@@ -6133,7 +6284,6 @@ class YouTubePrefs
6133
 
6134
  self::vi_settings_nav();
6135
 
6136
- //xxx
6137
  // echo '<pre>';
6138
  // print_r(_get_cron_array());
6139
  // echo '</pre>';
@@ -6143,6 +6293,8 @@ class YouTubePrefs
6143
  <input type="hidden" name="nonce" value="<?php echo wp_create_nonce(basename(__FILE__)) ?>"/>
6144
  <section class="pattern" id="jumphowitworks">
6145
  <h2>How It Works</h2>
 
 
6146
  <div class="vi-how-works" data-jump="#jumpdescription">
6147
  <div class="vi-num">1</div>
6148
  <img src="<?php echo plugins_url(self::$folder_name . '/images/icon-hw-description.png') ?>"/>
@@ -6206,20 +6358,25 @@ class YouTubePrefs
6206
  <img src="<?php echo plugins_url(self::$folder_name . '/images/adstxt-help.png') . '?ver=' . self::$version; ?>"/>
6207
  Trouble getting content that fits your site, even with the proper settings above/below? Contact support at <strong><a href="mailto:ext@embedplus.com">ext@embedplus.com</a></strong>
6208
  </div>
6209
- <h2><span class="vi-num">1</span> Video Categories</h2>
 
 
 
6210
  <p>
6211
- Your video ad will be optimized to relate to your site's content. Note that the quality of the matches improves over time.
 
6212
  </p>
6213
  <table cellspacing="2" cellpadding="5" style="width: 100%;" class="form-table">
6214
  <tbody>
6215
  <tr class="form-field">
6216
  <th valign="top" scope="row">
6217
- <label for="<?php echo self::$opt_vi_js_settings ?>[iabCategory]">IAB Category</label>
6218
- <small>Select the category and subcategory that most fit your website.</small>
6219
  </th>
6220
  <td>
 
6221
  <select class="iab-cat-parent">
6222
- <option value="">None Selected</option>
6223
  <option value="IAB1">Arts & Entertainment</option>
6224
  <option value="IAB2">Automotive</option>
6225
  <option value="IAB3">Business</option>
@@ -6247,398 +6404,403 @@ class YouTubePrefs
6247
  <option value="IAB25">Non-Standard Content</option>
6248
  </select>
6249
  <div class="iab-cat-child-box hidden">
6250
- Subcategory:
6251
- <select class="iab-cat-child" name="<?php echo self::$opt_vi_js_settings ?>[iabCategory]" id="<?php echo self::$opt_vi_js_settings ?>[iabCategory]" required disabled>
6252
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "") ?> value="">None Selected</option>
6253
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB1") ?> value="IAB1">Arts & Entertainment (All)</option>
6254
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB1-1") ?> value="IAB1-1">Books & Literature</option>
6255
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB1-2") ?> value="IAB1-2">Celebrity Fan/Gossip</option>
6256
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB1-3") ?> value="IAB1-3">Fine Art</option>
6257
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB1-4") ?> value="IAB1-4">Humor</option>
6258
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB1-5") ?> value="IAB1-5">Movies</option>
6259
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB1-6") ?> value="IAB1-6">Music</option>
6260
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB1-7") ?> value="IAB1-7">Television</option>
6261
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB2") ?> value="IAB2">Automotive (All)</option>
6262
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB2-1") ?> value="IAB2-1">Auto Parts</option>
6263
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB2-2") ?> value="IAB2-2">Auto Repair</option>
6264
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB2-3") ?> value="IAB2-3">Buying/Selling Cars</option>
6265
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB2-4") ?> value="IAB2-4">Car Culture</option>
6266
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB2-5") ?> value="IAB2-5">Certified Pre-Owned</option>
6267
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB2-6") ?> value="IAB2-6">Convertible</option>
6268
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB2-7") ?> value="IAB2-7">Coupe</option>
6269
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB2-8") ?> value="IAB2-8">Crossover</option>
6270
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB2-9") ?> value="IAB2-9">Diesel</option>
6271
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB2-10") ?> value="IAB2-10">Electric Vehicle</option>
6272
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB2-11") ?> value="IAB2-11">Hatchback</option>
6273
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB2-12") ?> value="IAB2-12">Hybrid</option>
6274
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB2-13") ?> value="IAB2-13">Luxury</option>
6275
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB2-14") ?> value="IAB2-14">MiniVan</option>
6276
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB2-15") ?> value="IAB2-15">Mororcycles</option>
6277
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB2-16") ?> value="IAB2-16">Off-Road Vehicles</option>
6278
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB2-17") ?> value="IAB2-17">Performance Vehicles</option>
6279
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB2-18") ?> value="IAB2-18">Pickup</option>
6280
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB2-19") ?> value="IAB2-19">Road-Side Assistance</option>
6281
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB2-20") ?> value="IAB2-20">Sedan</option>
6282
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB2-21") ?> value="IAB2-21">Trucks & Accessories</option>
6283
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB2-22") ?> value="IAB2-22">Vintage Cars</option>
6284
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB2-23") ?> value="IAB2-23">Wagon</option>
6285
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB3") ?> value="IAB3">Business (All)</option>
6286
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB3-1") ?> value="IAB3-1">Advertising</option>
6287
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB3-2") ?> value="IAB3-2">Agriculture</option>
6288
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB3-3") ?> value="IAB3-3">Biotech/Biomedical</option>
6289
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB3-4") ?> value="IAB3-4">Business Software</option>
6290
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB3-5") ?> value="IAB3-5">Construction</option>
6291
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB3-6") ?> value="IAB3-6">Forestry</option>
6292
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB3-7") ?> value="IAB3-7">Government</option>
6293
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB3-8") ?> value="IAB3-8">Green Solutions</option>
6294
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB3-9") ?> value="IAB3-9">Human Resources</option>
6295
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB3-10") ?> value="IAB3-10">Logistics</option>
6296
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB3-11") ?> value="IAB3-11">Marketing</option>
6297
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB3-12") ?> value="IAB3-12">Metals</option>
6298
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB4") ?> value="IAB4">Careers (All)</option>
6299
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB4-1") ?> value="IAB4-1">Career Planning</option>
6300
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB4-2") ?> value="IAB4-2">College</option>
6301
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB4-3") ?> value="IAB4-3">Financial Aid</option>
6302
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB4-4") ?> value="IAB4-4">Job Fairs</option>
6303
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB4-5") ?> value="IAB4-5">Job Search</option>
6304
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB4-6") ?> value="IAB4-6">Resume Writing/Advice</option>
6305
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB4-7") ?> value="IAB4-7">Nursing</option>
6306
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB4-8") ?> value="IAB4-8">Scholarships</option>
6307
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB4-9") ?> value="IAB4-9">Telecommuting</option>
6308
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB4-10") ?> value="IAB4-10">U.S. Military</option>
6309
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB4-11") ?> value="IAB4-11">Career Advice</option>
6310
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB5") ?> value="IAB5">Education (All)</option>
6311
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB5-1") ?> value="IAB5-1">7-12 Education</option>
6312
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB5-2") ?> value="IAB5-2">Adult Education</option>
6313
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB5-3") ?> value="IAB5-3">Art History</option>
6314
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB5-4") ?> value="IAB5-4">Colledge Administration</option>
6315
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB5-5") ?> value="IAB5-5">College Life</option>
6316
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB5-6") ?> value="IAB5-6">Distance Learning</option>
6317
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB5-7") ?> value="IAB5-7">English as a 2nd Language</option>
6318
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB5-8") ?> value="IAB5-8">Language Learning</option>
6319
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB5-9") ?> value="IAB5-9">Graduate School</option>
6320
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB5-10") ?> value="IAB5-10">Homeschooling</option>
6321
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB5-11") ?> value="IAB5-11">Homework/Study Tips</option>
6322
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB5-12") ?> value="IAB5-12">K-6 Educators</option>
6323
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB5-13") ?> value="IAB5-13">Private School</option>
6324
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB5-14") ?> value="IAB5-14">Special Education</option>
6325
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB5-15") ?> value="IAB5-15">Studying Business</option>
6326
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB6") ?> value="IAB6">Family & Parenting (All)</option>
6327
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB6-1") ?> value="IAB6-1">Adoption</option>
6328
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB6-2") ?> value="IAB6-2">Babies & Toddlers</option>
6329
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB6-3") ?> value="IAB6-3">Daycare/Pre School</option>
6330
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB6-4") ?> value="IAB6-4">Family Internet</option>
6331
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB6-5") ?> value="IAB6-5">Parenting - K-6 Kids</option>
6332
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB6-6") ?> value="IAB6-6">Parenting teens</option>
6333
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB6-7") ?> value="IAB6-7">Pregnancy</option>
6334
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB6-8") ?> value="IAB6-8">Special Needs Kids</option>
6335
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB6-9") ?> value="IAB6-9">Eldercare</option>
6336
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7") ?> value="IAB7">Health & Fitness (All)</option>
6337
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-1") ?> value="IAB7-1">Exercise</option>
6338
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-2") ?> value="IAB7-2">A.D.D.</option>
6339
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-3") ?> value="IAB7-3">AIDS/HIV</option>
6340
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-4") ?> value="IAB7-4">Allergies</option>
6341
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-5") ?> value="IAB7-5">Alternative Medicine</option>
6342
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-6") ?> value="IAB7-6">Arthritis</option>
6343
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-7") ?> value="IAB7-7">Asthma</option>
6344
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-8") ?> value="IAB7-8">Autism/PDD</option>
6345
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-9") ?> value="IAB7-9">Bipolar Disorder</option>
6346
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-10") ?> value="IAB7-10">Brain Tumor</option>
6347
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-11") ?> value="IAB7-11">Cancer</option>
6348
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-12") ?> value="IAB7-12">Cholesterol</option>
6349
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-13") ?> value="IAB7-13">Chronic Fatigue Syndrome</option>
6350
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-14") ?> value="IAB7-14">Chronic Pain</option>
6351
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-15") ?> value="IAB7-15">Cold & Flu</option>
6352
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-16") ?> value="IAB7-16">Deafness</option>
6353
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-17") ?> value="IAB7-17">Dental Care</option>
6354
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-18") ?> value="IAB7-18">Depression</option>
6355
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-19") ?> value="IAB7-19">Dermatology</option>
6356
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-20") ?> value="IAB7-20">Diabetes</option>
6357
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-21") ?> value="IAB7-21">Epilepsy</option>
6358
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-22") ?> value="IAB7-22">GERD/Acid Reflux</option>
6359
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-23") ?> value="IAB7-23">Headaches/Migraines</option>
6360
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-24") ?> value="IAB7-24">Heart Disease</option>
6361
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-25") ?> value="IAB7-25">Herbs for Health</option>
6362
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-26") ?> value="IAB7-26">Holistic Healing</option>
6363
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-27") ?> value="IAB7-27">IBS/Crohn's Disease</option>
6364
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-28") ?> value="IAB7-28">Incest/Abuse Support</option>
6365
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-29") ?> value="IAB7-29">Incontinence</option>
6366
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-30") ?> value="IAB7-30">Infertility</option>
6367
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-31") ?> value="IAB7-31">Men's Health</option>
6368
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-32") ?> value="IAB7-32">Nutrition</option>
6369
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-33") ?> value="IAB7-33">Orthopedics</option>
6370
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-34") ?> value="IAB7-34">Panic/Anxiety Disorders</option>
6371
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-35") ?> value="IAB7-35">Pediatrics</option>
6372
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-36") ?> value="IAB7-36">Physical Therapy</option>
6373
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-37") ?> value="IAB7-37">Psychology/Psychiatry</option>
6374
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-38") ?> value="IAB7-38">Senor Health</option>
6375
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-39") ?> value="IAB7-39">Sexuality</option>
6376
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-40") ?> value="IAB7-40">Sleep Disorders</option>
6377
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-41") ?> value="IAB7-41">Smoking Cessation</option>
6378
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-42") ?> value="IAB7-42">Substance Abuse</option>
6379
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-43") ?> value="IAB7-43">Thyroid Disease</option>
6380
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-44") ?> value="IAB7-44">Weight Loss</option>
6381
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB7-45") ?> value="IAB7-45">Women's Health</option>
6382
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB8") ?> value="IAB8">Food & Drink (All)</option>
6383
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB8-1") ?> value="IAB8-1">American Cuisine</option>
6384
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB8-2") ?> value="IAB8-2">Barbecues & Grilling</option>
6385
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB8-3") ?> value="IAB8-3">Cajun/Creole</option>
6386
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB8-4") ?> value="IAB8-4">Chinese Cuisine</option>
6387
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB8-5") ?> value="IAB8-5">Cocktails/Beer</option>
6388
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB8-6") ?> value="IAB8-6">Coffee/Tea</option>
6389
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB8-7") ?> value="IAB8-7">Cuisine-Specific</option>
6390
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB8-8") ?> value="IAB8-8">Desserts & Baking</option>
6391
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB8-9") ?> value="IAB8-9">Dining Out</option>
6392
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB8-10") ?> value="IAB8-10">Food Allergies</option>
6393
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB8-11") ?> value="IAB8-11">French Cuisine</option>
6394
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB8-12") ?> value="IAB8-12">Health/Lowfat Cooking</option>
6395
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB8-13") ?> value="IAB8-13">Italian Cuisine</option>
6396
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB8-14") ?> value="IAB8-14">Japanese Cuisine</option>
6397
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB8-15") ?> value="IAB8-15">Mexican Cuisine</option>
6398
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB8-16") ?> value="IAB8-16">Vegan</option>
6399
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB8-17") ?> value="IAB8-17">Vegetarian</option>
6400
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB8-18") ?> value="IAB8-18">Wine</option>
6401
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9") ?> value="IAB9">Hobbies & Interests (All)</option>
6402
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-1") ?> value="IAB9-1">Art/Technology</option>
6403
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-2") ?> value="IAB9-2">Arts & Crafts</option>
6404
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-3") ?> value="IAB9-3">Beadwork</option>
6405
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-4") ?> value="IAB9-4">Birdwatching</option>
6406
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-5") ?> value="IAB9-5">Board Games/Puzzles</option>
6407
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-6") ?> value="IAB9-6">Candle & Soap Making</option>
6408
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-7") ?> value="IAB9-7">Card Games</option>
6409
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-8") ?> value="IAB9-8">Chess</option>
6410
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-9") ?> value="IAB9-9">Cigars</option>
6411
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-10") ?> value="IAB9-10">Collecting</option>
6412
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-11") ?> value="IAB9-11">Comic Books</option>
6413
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-12") ?> value="IAB9-12">Drawing/Sketching</option>
6414
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-13") ?> value="IAB9-13">Freelance Writing</option>
6415
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-14") ?> value="IAB9-14">Genealogy</option>
6416
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-15") ?> value="IAB9-15">Getting Published</option>
6417
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-16") ?> value="IAB9-16">Guitar</option>
6418
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-17") ?> value="IAB9-17">Home Recording</option>
6419
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-18") ?> value="IAB9-18">Investors & Patents</option>
6420
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-19") ?> value="IAB9-19">Jewelry Making</option>
6421
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-20") ?> value="IAB9-20">Magic & Illusion</option>
6422
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-21") ?> value="IAB9-21">Needlework</option>
6423
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-22") ?> value="IAB9-22">Painting</option>
6424
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-23") ?> value="IAB9-23">Photography</option>
6425
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-24") ?> value="IAB9-24">Radio</option>
6426
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-25") ?> value="IAB9-25">Roleplaying Games</option>
6427
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-26") ?> value="IAB9-26">Sci-Fi & Fantasy</option>
6428
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-27") ?> value="IAB9-27">Scrapbooking</option>
6429
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-28") ?> value="IAB9-28">Screenwriting</option>
6430
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-29") ?> value="IAB9-29">Stamps & Coins</option>
6431
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-30") ?> value="IAB9-30">Video & Computer Games</option>
6432
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB9-31") ?> value="IAB9-31">Woodworking</option>
6433
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB10") ?> value="IAB10">Home & Garden (All)</option>
6434
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB10-1") ?> value="IAB10-1">Appliances</option>
6435
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB10-2") ?> value="IAB10-2">Entertaining</option>
6436
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB10-3") ?> value="IAB10-3">Environmental Safety</option>
6437
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB10-4") ?> value="IAB10-4">Gardening</option>
6438
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB10-5") ?> value="IAB10-5">Home Repair</option>
6439
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB10-6") ?> value="IAB10-6">Home Theater</option>
6440
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB10-7") ?> value="IAB10-7">Interior Decorating</option>
6441
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB10-8") ?> value="IAB10-8">Landscaping</option>
6442
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB10-9") ?> value="IAB10-9">Remodeling & Construction</option>
6443
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB11") ?> value="IAB11">Law, Gov't & Politics (All)</option>
6444
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB11-1") ?> value="IAB11-1">Immigration</option>
6445
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB11-2") ?> value="IAB11-2">Legal Issues</option>
6446
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB11-3") ?> value="IAB11-3">U.S. Government Resources</option>
6447
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB11-4") ?> value="IAB11-4">Politics</option>
6448
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB11-5") ?> value="IAB11-5">Commentary</option>
6449
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB12") ?> value="IAB12">News (All)</option>
6450
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB12-1") ?> value="IAB12-1">International News</option>
6451
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB12-2") ?> value="IAB12-2">National News</option>
6452
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB12-3") ?> value="IAB12-3">Local News</option>
6453
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB13") ?> value="IAB13">Personal Finance (All)</option>
6454
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB13-1") ?> value="IAB13-1">Beginning Investing</option>
6455
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB13-2") ?> value="IAB13-2">Credit/Debt & Loans</option>
6456
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB13-3") ?> value="IAB13-3">Financial News</option>
6457
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB13-4") ?> value="IAB13-4">Financial Planning</option>
6458
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB13-5") ?> value="IAB13-5">Hedge Fund</option>
6459
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB13-6") ?> value="IAB13-6">Insurance</option>
6460
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB13-7") ?> value="IAB13-7">Investing</option>
6461
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB13-8") ?> value="IAB13-8">Mutual Funds</option>
6462
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB13-9") ?> value="IAB13-9">Options</option>
6463
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB13-10") ?> value="IAB13-10">Retirement Planning</option>
6464
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB13-11") ?> value="IAB13-11">Stocks</option>
6465
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB13-12") ?> value="IAB13-12">Tax Planning</option>
6466
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB14") ?> value="IAB14">Society (All)</option>
6467
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB14-1") ?> value="IAB14-1">Dating</option>
6468
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB14-2") ?> value="IAB14-2">Divorce Support</option>
6469
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB14-3") ?> value="IAB14-3">Gay Life</option>
6470
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB14-4") ?> value="IAB14-4">Marriage</option>
6471
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB14-5") ?> value="IAB14-5">Senior Living</option>
6472
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB14-6") ?> value="IAB14-6">Teens</option>
6473
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB14-7") ?> value="IAB14-7">Weddings</option>
6474
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB14-8") ?> value="IAB14-8">Ethnic Specific</option>
6475
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB15") ?> value="IAB15">Science (All)</option>
6476
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB15-1") ?> value="IAB15-1">Astrology</option>
6477
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB15-2") ?> value="IAB15-2">Biology</option>
6478
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB15-3") ?> value="IAB15-3">Chemistry</option>
6479
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB15-4") ?> value="IAB15-4">Geology</option>
6480
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB15-5") ?> value="IAB15-5">Paranormal Phenomena</option>
6481
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB15-6") ?> value="IAB15-6">Physics</option>
6482
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB15-7") ?> value="IAB15-7">Space/Astronomy</option>
6483
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB15-8") ?> value="IAB15-8">Geography</option>
6484
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB15-9") ?> value="IAB15-9">Botany</option>
6485
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB15-10") ?> value="IAB15-10">Weather</option>
6486
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB16") ?> value="IAB16">Pets (All)</option>
6487
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB16-1") ?> value="IAB16-1">Aquariums</option>
6488
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB16-2") ?> value="IAB16-2">Birds</option>
6489
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB16-3") ?> value="IAB16-3">Cats</option>
6490
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB16-4") ?> value="IAB16-4">Dogs</option>
6491
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB16-5") ?> value="IAB16-5">Large Animals</option>
6492
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB16-6") ?> value="IAB16-6">Reptiles</option>
6493
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB16-7") ?> value="IAB16-7">Veterinary Medicine</option>
6494
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17") ?> value="IAB17">Sports (All)</option>
6495
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-1") ?> value="IAB17-1">Auto Racing</option>
6496
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-2") ?> value="IAB17-2">Baseball</option>
6497
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-3") ?> value="IAB17-3">Bicycling</option>
6498
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-4") ?> value="IAB17-4">Bodybuilding</option>
6499
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-5") ?> value="IAB17-5">Boxing</option>
6500
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-6") ?> value="IAB17-6">Canoeing/Kayaking</option>
6501
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-7") ?> value="IAB17-7">Cheerleading</option>
6502
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-8") ?> value="IAB17-8">Climbing</option>
6503
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-9") ?> value="IAB17-9">Cricket</option>
6504
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-10") ?> value="IAB17-10">Figure Skating</option>
6505
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-11") ?> value="IAB17-11">Fly Fishing</option>
6506
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-12") ?> value="IAB17-12">Football</option>
6507
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-13") ?> value="IAB17-13">Freshwater Fishing</option>
6508
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-14") ?> value="IAB17-14">Game & Fish</option>
6509
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-15") ?> value="IAB17-15">Golf</option>
6510
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-16") ?> value="IAB17-16">Horse Racing</option>
6511
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-17") ?> value="IAB17-17">Horses</option>
6512
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-18") ?> value="IAB17-18">Hunting/Shooting</option>
6513
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-19") ?> value="IAB17-19">Inline Skating</option>
6514
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-20") ?> value="IAB17-20">Martial Arts</option>
6515
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-21") ?> value="IAB17-21">Mountain Biking</option>
6516
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-22") ?> value="IAB17-22">NASCAR Racing</option>
6517
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-23") ?> value="IAB17-23">Olympics</option>
6518
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-24") ?> value="IAB17-24">Paintball</option>
6519
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-25") ?> value="IAB17-25">Power & Motorcycles</option>
6520
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-26") ?> value="IAB17-26">Pro Basketball</option>
6521
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-27") ?> value="IAB17-27">Pro Ice Hockey</option>
6522
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-28") ?> value="IAB17-28">Rodeo</option>
6523
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-29") ?> value="IAB17-29">Rugby</option>
6524
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-30") ?> value="IAB17-30">Running/Jogging</option>
6525
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-31") ?> value="IAB17-31">Sailing</option>
6526
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-32") ?> value="IAB17-32">Saltwater Fishing</option>
6527
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-33") ?> value="IAB17-33">Scuba Diving</option>
6528
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-34") ?> value="IAB17-34">Skateboarding</option>
6529
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-35") ?> value="IAB17-35">Skiing</option>
6530
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-36") ?> value="IAB17-36">Snowboarding</option>
6531
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-37") ?> value="IAB17-37">Surfing/Bodyboarding</option>
6532
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-38") ?> value="IAB17-38">Swimming</option>
6533
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-39") ?> value="IAB17-39">Table Tennis/Ping-Pong</option>
6534
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-40") ?> value="IAB17-40">Tennis</option>
6535
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-41") ?> value="IAB17-41">Volleyball</option>
6536
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-42") ?> value="IAB17-42">Walking</option>
6537
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-43") ?> value="IAB17-43">Waterski/Wakeboard</option>
6538
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB17-44") ?> value="IAB17-44">World Soccer</option>
6539
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB18") ?> value="IAB18">Style & Fashion (All)</option>
6540
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB18-1") ?> value="IAB18-1">Beauty</option>
6541
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB18-2") ?> value="IAB18-2">Body Art</option>
6542
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB18-3") ?> value="IAB18-3">Fashion</option>
6543
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB18-4") ?> value="IAB18-4">Jewelry</option>
6544
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB18-5") ?> value="IAB18-5">Clothing</option>
6545
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB18-6") ?> value="IAB18-6">Accessories</option>
6546
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19") ?> value="IAB19">Technology & Computing (All)</option>
6547
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-1") ?> value="IAB19-1">3-D Graphics</option>
6548
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-2") ?> value="IAB19-2">Animation</option>
6549
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-3") ?> value="IAB19-3">Antivirus Software</option>
6550
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-4") ?> value="IAB19-4">C/C++</option>
6551
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-5") ?> value="IAB19-5">Cameras & Camcorders</option>
6552
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-6") ?> value="IAB19-6">Cell Phones</option>
6553
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-7") ?> value="IAB19-7">Computer Certification</option>
6554
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-8") ?> value="IAB19-8">Computer Networking</option>
6555
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-9") ?> value="IAB19-9">Computer Peripherals</option>
6556
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-10") ?> value="IAB19-10">Computer Reviews</option>
6557
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-11") ?> value="IAB19-11">Data Centers</option>
6558
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-12") ?> value="IAB19-12">Databases</option>
6559
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-13") ?> value="IAB19-13">Desktop Publishing</option>
6560
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-14") ?> value="IAB19-14">Desktop Video</option>
6561
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-15") ?> value="IAB19-15">Email</option>
6562
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-16") ?> value="IAB19-16">Graphics Software</option>
6563
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-17") ?> value="IAB19-17">Home Video/DVD</option>
6564
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-18") ?> value="IAB19-18">Internet Technology</option>
6565
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-19") ?> value="IAB19-19">Java</option>
6566
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-20") ?> value="IAB19-20">JavaScript</option>
6567
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-21") ?> value="IAB19-21">Mac Support</option>
6568
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-22") ?> value="IAB19-22">MP3/MIDI</option>
6569
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-23") ?> value="IAB19-23">Net Conferencing</option>
6570
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-24") ?> value="IAB19-24">Net for Beginners</option>
6571
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-25") ?> value="IAB19-25">Network Security</option>
6572
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-26") ?> value="IAB19-26">Palmtops/PDAs</option>
6573
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-27") ?> value="IAB19-27">PC Support</option>
6574
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-28") ?> value="IAB19-28">Portable</option>
6575
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-29") ?> value="IAB19-29">Entertainment</option>
6576
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-30") ?> value="IAB19-30">Shareware/Freeware</option>
6577
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-31") ?> value="IAB19-31">Unix</option>
6578
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-32") ?> value="IAB19-32">Visual Basic</option>
6579
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-33") ?> value="IAB19-33">Web Clip Art</option>
6580
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-34") ?> value="IAB19-34">Web Design/HTML</option>
6581
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-35") ?> value="IAB19-35">Web Search</option>
6582
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB19-36") ?> value="IAB19-36">Windows</option>
6583
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20") ?> value="IAB20">Travel (All)</option>
6584
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-1") ?> value="IAB20-1">Adventure Travel</option>
6585
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-2") ?> value="IAB20-2">Africa</option>
6586
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-3") ?> value="IAB20-3">Air Travel</option>
6587
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-4") ?> value="IAB20-4">Australia & New Zealand</option>
6588
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-5") ?> value="IAB20-5">Bed & Breakfasts</option>
6589
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-6") ?> value="IAB20-6">Budget Travel</option>
6590
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-7") ?> value="IAB20-7">Business Travel</option>
6591
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-8") ?> value="IAB20-8">By US Locale</option>
6592
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-9") ?> value="IAB20-9">Camping</option>
6593
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-10") ?> value="IAB20-10">Canada</option>
6594
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-11") ?> value="IAB20-11">Caribbean</option>
6595
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-12") ?> value="IAB20-12">Cruises</option>
6596
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-13") ?> value="IAB20-13">Eastern Europe</option>
6597
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-14") ?> value="IAB20-14">Europe</option>
6598
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-15") ?> value="IAB20-15">France</option>
6599
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-16") ?> value="IAB20-16">Greece</option>
6600
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-17") ?> value="IAB20-17">Honeymoons/Getaways</option>
6601
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-18") ?> value="IAB20-18">Hotels</option>
6602
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-19") ?> value="IAB20-19">Italy</option>
6603
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-20") ?> value="IAB20-20">Japan</option>
6604
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-21") ?> value="IAB20-21">Mexico & Central America</option>
6605
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-22") ?> value="IAB20-22">National Parks</option>
6606
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-23") ?> value="IAB20-23">South America</option>
6607
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-24") ?> value="IAB20-24">Spas</option>
6608
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-25") ?> value="IAB20-25">Theme Parks</option>
6609
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-26") ?> value="IAB20-26">Traveling with Kids</option>
6610
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB20-27") ?> value="IAB20-27">United Kingdom</option>
6611
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB21") ?> value="IAB21">Real Estate (All)</option>
6612
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB21-1") ?> value="IAB21-1">Apartments</option>
6613
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB21-2") ?> value="IAB21-2">Architects</option>
6614
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB21-3") ?> value="IAB21-3">Buying/Selling Homes</option>
6615
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB22") ?> value="IAB22">Shopping (All)</option>
6616
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB22-1") ?> value="IAB22-1">Contests & Freebies</option>
6617
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB22-2") ?> value="IAB22-2">Couponing</option>
6618
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB22-3") ?> value="IAB22-3">Comparison</option>
6619
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB22-4") ?> value="IAB22-4">Engines</option>
6620
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB23") ?> value="IAB23">Religion & Spirituality (All)</option>
6621
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB23-1") ?> value="IAB23-1">Alternative Religions</option>
6622
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB23-2") ?> value="IAB23-2">Atheism/Agnosticism</option>
6623
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB23-3") ?> value="IAB23-3">Buddhism</option>
6624
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB23-4") ?> value="IAB23-4">Catholicism</option>
6625
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB23-5") ?> value="IAB23-5">Christianity</option>
6626
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB23-6") ?> value="IAB23-6">Hinduism</option>
6627
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB23-7") ?> value="IAB23-7">Islam</option>
6628
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB23-8") ?> value="IAB23-8">Judaism</option>
6629
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB23-9") ?> value="IAB23-9">Latter-Day Saints</option>
6630
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB23-10") ?> value="IAB23-10">Pagan/Wiccan</option>
6631
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB24") ?> value="IAB24">Uncategorized (All)</option>
6632
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB25") ?> value="IAB25">Non-Standard Content (All)</option>
6633
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB25-1") ?> value="IAB25-1">Unmoderated UGC</option>
6634
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB25-2") ?> value="IAB25-2">Extreme Graphic/Explicit Violence</option>
6635
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB25-3") ?> value="IAB25-3">Pornography</option>
6636
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB25-4") ?> value="IAB25-4">Profane Content</option>
6637
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB25-5") ?> value="IAB25-5">Hate Content</option>
6638
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB25-6") ?> value="IAB25-6">Under Construction</option>
6639
- <option <?php selected($item[self::$opt_vi_js_settings]['iabCategory'], "IAB25-7") ?> value="IAB25-7">Incentivized</option>
6640
- </select>
6641
  </div>
 
 
 
 
 
6642
  </td>
6643
  </tr>
6644
  <tr class="form-field <?php echo empty($item[self::$opt_vi_js_settings]['keywords']) ? ' hidden ' : '' ?>">
@@ -6835,7 +6997,7 @@ margin: 0 auto;
6835
  For optimal revenue, we recommend using the "Top" option:
6836
  </p>
6837
  <ul>
6838
- <li><label><input type="radio" name="<?php echo self::$opt_vi_js_position ?>" value="top" <?php checked($item[self::$opt_vi_js_position] == 'top') ?> /> Top</label></li>
6839
  <li><label><input type="radio" name="<?php echo self::$opt_vi_js_position ?>" value="bottom" <?php checked($item[self::$opt_vi_js_position] == 'bottom') ?> /> Bottom</label></li>
6840
  </ul>
6841
  <p>
@@ -6884,7 +7046,7 @@ margin: 0 auto;
6884
  </div>
6885
  <h2><span class="vi-num">5</span> Ads.txt Verification</h2>
6886
  <p>
6887
- In order for your ads to start generating revenue, verify your ads.txt file:
6888
  </p>
6889
  <div class="adstxt-verify-message">
6890
 
@@ -7162,10 +7324,25 @@ margin: 0 auto;
7162
  {
7163
  if (!self::$vi_script_tag_done && self::$alloptions[self::$opt_vi_active] && self::vi_script_setup_done())
7164
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7165
  self::$vi_script_tag_done = true;
7166
- return '<div class="ytvi-story-container" id="ytvi_story_container"><script class="ytvi-story-script" type="text/javascript">' .
7167
  self::$alloptions[self::$opt_vi_js_script] .
7168
  '</script></div>';
 
7169
  }
7170
  return '';
7171
  }
@@ -7448,6 +7625,25 @@ margin: 0 auto;
7448
  self::$opt_vi_token => ''
7449
  ));
7450
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7451
  }
7452
  catch (Exception $ex)
7453
  {
@@ -7523,7 +7719,7 @@ margin: 0 auto;
7523
  public static function gb_svg_defs()
7524
  {
7525
  ?>
7526
- <svg><defs><style>.epytcls-1{fill:red;}.epytcls-2{fill-rule:evenodd;fill:url(#radial-gradient);}.epytcls-3{fill:#31aaff;}.epytcls-4{fill:#fff;}</style><radialGradient id="radial-gradient" cx="193" cy="85.85" r="77.53" gradientUnits="userSpaceOnUse"><stop offset="0.17" stop-color="#fff"/><stop offset="0.68" stop-color="#31aaff"/></radialGradient></defs></svg>
7527
  <?php
7528
  }
7529
 
@@ -7548,7 +7744,12 @@ margin: 0 auto;
7548
  {
7549
  if ($attributes && $attributes['shortcode'] && strpos($attributes['shortcode'], '[') === 0)
7550
  {
7551
- return do_shortcode($attributes['shortcode']);
 
 
 
 
 
7552
  }
7553
  return isset($attributes['shortcode']) ? $attributes['shortcode'] : '';
7554
  }
3
  Plugin Name: YouTube
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
7
  Author: EmbedPlus Team
8
  Author URI: https://www.embedplus.com
9
  */
10
 
11
  /*
12
  YouTube
13
+ Copyright (C) 2019 EmbedPlus.com
14
 
15
  This program is free software: you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License as published by
34
 
35
  public static $folder_name = 'youtube-embed-plus';
36
  public static $curltimeout = 30;
37
+ public static $version = '13.1';
38
  public static $opt_version = 'version';
39
  public static $optembedwidth = null;
40
  public static $optembedheight = null;
70
  public static $opt_acctitle = 'acctitle';
71
  public static $opt_pro = 'pro';
72
  public static $opt_oldspacing = 'oldspacing';
73
+ public static $opt_frontend_only = 'frontend_only';
74
  public static $opt_responsive = 'responsive';
75
  public static $opt_responsive_all = 'responsive_all';
76
  public static $opt_origin = 'origin';
128
  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>';
129
  ///////////////////////////////////////////////////////////////////////////////////////////////////
130
 
131
+ public static $vi_last_category_update_interval = '1 hour';
132
  public static $vi_script_tag_done = false;
133
  public static $vi_dft_js_settings = array(
134
  //"adUnitType" => "NATIVE_VIDEO_UNIT",
154
  public static $opt_vi_endpoints = 'vi_endpoints';
155
  public static $opt_vi_token = 'vi_token';
156
  public static $opt_vi_last_login = 'vi_last_login';
157
+ public static $opt_vi_last_category_update = 'vi_last_category_update';
158
  public static $opt_vi_adstxt = 'vi_adstxt';
159
  public static $opt_vi_js_settings = 'vi_js_settings';
160
  public static $opt_vi_js_script = 'vi_js_script';
228
  self::do_ytprefs();
229
  add_action('admin_menu', array(get_class(), 'ytprefs_plugin_menu'));
230
  add_filter('plugin_action_links_' . plugin_basename(__FILE__), array(get_class(), 'my_plugin_action_links'));
231
+
232
  if (!is_admin())
233
  {
234
  if (self::$alloptions[self::$opt_old_script_method] == 1)
239
 
240
  add_action('wp_enqueue_scripts', array(get_class(), 'ytprefsscript'), 100);
241
  add_action('wp_enqueue_scripts', array(get_class(), 'fitvids'), 101);
 
 
242
  }
243
 
244
+ add_filter('ytprefs_gdpr_consent_message', array(get_class(), 'filter_gdpr_consent_message'));
245
+
246
  add_action("wp_ajax_my_embedplus_onboarding_save_ajax", array(get_class(), 'onboarding_save_ajax'));
247
  add_action("wp_ajax_my_embedplus_onboarding_save_apikey_ajax", array(get_class(), 'onboarding_save_apikey_ajax'));
248
  add_action("wp_ajax_my_embedplus_glance_vids", array(get_class(), 'my_embedplus_glance_vids'));
645
 
646
 
647
 
648
+ $step1_api_error_msg = ' Please confirm that the link works in your browser, and that <em>the owner of the video allowed embed sharing permissions (otherwise, contact the owner of the video to allow embedding)</em>. Then copy that full link in your address bar to paste here. If you are sure your link is correct, then (1) your API key may be too restrictive (<a target="_blank" href="https://console.developers.google.com/apis/credentials">check here</a>) or (2) you have reached your Google quota (<a href="https://console.developers.google.com/apis/dashboard" target="_blank">check here</a>). You can apply to Google for a <a href="https://services.google.com/fb/forms/ytapiquotarequest/" target="_blank">quota increase here</a>.';
649
  $step1_video_errors = '';
650
  $step1_video_error_invalid = 'Sorry, that does not seem to be a link to an existing video. Please confirm that the link works in your browser, and that <em>the owner of the video allowed embed sharing permissions (otherwise, contact the owner of the video to allow embedding)</em>. Then copy that full link in your address bar to paste here.';
651
  $step1_playlist_errors = '';
652
  $step1_playlist_error_invalid = 'Sorry, that does not seem to be a link to an existing playlist. Please confirm that the link works in your browser, and that <em>the owner of the playlist allowed embed sharing permissions (otherwise, contact the owner of the video to allow embedding)</em>. Then copy that full link in your address bar to paste here.';
653
  $step1_channel_errors = '';
654
+ $step1_channel_error_invalid = 'Sorry, that does not seem to be a link to an existing video. ' . $step1_api_error_msg;
655
  $step1_live_errors = '';
656
+ $step1_live_error_invalid = 'Sorry, that does not seem to be a valid link to an existing live video. ' . $step1_api_error_msg;
657
  $if_live_preview = false;
658
 
659
  $theytid = null;
969
 
970
  try
971
  {
972
+ $theytid = null;
973
+ try
 
 
974
  {
975
+ $theytid = self::try_get_ytid($search);
976
  }
977
+ catch (Exception $ex)
978
  {
979
+
 
 
 
 
 
 
 
 
 
 
 
 
 
980
  }
981
+ $live_attempt = self::get_video_snippet($theytid);
982
+ if ($live_attempt)
983
  {
984
+ $if_live_preview = $live_attempt->id;
985
+ $final_title = sanitize_text_field($live_attempt->snippet->title);
986
+ $final_title_prefix = 'Live Stream';
987
+ }
988
+ $rel = 'https://www.youtube.com/watch?v=' . (esc_attr($theytid)) . '&live=1';
989
+ $doing_live = true;
990
+ ?>
991
+ <div id="step2_live" class="center">
 
992
 
993
+ <h2>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
994
  <?php
995
+ echo 'Live Stream: ' . sanitize_text_field($live_attempt->snippet->title);
 
 
 
 
 
 
 
996
  ?>
997
+ </h2>
998
+ <p class="center">
999
+ <a class="ui-button ui-widget ui-corner-all inserttopost" rel="[embedyt] <?php echo $rel; ?>[/embedyt]"><span class="ui-icon ui-icon-arrowthickstop-1-s"></span> Insert Into Editor</a>
1000
+ &nbsp; <a class="ui-button ui-widget ui-corner-all" href="<?php echo $get_pro_link; ?>" target="_blank"><span class="ui-icon ui-icon-gear"></span> Customize (PRO)</a>
1001
+ </p>
1002
+ <p>
1003
+ Or Copy Code:
1004
+ </p>
1005
+ <p>
1006
+ <span class="copycode">[embedyt] <?php echo $rel; ?>[/embedyt]</span>
1007
+ </p>
1008
+ <div class="clearboth" style="height: 10px;">
1009
  </div>
1010
  <?php
1011
+ if ($if_live_preview)
1012
+ {
1013
+ ?>
1014
+ <div class="center relative">
1015
+ <iframe src="https://www.youtube.com/embed/<?php echo esc_attr($if_live_preview) ?>?rel=0" allowfullscreen="" width="854" height="480" frameborder="0"></iframe>
1016
+ </div>
1017
+ <?php
1018
+ }
1019
+ ?>
1020
+ <p>
1021
+ <strong>Is your live stream not working?</strong> According to Google/YouTube rules, there must be an active AdSense account that's connected to the live
1022
+ stream's channel (for monetization) in order embed the stream. If you own the channel, we suggest that you attach an AdSense account. Otherwise, you will
1023
+ likely just see a blank screen when you embed your stream, even if it is visible on YouTube.com.
1024
+ Read more here: <a href="https://support.google.com/youtube/answer/2474026?hl=en" target="_blank">https://support.google.com/youtube/answer/2474026?hl=en</a>
1025
+ </p>
1026
+ </div>
1027
+ <?php
1028
  }
1029
  catch (Exception $ex)
1030
  {
1156
  </div>
1157
  <h3 id="h3_live"> <a href="#">Embed a live stream. </a></h3>
1158
  <div>
1159
+ <h4 class="center">Live stream directions</h4>
1160
  <?php
1161
  if (!self::has_api_key())
1162
  {
1165
  else
1166
  {
1167
  ?>
1168
+ <p>
1169
+ Important: You can embed any public livestreams from any channel that YouTube/Google has approved to be <strong>Eligible</strong> and <strong>Enabled</strong>.
1170
+ If you're trying to embed a livestream from your own channel, you can check make sure it is <strong>Eligible</strong> and <strong>Enabled</strong> by <a href="https://www.youtube.com/features" target="_blank">visiting here.</a>
1171
+ You are verified if you see the word "Enabled" at the bottom of the box that is labeled "Embed live streams." Note that verification can only be done directly through YouTube/Google with the link above, and this plugin cannot automatically do that.
1172
+ </p>
1173
+ <p>
1174
+ Once you have the link for a live stream, follow the steps below.
1175
+ </p>
1176
  <ol>
1177
+ <li>
1178
+ Paste in the direct URL of the live stream below and click Submit. Example: https://www.youtube.com/watch?v=<strong>hHW1oY26kxQ</strong>
 
 
 
1179
  </li>
1180
+ <li>
1181
+ On the next screen, customize or insert your video.
1182
  </li>
1183
  </ol>
1184
  <form name="wizform_live" method="post" action="" class="wizform" id="wizform_live">
1196
  if (current_user_can('manage_options') && !self::vi_logged_in() && !(bool) (self::$alloptions[self::$opt_vi_hide_monetize_tab]))
1197
  {
1198
  ?>
1199
+ <h3 id="h3_vi_monetize"> <a href="#"> Earn money embedding videos. <sup class="orange">new</sup> </a></h3>
1200
  <div class="h3_vi_monetize-content">
1201
  <div class="vi-registration-box">
1202
  <?php
1691
  $_migrate_embedplusvideo = 0;
1692
  $_controls = 2;
1693
  $_oldspacing = 1;
1694
+ $_frontend_only = 1;
1695
  $_responsive = 0;
1696
  $_responsive_all = 1;
1697
  $_widgetfit = 1;
1738
  $_vi_endpoints = '';
1739
  $_vi_token = '';
1740
  $_vi_last_login = date('Y-m-d H:i:s', strtotime('2000-01-01'));
1741
+ $_vi_last_category_update = date('Y-m-d H:i:s', strtotime('2000-01-01'));
1742
  $_vi_adstxt = '';
1743
  $_vi_js_settings = self::$vi_dft_js_settings;
1744
  $_vi_js_script = '';
1782
  $_migrate_embedplusvideo = self::tryget($arroptions, self::$opt_migrate_embedplusvideo, 0);
1783
  $_controls = self::tryget($arroptions, self::$opt_controls, 2);
1784
  $_oldspacing = self::tryget($arroptions, self::$opt_oldspacing, 1);
1785
+ $_frontend_only = self::tryget($arroptions, self::$opt_frontend_only, $_frontend_only);
1786
  $_responsive = self::tryget($arroptions, self::$opt_responsive, 0);
1787
  $_responsive_all = self::tryget($arroptions, self::$opt_responsive_all, 1);
1788
  $_widgetfit = self::tryget($arroptions, self::$opt_widgetfit, 1);
1816
  $_gallery_customprev = self::tryget($arroptions, self::$opt_gallery_customprev, $_gallery_customprev);
1817
  $_not_live_content = self::tryget($arroptions, self::$opt_not_live_content, $_not_live_content);
1818
  $_admin_off_scripts = self::tryget($arroptions, self::$opt_admin_off_scripts, $_admin_off_scripts);
1819
+ $_onboarded = 0; // self::tryget($arroptions, self::$opt_onboarded, $_onboarded);
1820
 
1821
  $_vi_active = self::tryget($arroptions, self::$opt_vi_active, $_vi_active);
1822
  $_vi_hide_monetize_tab = self::tryget($arroptions, self::$opt_vi_hide_monetize_tab, $_vi_hide_monetize_tab);
1823
  $_vi_endpoints = self::tryget($arroptions, self::$opt_vi_endpoints, $_vi_endpoints);
1824
  $_vi_token = self::tryget($arroptions, self::$opt_vi_token, $_vi_token);
1825
  $_vi_last_login = self::tryget($arroptions, self::$opt_vi_last_login, $_vi_last_login);
1826
+ $_vi_last_category_update = self::tryget($arroptions, self::$opt_vi_last_category_update, $_vi_last_category_update);
1827
  $_vi_adstxt = self::tryget($arroptions, self::$opt_vi_adstxt, $_vi_adstxt);
1828
  $_vi_js_settings = self::tryget($arroptions, self::$opt_vi_js_settings, self::$vi_dft_js_settings);
1829
  $_vi_js_script = self::tryget($arroptions, self::$opt_vi_js_script, $_vi_js_script);
1868
  self::$opt_migrate_embedplusvideo => $_migrate_embedplusvideo,
1869
  self::$opt_controls => $_controls,
1870
  self::$opt_oldspacing => $_oldspacing,
1871
+ self::$opt_frontend_only => $_frontend_only,
1872
  self::$opt_responsive => $_responsive,
1873
  self::$opt_responsive_all => $_responsive_all,
1874
  self::$opt_widgetfit => $_widgetfit,
1910
  self::$opt_vi_endpoints => $_vi_endpoints,
1911
  self::$opt_vi_token => $_vi_token,
1912
  self::$opt_vi_last_login => $_vi_last_login,
1913
+ self::$opt_vi_last_category_update => $_vi_last_category_update,
1914
  self::$opt_vi_adstxt => $_vi_adstxt,
1915
  self::$opt_vi_js_settings => $_vi_js_settings,
1916
  self::$opt_vi_js_script => $_vi_js_script,
1943
  public static function do_ytprefs()
1944
  {
1945
  //add_filter('autoptimize_filter_js_exclude', array(get_class(), 'ao_override_jsexclude'), 10, 1);
1946
+ if (!is_admin() || (self::$alloptions[self::$opt_frontend_only] != 1))
1947
  {
1948
  add_filter('the_content', array(get_class(), 'apply_prefs_content'), 1);
1949
  add_filter('widget_text', array(get_class(), 'apply_prefs_widget'), 1);
2312
  $linkparams['v'] = array_pop($vtemp);
2313
  }
2314
 
2315
+ if (isset($linkparams['live']) && $linkparams['live'] == '1')
2316
  {
2317
  $live_error_msg = ' To embed live videos, 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.';
2318
  if (isset(self::$alloptions[self::$opt_apikey]))
2319
  {
2320
+ if (isset($linkparams['channel']))
 
2321
  {
2322
+ try
 
 
2323
  {
2324
+ $ytapilink_live = 'https://www.googleapis.com/youtube/v3/search?order=date&maxResults=1&type=video&eventType=live&safeSearch=none&videoEmbeddable=true&channelId=' . $linkparams['channel'] . '&part=snippet&key=' . self::$alloptions[self::$opt_apikey];
2325
+ $apidata_live = wp_remote_get($ytapilink_live, array('timeout' => self::$curltimeout));
2326
+ if (!is_wp_error($apidata_live))
2327
  {
2328
+ $raw = wp_remote_retrieve_body($apidata_live);
2329
+ if (!empty($raw))
2330
  {
2331
+ $json = json_decode($raw, true);
2332
+ if (!isset($json['error']) && is_array($json) && count($json['items']))
2333
+ {
2334
+ $linkparams['v'] = $json['items'][0]['id']['videoId'];
2335
+ }
2336
+ else if (isset($json['error']))
2337
+ {
2338
+ return $live_error_msg; // . ' <em>(Error code ' . $json['error']->code . ': ' . $json['error']->message . ')</em>';
2339
+ }
2340
  }
2341
  }
2342
  }
2343
+ catch (Exception $ex)
2344
+ {
2345
+ return $live_error_msg;
2346
+ }
2347
  }
2348
+ else if (isset($linkparams['v']))
2349
  {
2350
+ ////////////////////// process single video live stream
2351
+ try
2352
+ {
2353
+ // if not_live_content isn't being used, just process as a normal single video. otherwise: if not currently live (nor upcoming?), unset $linkparams['v']
2354
+ $not_live_content = trim(htmlspecialchars_decode(wp_strip_all_tags(self::$alloptions[self::$opt_not_live_content], true)));
2355
+ if (!empty($not_live_content))
2356
+ {
2357
+ $ytapilink_live = 'https://www.googleapis.com/youtube/v3/videos?id=' . $linkparams['v'] . '&part=snippet&key=' . self::$alloptions[self::$opt_apikey];
2358
+ $apidata_live = wp_remote_get($ytapilink_live, array('timeout' => self::$curltimeout));
2359
+ if (!is_wp_error($apidata_live))
2360
+ {
2361
+ $raw = wp_remote_retrieve_body($apidata_live);
2362
+ if (!empty($raw))
2363
+ {
2364
+ $json = json_decode($raw, true);
2365
+ if (!isset($json['error']) && is_array($json) && count($json['items']))
2366
+ {
2367
+ if (isset($json['items'][0]['snippet']['liveBroadcastContent']) && $json['items'][0]['snippet']['liveBroadcastContent'] != 'live')
2368
+ {
2369
+ unset($linkparams['v']);
2370
+ }
2371
+ }
2372
+ else if (isset($json['error']))
2373
+ {
2374
+ return $live_error_msg; // . ' <em>(Error code ' . $json['error']->code . ': ' . $json['error']->message . ')</em>';
2375
+ }
2376
+ }
2377
+ }
2378
+ }
2379
+ }
2380
+ catch (Exception $ex)
2381
+ {
2382
+ return $live_error_msg;
2383
+ }
2384
  }
2385
  }
2386
  else
2397
  $youtubebaseurl = 'youtube';
2398
  $voloutput = '';
2399
  $acctitle = '';
2400
+ $relstop = '';
2401
 
2402
  $finalparams = $linkparams + self::$alloptions;
2403
 
2413
  $voloutput = ' data-vol="' . self::$alloptions[self::$opt_vol] . '" ';
2414
  }
2415
 
2416
+ if (is_numeric(self::$alloptions[self::$opt_rel]) && intval(self::$alloptions[self::$opt_rel]) === -1)
2417
+ {
2418
+ $relstop = ' data-relstop="1" ';
2419
+ }
2420
+
2421
  if (self::$alloptions[self::$opt_dohl] == 1)
2422
  {
2423
  $locale = get_locale();
2540
  $finalparams['autoplay'] = 0;
2541
  }
2542
 
2543
+ if (!empty($relstop) && isset($finalparams['rel']) && intval($finalparams['rel']) === -1)
2544
+ {
2545
+ $finalparams['rel'] = 0;
2546
+ }
2547
+
2548
  $code1 = '<iframe ' . $centercode . ' id="_ytid_' . rand(10000, 99999) . '" width="' . self::$defaultwidth . '" height="' . self::$defaultheight . '" ' .
2549
+ ' data-origwidth="' . self::$defaultwidth . '" data-origheight="' . self::$defaultheight . '" ' . $relstop .
2550
  ' src="https://www.' . $youtubebaseurl . '.com/embed/' . $videoidoutput . '?';
2551
  $code2 = '" class="__youtube_prefs__' . ($iscontent ? '' : ' __youtube_prefs_widget__') .
2552
  '"' . $voloutput . $acctitle . $galleryid_ifm_data . ' allow="autoplay; encrypted-media" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe>';
2749
 
2750
  public static function get_oembed($url, $height, $width)
2751
  {
2752
+ if (stripos($url, 'listType=playlist') !== false && stripos($url, '/embed') !== false)
2753
+ {
2754
+ $url = str_replace('/embed', '/playlist', $url);
2755
+ }
2756
  require_once(ABSPATH . WPINC . '/class-oembed.php');
2757
  $oembed = _wp_oembed_get_object();
2758
  $args = array();
2908
  $new_pointer_content = '<h3>' . __('New Update') . '</h3>'; // ooopointer
2909
 
2910
  $new_pointer_content .= '<p>'; // ooopointer
2911
+ //$new_pointer_content .= "This version provides clearer instructions for many options across the plugin&apos;s settings and wizard pages in both Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions &raquo;</a>";
2912
+ $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. "
2913
+ . (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>");
2914
+
2915
  if (!empty(self::$alloptions[self::$opt_pro]) && strlen(trim(self::$alloptions[self::$opt_pro])) > 0)
2916
  {
2917
  $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.';
2918
  }
2919
+
2920
  $new_pointer_content .= '</p>';
2921
 
2922
  return array(
2942
  <h3 class="nav-tab-wrapper">
2943
  <a class="nav-tab nav-tab-active" href="#jumpdefaults">Defaults</a>
2944
  <a class="nav-tab" href="#jumpapikey">API Key</a>
2945
+ <a class="nav-tab" href="#jumpwiz">Wizard</a>
2946
  <a class="nav-tab" href="#jumpgallery">Galleries</a>
2947
  <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>
2948
  <?php
3006
  $new_options[self::$opt_iv_load_policy] = self::postchecked(self::$opt_iv_load_policy) ? 1 : 3;
3007
  $new_options[self::$opt_loop] = self::postchecked(self::$opt_loop) ? 1 : 0;
3008
  $new_options[self::$opt_modestbranding] = self::postchecked(self::$opt_modestbranding) ? 1 : 0;
3009
+ //$new_options[self::$opt_rel] = self::postchecked(self::$opt_rel) ? 1 : 0;
3010
  $new_options[self::$opt_showinfo] = self::postchecked(self::$opt_showinfo) ? 1 : 0;
3011
  $new_options[self::$opt_fs] = self::postchecked(self::$opt_fs) ? 1 : 0;
3012
  $new_options[self::$opt_playsinline] = self::postchecked(self::$opt_playsinline) ? 1 : 0;
3021
  $new_options[self::$opt_migrate_youtube] = self::postchecked(self::$opt_migrate_youtube) ? 1 : 0;
3022
  $new_options[self::$opt_migrate_embedplusvideo] = self::postchecked(self::$opt_migrate_embedplusvideo) ? 1 : 0;
3023
  $new_options[self::$opt_oldspacing] = self::postchecked(self::$opt_oldspacing) ? 1 : 0;
3024
+ $new_options[self::$opt_frontend_only] = self::postchecked(self::$opt_frontend_only) ? 1 : 0;
3025
  $new_options[self::$opt_responsive] = self::postchecked(self::$opt_responsive) ? 1 : 0;
3026
  $new_options[self::$opt_widgetfit] = self::postchecked(self::$opt_widgetfit) ? 1 : 0;
3027
  $new_options[self::$opt_evselector_light] = self::postchecked(self::$opt_evselector_light) ? 1 : 0;
3042
  $new_options[self::$opt_gallery_collapse_grid] = self::postchecked(self::$opt_gallery_collapse_grid) ? 1 : 0;
3043
  $new_options[self::$opt_vi_hide_monetize_tab] = self::postchecked(self::$opt_vi_hide_monetize_tab) ? 1 : 0;
3044
 
3045
+ $_rel = 0;
3046
+ try
3047
+ {
3048
+ $_rel = is_numeric(trim($_POST[self::$opt_rel])) ? intval(trim($_POST[self::$opt_rel])) : $_rel;
3049
+ }
3050
+ catch (Exception $ex)
3051
+ {
3052
+
3053
+ }
3054
+ $new_options[self::$opt_rel] = $_rel;
3055
+
3056
 
3057
  $_gdpr_consent_message = '';
3058
  try
3527
  <label for="<?php echo self::$opt_modestbranding; ?>"><?php _e('<b class="chktitle">Modest Branding:</b> No YouTube logo will be shown on the control bar. Instead, as required by YouTube, the logo will only show as a watermark when the video is paused/stopped.') ?></label>
3528
  </p>
3529
  <p>
3530
+ <label>
 
3531
  <b class="chktitle">Related Videos:</b>
3532
+ Show or hide related and recommended videos at the end of playback.
3533
+ <br>
3534
  </label>
3535
+ <input type="radio" name="<?php echo self::$opt_rel; ?>" id="<?php echo self::$opt_rel; ?>-1" value="-1" <?php checked($all[self::$opt_rel], -1); ?>>
3536
+ <label for="<?php echo self::$opt_rel; ?>-1">Hide related videos at the end of playback <sup class="orange">new</sup></label> &nbsp;&nbsp;
3537
+ <input type="radio" name="<?php echo self::$opt_rel; ?>" id="<?php echo self::$opt_rel; ?>0" value="0" <?php checked($all[self::$opt_rel], 0); ?>>
3538
+ <label for="<?php echo self::$opt_rel; ?>0">Show related videos only from the video's channel</label> &nbsp;&nbsp;
3539
+ <input type="radio" name="<?php echo self::$opt_rel; ?>" id="<?php echo self::$opt_rel; ?>1" value="1" <?php checked($all[self::$opt_rel], 1); ?>>
3540
+ <label for="<?php echo self::$opt_rel; ?>1">Show related videos</label> &nbsp;&nbsp;
3541
  </p>
3542
  <p>
3543
  <input name="<?php echo self::$opt_showinfo; ?>" id="<?php echo self::$opt_showinfo; ?>" <?php checked($all[self::$opt_showinfo], 1); ?> type="checkbox" class="checkbox">
3637
  </p>
3638
  <p class="<?php echo self::vi_logged_in() || !empty($all[self::$opt_vi_active]) ? 'hidden' : '' ?>">
3639
  <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">
3640
+ <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>
3641
  </p>
3642
+ <p id="not_live_content_scroll">
3643
  <label for="<?php echo self::$opt_not_live_content; ?>">
3644
  <b class="chktitle">Default "Not Live" Content:</b>
3645
+ When your channel is not streaming live, the YouTube live player will be inactive.
3646
+ 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.
3647
+ The plugin will automatically switch to your channel's live stream once it's active.
3648
+ 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>
3649
  <?php
3650
  if (self::vi_logged_in())
3651
  {
3652
  ?>
3653
+ 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.
3654
+ <?php
3655
+ }
3656
+ else
3657
+ {
3658
+ ?>
3659
+ 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>
3660
  <?php
3661
  }
3662
  ?>
3663
+ If you just want to show the standard countdown player that YouTube provides, just leave the below empty and save.
3664
  </label>
3665
  <?php
3666
  wp_editor(wp_kses_post($all[self::$opt_not_live_content]), self::$opt_not_live_content, array('textarea_rows' => 7));
3985
  <b class="chktitle">Legacy Spacing:</b> Continue the spacing style from version 4.0 and older. Those versions required you to manually add spacing above and below your video. Unchecking this will automatically add the spacing.
3986
  </label>
3987
  </p>
3988
+ <p>
3989
+ <input name="<?php echo self::$opt_frontend_only; ?>" id="<?php echo self::$opt_frontend_only; ?>" <?php checked($all[self::$opt_frontend_only], 1); ?> type="checkbox" class="checkbox">
3990
+ <label for="<?php echo self::$opt_frontend_only; ?>">
3991
+ <b class="chktitle">Don't Run Shortcode In Admin:</b> <sup class="orange">new</sup>
3992
+ Checking this will only allow the shortcode to run on the front-end of your website, and not in the admin area.
3993
+ </label>
3994
+ </p>
3995
  <p>
3996
  <input name="<?php echo self::$opt_evselector_light; ?>" id="<?php echo self::$opt_evselector_light; ?>" <?php checked($all[self::$opt_evselector_light], 1); ?> type="checkbox" class="checkbox">
3997
  <label for="<?php echo self::$opt_evselector_light; ?>">
4047
  <p>
4048
  <b>For self-contained channel playlists:</b> At your editor, click on the <img style="vertical-align: text-bottom;" src="<?php echo plugins_url('images/wizbuttonbig.png', __FILE__) ?>"> wizard button and choose the option <i>Search for a video or channel to insert in my editor.</i> Then, click on the <i>channel playlist</i> option there (instead of <i>single video</i>). Search for the channel username and follow the rest of the directions there.
4049
  </p>
4050
+ <p>
4051
+ <strong>For directly embedding in your theme with PHP:</strong>
4052
+ If you need to use PHP directly, we still recommend using the wizard to create the shortcode--but instead of pressing the "Insert" button, just copy the shortcode the wizard gives you. Then use the <code>do_shortcode()</code> function in your theme, like this:
4053
+ <br>
4054
+ <code>&lt;?php echo do_shortcode('[embedyt]....[/embedyt]'); ?&gt;</code>
4055
+ </p>
4056
  <p>
4057
  <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>.
4058
  </p>
4579
  {
4580
  $result = array();
4581
  $default = array(
4582
+ self::$opt_rel => 1,
4583
  self::$opt_modestbranding => 0,
4584
  self::$opt_responsive => 0,
4585
  self::$opt_responsive_all => 0,
4704
  ?>
4705
  <div class="wrap wrap-ytprefs-onboarding">
4706
  <div class="ytprefs-ob-title">
4707
+ YouTube Setup Guide
4708
  </div>
4709
  <div class="relative">
4710
  <div class="ytprefs-ob-step ytprefs-ob-step1 active-step">
4711
  <div class="ytprefs-ob-content">
4712
  <div class="ytprefs-ob-block">
4713
  <p>
4714
+ With so many options available in this plugin, we created this easy setup guide to help you quickly learn about its <strong>most common settings and newest features</strong>. We hope it will get you embedding videos, galleries, and/or live streams sooner.
4715
  </p>
4716
  <p>
4717
  You'll have an opportunity to see and set many other options after completing this setup guide.
4754
  <form id="form-onboarding">
4755
  <input type="hidden" name="action" value="my_embedplus_onboarding_save_ajax"/>
4756
 
4757
+ <div class="ytprefs-ob-setting yob-single yob-gallery yob-standalone yob-live">
4758
+ <label>
4759
+ <b class="chktitle">Related Videos:</b>
4760
+ Show or hide related and recommended videos at the end of playback.
4761
+ <br>
4762
+ </label>
4763
+ <input type="radio" name="<?php echo self::$opt_rel; ?>" id="<?php echo self::$opt_rel; ?>-1" value="-1" <?php checked($all[self::$opt_rel], -1); ?>>
4764
+ <label for="<?php echo self::$opt_rel; ?>-1">Hide related videos at the end of playback <sup class="orange">new</sup></label> &nbsp;&nbsp;
4765
+ <input type="radio" name="<?php echo self::$opt_rel; ?>" id="<?php echo self::$opt_rel; ?>0" value="0" <?php checked($all[self::$opt_rel], 0); ?>>
4766
+ <label for="<?php echo self::$opt_rel; ?>0">Show related videos only from the video's channel</label> &nbsp;&nbsp;
4767
+ <input type="radio" name="<?php echo self::$opt_rel; ?>" id="<?php echo self::$opt_rel; ?>1" value="1" <?php checked($all[self::$opt_rel], 1); ?>>
4768
+ <label for="<?php echo self::$opt_rel; ?>1">Show related videos</label> &nbsp;&nbsp;
4769
+ </div>
4770
  <div class="ytprefs-ob-setting yob-single yob-gallery yob-standalone yob-live">
4771
  <input value="1" name="<?php echo self::$opt_modestbranding; ?>" id="<?php echo self::$opt_modestbranding; ?>" <?php checked($all[self::$opt_modestbranding], 1); ?> type="checkbox" class="checkbox">
4772
  <label for="<?php echo self::$opt_modestbranding; ?>"><?php _e('<b class="chktitle">Modest Branding:</b> No YouTube logo will be shown on the control bar. Instead, as required by YouTube, the logo will only show as a watermark when the video is paused/stopped.') ?></label>
4806
  <p>
4807
  <label for="<?php echo self::$opt_not_live_content; ?>">
4808
  <b class="chktitle">Default "Not Live" Content:</b>
4809
+ When your channel is not streaming live, the YouTube live player will be inactive.
4810
+ 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.
4811
+ The plugin will automatically switch to your channel's live stream once it's active.
4812
+ 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>
4813
  <?php
4814
  if (self::vi_logged_in())
4815
  {
4818
  <?php
4819
  }
4820
  ?>
4821
+ If you just want to show the standard countdown player that YouTube provides, just leave the below empty.
4822
  </label>
4823
  </p>
4824
  <?php
4906
  Some features (such as galleries, and some wizard features) now require you to create a free YouTube API <strong>Server</strong> key from Google.
4907
  Make sure it's a YouTube Data API v3 "Web Server" key as shown in the screenshot (i.e. not web browser or anything else).
4908
  </p>
4909
+ <?php
4910
+ if (!empty($all[self::$opt_apikey]) && strlen($all[self::$opt_apikey]) > 0)
4911
+ {
4912
+ ?>
4913
+ <p class="ytprefs-ob-success">
4914
+ Great! You already have an API key.
4915
+ </p>
4916
+ <?php
4917
+ }
4918
+ else
4919
+ {
4920
+ ?>
4921
+ <p>
4922
+ <a href="https://www.youtube.com/watch?v=6gD0X76-v_g" target="_blank">Click this link &raquo;</a> and follow the video to get your API key. Don't worry, it's an easy process.
4923
+ </p>
4924
+ <?php
4925
+ }
4926
+ ?>
4927
  <p>
4928
  <input type="text" placeholder="Paste your YouTube API key here" name="<?php echo self::$opt_apikey; ?>" id="<?php echo self::$opt_apikey; ?>" value="<?php echo esc_attr(trim($all[self::$opt_apikey])); ?>" class="regular-text" style='max-width: 40%;'>
4929
  </p>
4946
  <div class="ytprefs-ob-step ytprefs-ob-step4">
4947
  <div class="ytprefs-ob-content">
4948
  <?php
4949
+ if (!self::vi_logged_in() && !self::vi_script_setup_done())
4950
  {
4951
  echo '<div class="vi-registration-box">';
4952
  include_once(EPYTVI_INCLUDES_PATH . 'vi_registration_form.php');
4955
  }
4956
  else
4957
  {
4958
+ ?>
4959
+ <h2>Monetization</h2>
4960
+ <p class="ytprefs-ob-success">
4961
+ Hooray! You have already signed up for the <a href="<?php echo admin_url('admin.php?page=youtube-ep-vi') ?>" target="_blank">video ad monetization feature</a>.
4962
+ </p>
4963
+ <?php
4964
  }
4965
  ?>
4966
 
5852
  {
5853
  return array(
5854
  'code' => -1,
5855
+ 'message' => 'For your security, a quick reauthentication is needed to begin setting up your ads.txt file. First, log out of this Ads Settings page with the "Logout" button right above and then log back in with your vi login and password. Then come back to this tab for next steps. Your ads.txt verification file will enable you to make money through vi. <a href="https://www.vi.ai/publisherfaq/?aid=WP_embedplus&utm_source=Wordpress&utm_medium=WP_embedplus" target="_blank">FAQ &raquo;</a>'
5856
  );
5857
  }
5858
  else
5871
  {
5872
  return array(
5873
  'code' => 0,
5874
+ 'message' => 'Looks like video intelligence has just updated its ad delivery partners. To get the most revenue out of your ads, open up your '
5875
  . ' <a href="' . self::base_url() . '/ads.txt" target="_blank">ads.txt</a> file and replace the vi lines (ending in # 41b5eef6) with the new lines you see below. Then, refresh this page. '
5876
+ . ' Please do not reorder or double space the below lines. '
5877
  . ' <strong>If we helped you with your ads.txt in the past, feel free to contact us to help out again with this update.</strong> '
5878
  . '<code># video intelligence (vi.ai) ads.txt lines begin here:' . PHP_EOL . $user_adstxt . PHP_EOL . '# video intelligence (vi.ai) ads.txt lines end</code>'
5879
  );
5882
  {
5883
  return array(
5884
  'code' => 0,
5885
+ 'message' => 'In your current <a href="' . self::base_url() . '/ads.txt" target="_blank">ads.txt</a> file, just add in the additional lines you see below. Then, refresh this page.'
5886
+ . ' Please do not reorder or double space the below lines. '
5887
  . '<code># video intelligence (vi.ai) ads.txt lines begin here:' . PHP_EOL . $user_adstxt . PHP_EOL . '# video intelligence (vi.ai) ads.txt lines end</code>'
5888
  );
5889
  }
5901
  // create manually
5902
  return array(
5903
  'code' => 0,
5904
+ 'message' => 'You can <a class="button button-small" href="' . admin_url('admin.php') . '?ytvi_adstxt_download=1&key=' . urlencode(self::$alloptions[self::$opt_vi_token]) . '">download this ads.txt</a> file and upload it to your site root (or copy the same text below). Then, refresh this page to verify.'
5905
+ . ' Please do not reorder or double space the below lines. '
5906
  . '<code># video intelligence (vi.ai) ads.txt lines begin here:' . PHP_EOL . $user_adstxt . PHP_EOL . '# video intelligence (vi.ai) ads.txt lines end</code>'
5907
  );
5908
  }
5971
  $new_adstxt = $former_adstxt . (strlen($former_adstxt) > 0 ? PHP_EOL : '') . ($user_adstxt === false ? '' : $user_adstxt);
5972
 
5973
  $new_adstxt = '# video intelligence (vi.ai) ads.txt lines begin here:' . PHP_EOL . $new_adstxt . PHP_EOL . '# video intelligence (vi.ai) ads.txt lines end';
5974
+
5975
  header("Expires: 0");
5976
  header("Cache-Control: no-cache, no-store, must-revalidate");
5977
  header('Cache-Control: pre-check=0, post-check=0, max-age=0', false);
6049
  $options = $readonly + $options;
6050
 
6051
  $jsTagAPI = self::$alloptions[self::$opt_vi_endpoints]->jsTagAPI;
6052
+
6053
+ $iabCategoryList = explode(',', $options['iabCategory']);
6054
+
6055
+ $matches = array();
6056
+ if (isset(self::$alloptions[self::$opt_vi_js_script]) && preg_match('/IAB_Category[ ]*:([^,]+),/i', self::$alloptions[self::$opt_vi_js_script], $matches))
6057
+ {
6058
+ $currCategory = array(trim($matches[1]));
6059
+ $iabCategoryList = array_diff($iabCategoryList, $currCategory);
6060
+ }
6061
+
6062
+ $options['iabCategory'] = $iabCategoryList[array_rand($iabCategoryList)];
6063
+
6064
  $apiResult = self::vi_remote_post($jsTagAPI, array(
6065
  'body' => json_encode($options)
6066
  ));
6071
  $mod_data = $apiResult->data;
6072
 
6073
  $new_options = array(
6074
+ self::$opt_vi_js_script => $mod_data,
6075
+ self::$opt_vi_last_category_update => date('Y-m-d H:i:s')
6076
  );
6077
 
6078
  self::update_option_set($new_options);
6119
  $item[self::$opt_vi_js_settings]['iabCategory'] = sanitize_text_field($item[self::$opt_vi_js_settings]['iabCategory']);
6120
  if (empty($item[self::$opt_vi_js_settings]['iabCategory']))
6121
  {
6122
+ $messages[] = 'Please choose at least one IAB category under Video Categories.';
6123
  }
6124
  $item[self::$opt_vi_js_settings]['language'] = sanitize_text_field($item[self::$opt_vi_js_settings]['language']);
6125
  if (empty($item[self::$opt_vi_js_settings]['language']))
6159
  }
6160
  else
6161
  {
6162
+ $messages[] = 'For your security, a quick re-authentication is required to save your most recent customizations. Simply log out of this Ads Settings page with the "Logout" button right above and then log back in with your vi login and password. ';
6163
  $messages = array_merge($messages, $js);
6164
  }
6165
  }
6257
  <?php self::vi_print_toggle_button(); ?>
6258
  </h1>
6259
  <br>
6260
+ <div class="updated ytvi-msg-congrats">
6261
+ <p>
6262
+ Congrats! Ads are now on. Here are some tips to maximize your fill rate and therefore revenue:
6263
+ </p>
6264
+ <ul class="list-ul">
6265
+ <li>Visibility - The higher the player is placed, the greater the demand and fill rate. Inserting it near the top or middle of your pages are best.</li>
6266
+ <li>Ad Unit Size - The recommended minimum width for the player is 336px </li>
6267
+ <li>Give vi.ai about 2-3 weeks to optimize their inventory for your site</li>
6268
+ <li>Contact us for help if you have any questions: ext@embedplus.com</li>
6269
+ </ul>
6270
+ </div>
6271
  <?php
6272
  if (!empty($notice))
6273
  {
6284
 
6285
  self::vi_settings_nav();
6286
 
 
6287
  // echo '<pre>';
6288
  // print_r(_get_cron_array());
6289
  // echo '</pre>';
6293
  <input type="hidden" name="nonce" value="<?php echo wp_create_nonce(basename(__FILE__)) ?>"/>
6294
  <section class="pattern" id="jumphowitworks">
6295
  <h2>How It Works</h2>
6296
+ <p>Before you begin, please turn off any ad blocker extensions you may have, so that you will see how your ads look. Then follow the steps below:</p>
6297
+ <br>
6298
  <div class="vi-how-works" data-jump="#jumpdescription">
6299
  <div class="vi-num">1</div>
6300
  <img src="<?php echo plugins_url(self::$folder_name . '/images/icon-hw-description.png') ?>"/>
6358
  <img src="<?php echo plugins_url(self::$folder_name . '/images/adstxt-help.png') . '?ver=' . self::$version; ?>"/>
6359
  Trouble getting content that fits your site, even with the proper settings above/below? Contact support at <strong><a href="mailto:ext@embedplus.com">ext@embedplus.com</a></strong>
6360
  </div>
6361
+ <h2><span class="vi-num">1</span> Video Categories (Multiple Allowed) <sup class="orange">new</sup></h2>
6362
+ <p>
6363
+ Your video ad will be optimized to relate to your site's content and the one or more categories you select below. Note that the quality of the matches improves over time.
6364
+ </p>
6365
  <p>
6366
+ <strong>Tip:</strong> select more than one category to add variety to your video ads.
6367
+ If you select more than one, you must stay logged in to this settings page for your categories to automatically add variety to your ads.
6368
  </p>
6369
  <table cellspacing="2" cellpadding="5" style="width: 100%;" class="form-table">
6370
  <tbody>
6371
  <tr class="form-field">
6372
  <th valign="top" scope="row">
6373
+ <label for="<?php echo self::$opt_vi_js_settings ?>[iabCategory]">IAB Categories</label>
6374
+ <small>Select the categories that most fit your website. You can select up to 4. </small>
6375
  </th>
6376
  <td>
6377
+ <strong>Filter by:</strong>
6378
  <select class="iab-cat-parent">
6379
+ <option value="">Choose Filter</option>
6380
  <option value="IAB1">Arts & Entertainment</option>
6381
  <option value="IAB2">Automotive</option>
6382
  <option value="IAB3">Business</option>
6404
  <option value="IAB25">Non-Standard Content</option>
6405
  </select>
6406
  <div class="iab-cat-child-box hidden">
6407
+ <strong>Then choose category:</strong>
6408
+ <select class="iab-cat-child" disabled>
6409
+ <option value="">Select Category:</option>
6410
+ <option value="IAB1">Arts & Entertainment (All)</option>
6411
+ <option value="IAB1-1">Books & Literature</option>
6412
+ <option value="IAB1-2">Celebrity Fan/Gossip</option>
6413
+ <option value="IAB1-3">Fine Art</option>
6414
+ <option value="IAB1-4">Humor</option>
6415
+ <option value="IAB1-5">Movies</option>
6416
+ <option value="IAB1-6">Music</option>
6417
+ <option value="IAB1-7">Television</option>
6418
+ <option value="IAB2">Automotive (All)</option>
6419
+ <option value="IAB2-1">Auto Parts</option>
6420
+ <option value="IAB2-2">Auto Repair</option>
6421
+ <option value="IAB2-3">Buying/Selling Cars</option>
6422
+ <option value="IAB2-4">Car Culture</option>
6423
+ <option value="IAB2-5">Certified Pre-Owned</option>
6424
+ <option value="IAB2-6">Convertible</option>
6425
+ <option value="IAB2-7">Coupe</option>
6426
+ <option value="IAB2-8">Crossover</option>
6427
+ <option value="IAB2-9">Diesel</option>
6428
+ <option value="IAB2-10">Electric Vehicle</option>
6429
+ <option value="IAB2-11">Hatchback</option>
6430
+ <option value="IAB2-12">Hybrid</option>
6431
+ <option value="IAB2-13">Luxury</option>
6432
+ <option value="IAB2-14">MiniVan</option>
6433
+ <option value="IAB2-15">Mororcycles</option>
6434
+ <option value="IAB2-16">Off-Road Vehicles</option>
6435
+ <option value="IAB2-17">Performance Vehicles</option>
6436
+ <option value="IAB2-18">Pickup</option>
6437
+ <option value="IAB2-19">Road-Side Assistance</option>
6438
+ <option value="IAB2-20">Sedan</option>
6439
+ <option value="IAB2-21">Trucks & Accessories</option>
6440
+ <option value="IAB2-22">Vintage Cars</option>
6441
+ <option value="IAB2-23">Wagon</option>
6442
+ <option value="IAB3">Business (All)</option>
6443
+ <option value="IAB3-1">Advertising</option>
6444
+ <option value="IAB3-2">Agriculture</option>
6445
+ <option value="IAB3-3">Biotech/Biomedical</option>
6446
+ <option value="IAB3-4">Business Software</option>
6447
+ <option value="IAB3-5">Construction</option>
6448
+ <option value="IAB3-6">Forestry</option>
6449
+ <option value="IAB3-7">Government</option>
6450
+ <option value="IAB3-8">Green Solutions</option>
6451
+ <option value="IAB3-9">Human Resources</option>
6452
+ <option value="IAB3-10">Logistics</option>
6453
+ <option value="IAB3-11">Marketing</option>
6454
+ <option value="IAB3-12">Metals</option>
6455
+ <option value="IAB4">Careers (All)</option>
6456
+ <option value="IAB4-1">Career Planning</option>
6457
+ <option value="IAB4-2">College</option>
6458
+ <option value="IAB4-3">Financial Aid</option>
6459
+ <option value="IAB4-4">Job Fairs</option>
6460
+ <option value="IAB4-5">Job Search</option>
6461
+ <option value="IAB4-6">Resume Writing/Advice</option>
6462
+ <option value="IAB4-7">Nursing</option>
6463
+ <option value="IAB4-8">Scholarships</option>
6464
+ <option value="IAB4-9">Telecommuting</option>
6465
+ <option value="IAB4-10">U.S. Military</option>
6466
+ <option value="IAB4-11">Career Advice</option>
6467
+ <option value="IAB5">Education (All)</option>
6468
+ <option value="IAB5-1">7-12 Education</option>
6469
+ <option value="IAB5-2">Adult Education</option>
6470
+ <option value="IAB5-3">Art History</option>
6471
+ <option value="IAB5-4">Colledge Administration</option>
6472
+ <option value="IAB5-5">College Life</option>
6473
+ <option value="IAB5-6">Distance Learning</option>
6474
+ <option value="IAB5-7">English as a 2nd Language</option>
6475
+ <option value="IAB5-8">Language Learning</option>
6476
+ <option value="IAB5-9">Graduate School</option>
6477
+ <option value="IAB5-10">Homeschooling</option>
6478
+ <option value="IAB5-11">Homework/Study Tips</option>
6479
+ <option value="IAB5-12">K-6 Educators</option>
6480
+ <option value="IAB5-13">Private School</option>
6481
+ <option value="IAB5-14">Special Education</option>
6482
+ <option value="IAB5-15">Studying Business</option>
6483
+ <option value="IAB6">Family & Parenting (All)</option>
6484
+ <option value="IAB6-1">Adoption</option>
6485
+ <option value="IAB6-2">Babies & Toddlers</option>
6486
+ <option value="IAB6-3">Daycare/Pre School</option>
6487
+ <option value="IAB6-4">Family Internet</option>
6488
+ <option value="IAB6-5">Parenting K-6 Kids</option>
6489
+ <option value="IAB6-6">Parenting teens</option>
6490
+ <option value="IAB6-7">Pregnancy</option>
6491
+ <option value="IAB6-8">Special Needs Kids</option>
6492
+ <option value="IAB6-9">Eldercare</option>
6493
+ <option value="IAB7">Health & Fitness (All)</option>
6494
+ <option value="IAB7-1">Exercise</option>
6495
+ <option value="IAB7-2">A.D.D.</option>
6496
+ <option value="IAB7-3">AIDS/HIV</option>
6497
+ <option value="IAB7-4">Allergies</option>
6498
+ <option value="IAB7-5">Alternative Medicine</option>
6499
+ <option value="IAB7-6">Arthritis</option>
6500
+ <option value="IAB7-7">Asthma</option>
6501
+ <option value="IAB7-8">Autism/PDD</option>
6502
+ <option value="IAB7-9">Bipolar Disorder</option>
6503
+ <option value="IAB7-10">Brain Tumor</option>
6504
+ <option value="IAB7-11">Cancer</option>
6505
+ <option value="IAB7-12">Cholesterol</option>
6506
+ <option value="IAB7-13">Chronic Fatigue Syndrome</option>
6507
+ <option value="IAB7-14">Chronic Pain</option>
6508
+ <option value="IAB7-15">Cold & Flu</option>
6509
+ <option value="IAB7-16">Deafness</option>
6510
+ <option value="IAB7-17">Dental Care</option>
6511
+ <option value="IAB7-18">Depression</option>
6512
+ <option value="IAB7-19">Dermatology</option>
6513
+ <option value="IAB7-20">Diabetes</option>
6514
+ <option value="IAB7-21">Epilepsy</option>
6515
+ <option value="IAB7-22">GERD/Acid Reflux</option>
6516
+ <option value="IAB7-23">Headaches/Migraines</option>
6517
+ <option value="IAB7-24">Heart Disease</option>
6518
+ <option value="IAB7-25">Herbs for Health</option>
6519
+ <option value="IAB7-26">Holistic Healing</option>
6520
+ <option value="IAB7-27">IBS/Crohn's Disease</option>
6521
+ <option value="IAB7-28">Incest/Abuse Support</option>
6522
+ <option value="IAB7-29">Incontinence</option>
6523
+ <option value="IAB7-30">Infertility</option>
6524
+ <option value="IAB7-31">Men's Health</option>
6525
+ <option value="IAB7-32">Nutrition</option>
6526
+ <option value="IAB7-33">Orthopedics</option>
6527
+ <option value="IAB7-34">Panic/Anxiety Disorders</option>
6528
+ <option value="IAB7-35">Pediatrics</option>
6529
+ <option value="IAB7-36">Physical Therapy</option>
6530
+ <option value="IAB7-37">Psychology/Psychiatry</option>
6531
+ <option value="IAB7-38">Senor Health</option>
6532
+ <option value="IAB7-39">Sexuality</option>
6533
+ <option value="IAB7-40">Sleep Disorders</option>
6534
+ <option value="IAB7-41">Smoking Cessation</option>
6535
+ <option value="IAB7-42">Substance Abuse</option>
6536
+ <option value="IAB7-43">Thyroid Disease</option>
6537
+ <option value="IAB7-44">Weight Loss</option>
6538
+ <option value="IAB7-45">Women's Health</option>
6539
+ <option value="IAB8">Food & Drink (All)</option>
6540
+ <option value="IAB8-1">American Cuisine</option>
6541
+ <option value="IAB8-2">Barbecues & Grilling</option>
6542
+ <option value="IAB8-3">Cajun/Creole</option>
6543
+ <option value="IAB8-4">Chinese Cuisine</option>
6544
+ <option value="IAB8-5">Cocktails/Beer</option>
6545
+ <option value="IAB8-6">Coffee/Tea</option>
6546
+ <option value="IAB8-7">Cuisine-Specific</option>
6547
+ <option value="IAB8-8">Desserts & Baking</option>
6548
+ <option value="IAB8-9">Dining Out</option>
6549
+ <option value="IAB8-10">Food Allergies</option>
6550
+ <option value="IAB8-11">French Cuisine</option>
6551
+ <option value="IAB8-12">Health/Lowfat Cooking</option>
6552
+ <option value="IAB8-13">Italian Cuisine</option>
6553
+ <option value="IAB8-14">Japanese Cuisine</option>
6554
+ <option value="IAB8-15">Mexican Cuisine</option>
6555
+ <option value="IAB8-16">Vegan</option>
6556
+ <option value="IAB8-17">Vegetarian</option>
6557
+ <option value="IAB8-18">Wine</option>
6558
+ <option value="IAB9">Hobbies & Interests (All)</option>
6559
+ <option value="IAB9-1">Art/Technology</option>
6560
+ <option value="IAB9-2">Arts & Crafts</option>
6561
+ <option value="IAB9-3">Beadwork</option>
6562
+ <option value="IAB9-4">Birdwatching</option>
6563
+ <option value="IAB9-5">Board Games/Puzzles</option>
6564
+ <option value="IAB9-6">Candle & Soap Making</option>
6565
+ <option value="IAB9-7">Card Games</option>
6566
+ <option value="IAB9-8">Chess</option>
6567
+ <option value="IAB9-9">Cigars</option>
6568
+ <option value="IAB9-10">Collecting</option>
6569
+ <option value="IAB9-11">Comic Books</option>
6570
+ <option value="IAB9-12">Drawing/Sketching</option>
6571
+ <option value="IAB9-13">Freelance Writing</option>
6572
+ <option value="IAB9-14">Genealogy</option>
6573
+ <option value="IAB9-15">Getting Published</option>
6574
+ <option value="IAB9-16">Guitar</option>
6575
+ <option value="IAB9-17">Home Recording</option>
6576
+ <option value="IAB9-18">Investors & Patents</option>
6577
+ <option value="IAB9-19">Jewelry Making</option>
6578
+ <option value="IAB9-20">Magic & Illusion</option>
6579
+ <option value="IAB9-21">Needlework</option>
6580
+ <option value="IAB9-22">Painting</option>
6581
+ <option value="IAB9-23">Photography</option>
6582
+ <option value="IAB9-24">Radio</option>
6583
+ <option value="IAB9-25">Roleplaying Games</option>
6584
+ <option value="IAB9-26">Sci-Fi & Fantasy</option>
6585
+ <option value="IAB9-27">Scrapbooking</option>
6586
+ <option value="IAB9-28">Screenwriting</option>
6587
+ <option value="IAB9-29">Stamps & Coins</option>
6588
+ <option value="IAB9-30">Video & Computer Games</option>
6589
+ <option value="IAB9-31">Woodworking</option>
6590
+ <option value="IAB10">Home & Garden (All)</option>
6591
+ <option value="IAB10-1">Appliances</option>
6592
+ <option value="IAB10-2">Entertaining</option>
6593
+ <option value="IAB10-3">Environmental Safety</option>
6594
+ <option value="IAB10-4">Gardening</option>
6595
+ <option value="IAB10-5">Home Repair</option>
6596
+ <option value="IAB10-6">Home Theater</option>
6597
+ <option value="IAB10-7">Interior Decorating</option>
6598
+ <option value="IAB10-8">Landscaping</option>
6599
+ <option value="IAB10-9">Remodeling & Construction</option>
6600
+ <option value="IAB11">Law, Gov't & Politics (All)</option>
6601
+ <option value="IAB11-1">Immigration</option>
6602
+ <option value="IAB11-2">Legal Issues</option>
6603
+ <option value="IAB11-3">U.S. Government Resources</option>
6604
+ <option value="IAB11-4">Politics</option>
6605
+ <option value="IAB11-5">Commentary</option>
6606
+ <option value="IAB12">News (All)</option>
6607
+ <option value="IAB12-1">International News</option>
6608
+ <option value="IAB12-2">National News</option>
6609
+ <option value="IAB12-3">Local News</option>
6610
+ <option value="IAB13">Personal Finance (All)</option>
6611
+ <option value="IAB13-1">Beginning Investing</option>
6612
+ <option value="IAB13-2">Credit/Debt & Loans</option>
6613
+ <option value="IAB13-3">Financial News</option>
6614
+ <option value="IAB13-4">Financial Planning</option>
6615
+ <option value="IAB13-5">Hedge Fund</option>
6616
+ <option value="IAB13-6">Insurance</option>
6617
+ <option value="IAB13-7">Investing</option>
6618
+ <option value="IAB13-8">Mutual Funds</option>
6619
+ <option value="IAB13-9">Options</option>
6620
+ <option value="IAB13-10">Retirement Planning</option>
6621
+ <option value="IAB13-11">Stocks</option>
6622
+ <option value="IAB13-12">Tax Planning</option>
6623
+ <option value="IAB14">Society (All)</option>
6624
+ <option value="IAB14-1">Dating</option>
6625
+ <option value="IAB14-2">Divorce Support</option>
6626
+ <option value="IAB14-3">Gay Life</option>
6627
+ <option value="IAB14-4">Marriage</option>
6628
+ <option value="IAB14-5">Senior Living</option>
6629
+ <option value="IAB14-6">Teens</option>
6630
+ <option value="IAB14-7">Weddings</option>
6631
+ <option value="IAB14-8">Ethnic Specific</option>
6632
+ <option value="IAB15">Science (All)</option>
6633
+ <option value="IAB15-1">Astrology</option>
6634
+ <option value="IAB15-2">Biology</option>
6635
+ <option value="IAB15-3">Chemistry</option>
6636
+ <option value="IAB15-4">Geology</option>
6637
+ <option value="IAB15-5">Paranormal Phenomena</option>
6638
+ <option value="IAB15-6">Physics</option>
6639
+ <option value="IAB15-7">Space/Astronomy</option>
6640
+ <option value="IAB15-8">Geography</option>
6641
+ <option value="IAB15-9">Botany</option>
6642
+ <option value="IAB15-10">Weather</option>
6643
+ <option value="IAB16">Pets (All)</option>
6644
+ <option value="IAB16-1">Aquariums</option>
6645
+ <option value="IAB16-2">Birds</option>
6646
+ <option value="IAB16-3">Cats</option>
6647
+ <option value="IAB16-4">Dogs</option>
6648
+ <option value="IAB16-5">Large Animals</option>
6649
+ <option value="IAB16-6">Reptiles</option>
6650
+ <option value="IAB16-7">Veterinary Medicine</option>
6651
+ <option value="IAB17">Sports (All)</option>
6652
+ <option value="IAB17-1">Auto Racing</option>
6653
+ <option value="IAB17-2">Baseball</option>
6654
+ <option value="IAB17-3">Bicycling</option>
6655
+ <option value="IAB17-4">Bodybuilding</option>
6656
+ <option value="IAB17-5">Boxing</option>
6657
+ <option value="IAB17-6">Canoeing/Kayaking</option>
6658
+ <option value="IAB17-7">Cheerleading</option>
6659
+ <option value="IAB17-8">Climbing</option>
6660
+ <option value="IAB17-9">Cricket</option>
6661
+ <option value="IAB17-10">Figure Skating</option>
6662
+ <option value="IAB17-11">Fly Fishing</option>
6663
+ <option value="IAB17-12">Football</option>
6664
+ <option value="IAB17-13">Freshwater Fishing</option>
6665
+ <option value="IAB17-14">Game & Fish</option>
6666
+ <option value="IAB17-15">Golf</option>
6667
+ <option value="IAB17-16">Horse Racing</option>
6668
+ <option value="IAB17-17">Horses</option>
6669
+ <option value="IAB17-18">Hunting/Shooting</option>
6670
+ <option value="IAB17-19">Inline Skating</option>
6671
+ <option value="IAB17-20">Martial Arts</option>
6672
+ <option value="IAB17-21">Mountain Biking</option>
6673
+ <option value="IAB17-22">NASCAR Racing</option>
6674
+ <option value="IAB17-23">Olympics</option>
6675
+ <option value="IAB17-24">Paintball</option>
6676
+ <option value="IAB17-25">Power & Motorcycles</option>
6677
+ <option value="IAB17-26">Pro Basketball</option>
6678
+ <option value="IAB17-27">Pro Ice Hockey</option>
6679
+ <option value="IAB17-28">Rodeo</option>
6680
+ <option value="IAB17-29">Rugby</option>
6681
+ <option value="IAB17-30">Running/Jogging</option>
6682
+ <option value="IAB17-31">Sailing</option>
6683
+ <option value="IAB17-32">Saltwater Fishing</option>
6684
+ <option value="IAB17-33">Scuba Diving</option>
6685
+ <option value="IAB17-34">Skateboarding</option>
6686
+ <option value="IAB17-35">Skiing</option>
6687
+ <option value="IAB17-36">Snowboarding</option>
6688
+ <option value="IAB17-37">Surfing/Bodyboarding</option>
6689
+ <option value="IAB17-38">Swimming</option>
6690
+ <option value="IAB17-39">Table Tennis/Ping-Pong</option>
6691
+ <option value="IAB17-40">Tennis</option>
6692
+ <option value="IAB17-41">Volleyball</option>
6693
+ <option value="IAB17-42">Walking</option>
6694
+ <option value="IAB17-43">Waterski/Wakeboard</option>
6695
+ <option value="IAB17-44">World Soccer</option>
6696
+ <option value="IAB18">Style & Fashion (All)</option>
6697
+ <option value="IAB18-1">Beauty</option>
6698
+ <option value="IAB18-2">Body Art</option>
6699
+ <option value="IAB18-3">Fashion</option>
6700
+ <option value="IAB18-4">Jewelry</option>
6701
+ <option value="IAB18-5">Clothing</option>
6702
+ <option value="IAB18-6">Accessories</option>
6703
+ <option value="IAB19">Technology & Computing (All)</option>
6704
+ <option value="IAB19-1">3-D Graphics</option>
6705
+ <option value="IAB19-2">Animation</option>
6706
+ <option value="IAB19-3">Antivirus Software</option>
6707
+ <option value="IAB19-4">C/C++</option>
6708
+ <option value="IAB19-5">Cameras & Camcorders</option>
6709
+ <option value="IAB19-6">Cell Phones</option>
6710
+ <option value="IAB19-7">Computer Certification</option>
6711
+ <option value="IAB19-8">Computer Networking</option>
6712
+ <option value="IAB19-9">Computer Peripherals</option>
6713
+ <option value="IAB19-10">Computer Reviews</option>
6714
+ <option value="IAB19-11">Data Centers</option>
6715
+ <option value="IAB19-12">Databases</option>
6716
+ <option value="IAB19-13">Desktop Publishing</option>
6717
+ <option value="IAB19-14">Desktop Video</option>
6718
+ <option value="IAB19-15">Email</option>
6719
+ <option value="IAB19-16">Graphics Software</option>
6720
+ <option value="IAB19-17">Home Video/DVD</option>
6721
+ <option value="IAB19-18">Internet Technology</option>
6722
+ <option value="IAB19-19">Java</option>
6723
+ <option value="IAB19-20">JavaScript</option>
6724
+ <option value="IAB19-21">Mac Support</option>
6725
+ <option value="IAB19-22">MP3/MIDI</option>
6726
+ <option value="IAB19-23">Net Conferencing</option>
6727
+ <option value="IAB19-24">Net for Beginners</option>
6728
+ <option value="IAB19-25">Network Security</option>
6729
+ <option value="IAB19-26">Palmtops/PDAs</option>
6730
+ <option value="IAB19-27">PC Support</option>
6731
+ <option value="IAB19-28">Portable</option>
6732
+ <option value="IAB19-29">Entertainment</option>
6733
+ <option value="IAB19-30">Shareware/Freeware</option>
6734
+ <option value="IAB19-31">Unix</option>
6735
+ <option value="IAB19-32">Visual Basic</option>
6736
+ <option value="IAB19-33">Web Clip Art</option>
6737
+ <option value="IAB19-34">Web Design/HTML</option>
6738
+ <option value="IAB19-35">Web Search</option>
6739
+ <option value="IAB19-36">Windows</option>
6740
+ <option value="IAB20">Travel (All)</option>
6741
+ <option value="IAB20-1">Adventure Travel</option>
6742
+ <option value="IAB20-2">Africa</option>
6743
+ <option value="IAB20-3">Air Travel</option>
6744
+ <option value="IAB20-4">Australia & New Zealand</option>
6745
+ <option value="IAB20-5">Bed & Breakfasts</option>
6746
+ <option value="IAB20-6">Budget Travel</option>
6747
+ <option value="IAB20-7">Business Travel</option>
6748
+ <option value="IAB20-8">By US Locale</option>
6749
+ <option value="IAB20-9">Camping</option>
6750
+ <option value="IAB20-10">Canada</option>
6751
+ <option value="IAB20-11">Caribbean</option>
6752
+ <option value="IAB20-12">Cruises</option>
6753
+ <option value="IAB20-13">Eastern Europe</option>
6754
+ <option value="IAB20-14">Europe</option>
6755
+ <option value="IAB20-15">France</option>
6756
+ <option value="IAB20-16">Greece</option>
6757
+ <option value="IAB20-17">Honeymoons/Getaways</option>
6758
+ <option value="IAB20-18">Hotels</option>
6759
+ <option value="IAB20-19">Italy</option>
6760
+ <option value="IAB20-20">Japan</option>
6761
+ <option value="IAB20-21">Mexico & Central America</option>
6762
+ <option value="IAB20-22">National Parks</option>
6763
+ <option value="IAB20-23">South America</option>
6764
+ <option value="IAB20-24">Spas</option>
6765
+ <option value="IAB20-25">Theme Parks</option>
6766
+ <option value="IAB20-26">Traveling with Kids</option>
6767
+ <option value="IAB20-27">United Kingdom</option>
6768
+ <option value="IAB21">Real Estate (All)</option>
6769
+ <option value="IAB21-1">Apartments</option>
6770
+ <option value="IAB21-2">Architects</option>
6771
+ <option value="IAB21-3">Buying/Selling Homes</option>
6772
+ <option value="IAB22">Shopping (All)</option>
6773
+ <option value="IAB22-1">Contests & Freebies</option>
6774
+ <option value="IAB22-2">Couponing</option>
6775
+ <option value="IAB22-3">Comparison</option>
6776
+ <option value="IAB22-4">Engines</option>
6777
+ <option value="IAB23">Religion & Spirituality (All)</option>
6778
+ <option value="IAB23-1">Alternative Religions</option>
6779
+ <option value="IAB23-2">Atheism/Agnosticism</option>
6780
+ <option value="IAB23-3">Buddhism</option>
6781
+ <option value="IAB23-4">Catholicism</option>
6782
+ <option value="IAB23-5">Christianity</option>
6783
+ <option value="IAB23-6">Hinduism</option>
6784
+ <option value="IAB23-7">Islam</option>
6785
+ <option value="IAB23-8">Judaism</option>
6786
+ <option value="IAB23-9">Latter-Day Saints</option>
6787
+ <option value="IAB23-10">Pagan/Wiccan</option>
6788
+ <option value="IAB24">Uncategorized (All)</option>
6789
+ <option value="IAB25">Non-Standard Content (All)</option>
6790
+ <option value="IAB25-1">Unmoderated UGC</option>
6791
+ <option value="IAB25-2">Extreme Graphic/Explicit Violence</option>
6792
+ <option value="IAB25-3">Pornography</option>
6793
+ <option value="IAB25-4">Profane Content</option>
6794
+ <option value="IAB25-5">Hate Content</option>
6795
+ <option value="IAB25-6">Under Construction</option>
6796
+ <option value="IAB25-7">Incentivized</option>
6797
+ </select>
6798
  </div>
6799
+ <input class="iab-cat-tags" type="hidden" name="<?php echo self::$opt_vi_js_settings ?>[iabCategory]" id="<?php echo self::$opt_vi_js_settings ?>[iabCategory]" value="<?php echo esc_attr($item[self::$opt_vi_js_settings]['iabCategory']) ?>" />
6800
+ <br>
6801
+ <br>
6802
+ <p><strong>Your Selected Categories:</strong></p>
6803
+ <div class="iab-cat-tags-display"></div>
6804
  </td>
6805
  </tr>
6806
  <tr class="form-field <?php echo empty($item[self::$opt_vi_js_settings]['keywords']) ? ' hidden ' : '' ?>">
6997
  For optimal revenue, we recommend using the "Top" option:
6998
  </p>
6999
  <ul>
7000
+ <li><label><input type="radio" name="<?php echo self::$opt_vi_js_position ?>" value="top" <?php checked($item[self::$opt_vi_js_position] == 'top') ?> /> Top (recommended for highest fill rate)</label></li>
7001
  <li><label><input type="radio" name="<?php echo self::$opt_vi_js_position ?>" value="bottom" <?php checked($item[self::$opt_vi_js_position] == 'bottom') ?> /> Bottom</label></li>
7002
  </ul>
7003
  <p>
7046
  </div>
7047
  <h2><span class="vi-num">5</span> Ads.txt Verification</h2>
7048
  <p>
7049
+ In order for your ads to start generating revenue, verify your ads.txt file.
7050
  </p>
7051
  <div class="adstxt-verify-message">
7052
 
7324
  {
7325
  if (!self::$vi_script_tag_done && self::$alloptions[self::$opt_vi_active] && self::vi_script_setup_done())
7326
  {
7327
+ if (stripos(self::$alloptions[self::$opt_vi_js_settings]['iabCategory'], ',') > 0 && self::vi_logged_in())
7328
+ {
7329
+ $last_category_update = strtotime(self::$alloptions[self::$opt_vi_last_category_update]);
7330
+ $last_category_update_plus = strtotime(self::$alloptions[self::$opt_vi_last_category_update] . ' + ' . self::$vi_last_category_update_interval);
7331
+ if ($last_category_update_plus < time())
7332
+ {
7333
+ $success = self::vi_cache_js(self::$alloptions[self::$opt_vi_js_settings]);
7334
+ if ($success !== true)
7335
+ {
7336
+ self::vi_token_expire();
7337
+ }
7338
+ }
7339
+ }
7340
+
7341
  self::$vi_script_tag_done = true;
7342
+ $scriptTag = '<div class="ytvi-story-container" id="ytvi_story_container"><script class="ytvi-story-script" type="text/javascript">' .
7343
  self::$alloptions[self::$opt_vi_js_script] .
7344
  '</script></div>';
7345
+ return $scriptTag;
7346
  }
7347
  return '';
7348
  }
7625
  self::$opt_vi_token => ''
7626
  ));
7627
  }
7628
+ else if (self::vi_logged_in() && filter_input(INPUT_SERVER, 'REQUEST_METHOD') != 'POST' && ((is_admin() && filter_input(INPUT_GET, 'page') == 'youtube-ep-vi') || !is_admin())
7629
+ ) // (&& not $_POSTing anything, && on monetize page) || NOT admin page...e.g. category randomization
7630
+ {
7631
+ $adsTxtAPI = self::$alloptions[self::$opt_vi_endpoints]->adsTxtAPI;
7632
+ $tokenCheck = self::vi_remote_get($adsTxtAPI);
7633
+ $tokenCheck_valid = self::vi_adstxt_api_valid($tokenCheck);
7634
+ if ($tokenCheck_valid !== true) // do a token check. if invalid, then:
7635
+ {
7636
+ self::update_option_set(array(
7637
+ self::$opt_vi_token => false
7638
+ ));
7639
+
7640
+ if (is_admin())
7641
+ {
7642
+ wp_safe_redirect(admin_url('admin.php?page=youtube-ep-vi'));
7643
+ exit;
7644
+ }
7645
+ }
7646
+ }
7647
  }
7648
  catch (Exception $ex)
7649
  {
7719
  public static function gb_svg_defs()
7720
  {
7721
  ?>
7722
+ <svg style="height: 0 !important; width: 0 !important; display: absolute !important; top: 0 !important; left: 0 !important;"><defs><style>.epytcls-1{fill:red;}.epytcls-2{fill-rule:evenodd;fill:url(#radial-gradient);}.epytcls-3{fill:#31aaff;}.epytcls-4{fill:#fff;}</style><radialGradient id="radial-gradient" cx="193" cy="85.85" r="77.53" gradientUnits="userSpaceOnUse"><stop offset="0.17" stop-color="#fff"/><stop offset="0.68" stop-color="#31aaff"/></radialGradient></defs></svg>
7723
  <?php
7724
  }
7725
 
7744
  {
7745
  if ($attributes && $attributes['shortcode'] && strpos($attributes['shortcode'], '[') === 0)
7746
  {
7747
+ $render = do_shortcode($attributes['shortcode']);
7748
+ if (empty($render) && stripos($attributes['shortcode'], 'live=1') !== false)
7749
+ {
7750
+ $render = '<em>This is a live embed that is not currently streaming. You can optionally fill out the <a href="' . admin_url('admin.php?page=youtube-my-preferences') . '#not_live_content_scroll" target="_blank">Not Live Content</a> field in the YouTube plugin\'s Default Settings.</em>';
7751
+ }
7752
+ return $render;
7753
  }
7754
  return isset($attributes['shortcode']) ? $attributes['shortcode'] : '';
7755
  }