Ad Inserter – WordPress Ads Management with AdSense Header Integration - Version 2.6.18

Version Description

  • Added support to change Dynamic blocks setting for adinserter PHP function call
  • Few minor bug fixes, cosmetic changes and code improvements
Download this release

Release Info

Developer spacetime
Plugin Icon 128x128 Ad Inserter – WordPress Ads Management with AdSense Header Integration
Version 2.6.18
Comparing to
See all releases

Code changes from version 2.6.16 to 2.6.18

ad-inserter.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  /*
4
  Plugin Name: Ad Inserter
5
- Version: 2.6.16
6
  Description: Ad management with many advanced advertising features to insert ads at optimal positions
7
  Author: Igor Funa
8
  Author URI: http://igorfuna.com/
@@ -17,6 +17,14 @@ Requires PHP: 5.6
17
 
18
  Change Log
19
 
 
 
 
 
 
 
 
 
20
  Ad Inserter 2.6.16 - 2020-10-20
21
  - Added support for ad blocking detection action every n pageviews
22
  - Added support to individually disable pageview or click tracking (Pro only)
@@ -5010,6 +5018,10 @@ function get_tab_setup_delay () {
5010
  function get_dynamic_blocks(){
5011
  global $ai_db_options, $ai_wp_data;
5012
 
 
 
 
 
5013
  if (!isset ($ai_db_options [AI_OPTION_GLOBAL]['DYNAMIC_BLOCKS'])) $ai_db_options [AI_OPTION_GLOBAL]['DYNAMIC_BLOCKS'] = DEFAULT_DYNAMIC_BLOCKS;
5014
 
5015
  return ($ai_db_options [AI_OPTION_GLOBAL]['DYNAMIC_BLOCKS']);
@@ -7269,7 +7281,7 @@ function ai_settings () {
7269
  }
7270
 
7271
 
7272
- function ai_adinserter ($block_parameter = '', $ignore = '', &$block) {
7273
  global $block_object, $ad_inserter_globals, $ai_wp_data, $ai_last_check, $ai_total_hook_php_time, $filter_hooks;
7274
 
7275
  $debug_processing = ($ai_wp_data [AI_WP_DEBUGGING] & AI_DEBUG_PROCESSING) != 0;
@@ -7301,13 +7313,26 @@ function ai_adinserter ($block_parameter = '', $ignore = '', &$block) {
7301
  $ad_inserter_globals [$globals_name] = 1;
7302
  } else $ad_inserter_globals [$globals_name] ++;
7303
 
7304
- if ($debug_processing) ai_log ("PHP FUNCTION CALL adinserter ($block_parameter".($ignore == '' ? '' : (', \''.$ignore.'\''))."), block $block [" . $ad_inserter_globals [$globals_name] . ']');
7305
 
7306
  $ai_wp_data [AI_CONTEXT] = AI_CONTEXT_PHP_FUNCTION;
7307
 
7308
- $ignore_array = array ();
7309
- if (trim ($ignore) != '') {
7310
- $ignore_array = explode (",", str_replace (" ", "", $ignore));
 
 
 
 
 
 
 
 
 
 
 
 
 
7311
  }
7312
 
7313
  $obj = $block_object [$block];
@@ -7316,7 +7341,8 @@ function ai_adinserter ($block_parameter = '', $ignore = '', &$block) {
7316
  $ai_last_check = AI_CHECK_ENABLED_PHP;
7317
  if (!$obj->get_enable_php_call ()) return "";
7318
  if (!$obj->check_server_side_detection ()) return "";
7319
- if (!$obj->check_page_types_lists_users (in_array ("page-type", $ignore_array))) return "";
 
7320
  if (!$obj->check_filter ($ad_inserter_globals [$globals_name])) return "";
7321
  if (!$obj->check_number_of_words ()) return "";
7322
 
@@ -7368,10 +7394,13 @@ function ai_adinserter ($block_parameter = '', $ignore = '', &$block) {
7368
  $code = $obj->get_code_for_serverside_insertion ();
7369
  // Must be after get_code_for_serverside_insertion ()
7370
  $ai_last_check = AI_CHECK_INSERTED;
 
 
 
7371
  return $code;
7372
  }
7373
 
7374
- function adinserter ($block = '', $ignore = '') {
7375
  global $ai_last_check, $ai_wp_data, $ai_total_plugin_time;
7376
 
7377
  $debug_processing = ($ai_wp_data [AI_WP_DEBUGGING] & AI_DEBUG_PROCESSING) != 0;
@@ -7383,7 +7412,7 @@ function adinserter ($block = '', $ignore = '') {
7383
 
7384
  $ai_last_check = AI_CHECK_NONE;
7385
  $block_number = 0;
7386
- $code = ai_adinserter ($block, $ignore, $block_number);
7387
 
7388
  if ($debug_processing) {
7389
  $ai_total_plugin_time += microtime (true) - $start_time;
@@ -10104,7 +10133,7 @@ function ai_process_viewport_separators ($code, $viewport_shortcode_data) {
10104
  function replace_ai_tags ($content, $general_tag = '') {
10105
  global $ai_wp_data;
10106
 
10107
- if (preg_match_all ('#[ADINSERTER (.+)]#i', $content, $matches)) {
10108
  if (count ($matches [0])) {
10109
  foreach ($matches [0] as $match) {
10110
  $content = str_replace ($match, do_shortcode ($match), $content);
@@ -10554,7 +10583,10 @@ if (defined ('AI_ADBLOCKING_DETECTION') && AI_ADBLOCKING_DETECTION) {
10554
 
10555
  if ($ai_wp_data [AI_ADB_DETECTION]) {
10556
 
10557
- $key = AUTH_KEY;
 
 
 
10558
  if (defined ('NONCE_KEY')) {
10559
  $key .= NONCE_KEY;
10560
  }
2
 
3
  /*
4
  Plugin Name: Ad Inserter
5
+ Version: 2.6.18
6
  Description: Ad management with many advanced advertising features to insert ads at optimal positions
7
  Author: Igor Funa
8
  Author URI: http://igorfuna.com/
17
 
18
  Change Log
19
 
20
+ Ad Inserter 2.6.18 - 2020-11-21
21
+ - Added support to change Dynamic blocks setting for adinserter PHP function call
22
+ - Few minor bug fixes, cosmetic changes and code improvements
23
+
24
+ Ad Inserter 2.6.17 - 2020-10-31
25
+ - Fix for ADINSERTER shortcodes in block codes
26
+ - Fix for double client-side insertions when using geolocation (Pro only)
27
+
28
  Ad Inserter 2.6.16 - 2020-10-20
29
  - Added support for ad blocking detection action every n pageviews
30
  - Added support to individually disable pageview or click tracking (Pro only)
5018
  function get_dynamic_blocks(){
5019
  global $ai_db_options, $ai_wp_data;
5020
 
5021
+ if (isset ($ai_wp_data [AI_DYNAMIC_BLOCKS])) {
5022
+ return ($ai_wp_data [AI_DYNAMIC_BLOCKS]);
5023
+ }
5024
+
5025
  if (!isset ($ai_db_options [AI_OPTION_GLOBAL]['DYNAMIC_BLOCKS'])) $ai_db_options [AI_OPTION_GLOBAL]['DYNAMIC_BLOCKS'] = DEFAULT_DYNAMIC_BLOCKS;
5026
 
5027
  return ($ai_db_options [AI_OPTION_GLOBAL]['DYNAMIC_BLOCKS']);
7281
  }
7282
 
7283
 
7284
+ function ai_adinserter ($block_parameter = '', $options = '', &$block) {
7285
  global $block_object, $ad_inserter_globals, $ai_wp_data, $ai_last_check, $ai_total_hook_php_time, $filter_hooks;
7286
 
7287
  $debug_processing = ($ai_wp_data [AI_WP_DEBUGGING] & AI_DEBUG_PROCESSING) != 0;
7313
  $ad_inserter_globals [$globals_name] = 1;
7314
  } else $ad_inserter_globals [$globals_name] ++;
7315
 
7316
+ if ($debug_processing) ai_log ("PHP FUNCTION CALL adinserter ($block_parameter".($options == '' ? '' : (', \''.$options.'\''))."), block $block [" . $ad_inserter_globals [$globals_name] . ']');
7317
 
7318
  $ai_wp_data [AI_CONTEXT] = AI_CONTEXT_PHP_FUNCTION;
7319
 
7320
+ $options_array = array ();
7321
+ if (trim ($options) != '') {
7322
+ $options_array = explode (",", str_replace (" ", "", $options));
7323
+
7324
+ if (in_array ("server-side", $options_array)) {
7325
+ $ai_wp_data [AI_DYNAMIC_BLOCKS] = AI_DYNAMIC_BLOCKS_SERVER_SIDE;
7326
+ }
7327
+ elseif (in_array ("client-side-show", $options_array)) {
7328
+ $ai_wp_data [AI_DYNAMIC_BLOCKS] = AI_DYNAMIC_BLOCKS_CLIENT_SIDE_SHOW;
7329
+ }
7330
+ elseif (in_array ("client-side-insert", $options_array)) {
7331
+ $ai_wp_data [AI_DYNAMIC_BLOCKS] = AI_DYNAMIC_BLOCKS_CLIENT_SIDE_INSERT;
7332
+ }
7333
+ elseif (in_array ("server-side-w3c", $options_array)) {
7334
+ $ai_wp_data [AI_DYNAMIC_BLOCKS] = AI_DYNAMIC_BLOCKS_SERVER_SIDE_W3TC;
7335
+ }
7336
  }
7337
 
7338
  $obj = $block_object [$block];
7341
  $ai_last_check = AI_CHECK_ENABLED_PHP;
7342
  if (!$obj->get_enable_php_call ()) return "";
7343
  if (!$obj->check_server_side_detection ()) return "";
7344
+ /* Deprecated */
7345
+ if (!$obj->check_page_types_lists_users (in_array ("page-type", $options_array) || in_array ("ignore-page-type", $options_array))) return "";
7346
  if (!$obj->check_filter ($ad_inserter_globals [$globals_name])) return "";
7347
  if (!$obj->check_number_of_words ()) return "";
7348
 
7394
  $code = $obj->get_code_for_serverside_insertion ();
7395
  // Must be after get_code_for_serverside_insertion ()
7396
  $ai_last_check = AI_CHECK_INSERTED;
7397
+
7398
+ unset ($ai_wp_data [AI_DYNAMIC_BLOCKS]);
7399
+
7400
  return $code;
7401
  }
7402
 
7403
+ function adinserter ($block = '', $options = '') {
7404
  global $ai_last_check, $ai_wp_data, $ai_total_plugin_time;
7405
 
7406
  $debug_processing = ($ai_wp_data [AI_WP_DEBUGGING] & AI_DEBUG_PROCESSING) != 0;
7412
 
7413
  $ai_last_check = AI_CHECK_NONE;
7414
  $block_number = 0;
7415
+ $code = ai_adinserter ($block, $options, $block_number);
7416
 
7417
  if ($debug_processing) {
7418
  $ai_total_plugin_time += microtime (true) - $start_time;
10133
  function replace_ai_tags ($content, $general_tag = '') {
10134
  global $ai_wp_data;
10135
 
10136
+ if (preg_match_all ('#\[ADINSERTER (.+)\]#i', $content, $matches)) {
10137
  if (count ($matches [0])) {
10138
  foreach ($matches [0] as $match) {
10139
  $content = str_replace ($match, do_shortcode ($match), $content);
10583
 
10584
  if ($ai_wp_data [AI_ADB_DETECTION]) {
10585
 
10586
+ $key = '#AI';
10587
+ if (defined ('AUTH_KEY')) {
10588
+ $key .= AUTH_KEY;
10589
+ }
10590
  if (defined ('NONCE_KEY')) {
10591
  $key .= NONCE_KEY;
10592
  }
constants.php CHANGED
@@ -31,7 +31,7 @@ if (!defined( 'AD_INSERTER_NAME'))
31
  define ('AD_INSERTER_NAME', 'Ad Inserter');
32
 
33
  if (!defined( 'AD_INSERTER_VERSION'))
34
- define ('AD_INSERTER_VERSION', '2.6.16');
35
 
36
  if (!defined ('AD_INSERTER_PLUGIN_BASENAME'))
37
  define ('AD_INSERTER_PLUGIN_BASENAME', plugin_basename (__FILE__));
@@ -1152,6 +1152,8 @@ define ('AI_COUNT_REPEAT', 69);
1152
  define ('AI_VIEWPORT_INDEXES', 70);
1153
  define ('AI_ROTATION_SEED', 71);
1154
  define ('AI_AMP_CSS', 72);
 
 
1155
 
1156
  define ('AI_CONTEXT_NONE', 0);
1157
  define ('AI_CONTEXT_CONTENT', 1);
31
  define ('AD_INSERTER_NAME', 'Ad Inserter');
32
 
33
  if (!defined( 'AD_INSERTER_VERSION'))
34
+ define ('AD_INSERTER_VERSION', '2.6.18');
35
 
36
  if (!defined ('AD_INSERTER_PLUGIN_BASENAME'))
37
  define ('AD_INSERTER_PLUGIN_BASENAME', plugin_basename (__FILE__));
1152
  define ('AI_VIEWPORT_INDEXES', 70);
1153
  define ('AI_ROTATION_SEED', 71);
1154
  define ('AI_AMP_CSS', 72);
1155
+ define ('AI_DYNAMIC_BLOCKS', 73);
1156
+ define ('AI_IP_TO_COUNTRY', 74);
1157
 
1158
  define ('AI_CONTEXT_NONE', 0);
1159
  define ('AI_CONTEXT_CONTENT', 1);
css/ai-settings.css CHANGED
@@ -1,5 +1,5 @@
1
  #ai-data {
2
- font-family: "2.6.16"; /* Used for version number of the file */
3
  }
4
 
5
  #blocked-warning {
1
  #ai-data {
2
+ font-family: "2.6.18"; /* Used for version number of the file */
3
  }
4
 
5
  #blocked-warning {
images/ez-3.png ADDED
Binary file
images/ez-4.png ADDED
Binary file
images/ez-5.png ADDED
Binary file
images/ez-6.png ADDED
Binary file
includes/js/ai-insert.js CHANGED
@@ -309,11 +309,13 @@ function ai_process_elements () {
309
  }
310
 
311
  if (typeof ai_process_lists == 'function') {
312
- ai_process_lists (jQuery ("div.ai-list-data"));
 
313
  }
314
 
315
  if (typeof ai_process_ip_addresses == 'function') {
316
- ai_process_ip_addresses (jQuery ("div.ai-ip-data"));
 
317
  }
318
 
319
  if (typeof ai_adb_process_blocks == 'function') {
309
  }
310
 
311
  if (typeof ai_process_lists == 'function') {
312
+ // ai_process_lists (jQuery ("div.ai-list-data"));
313
+ ai_process_lists (jQuery (".ai-list-data"));
314
  }
315
 
316
  if (typeof ai_process_ip_addresses == 'function') {
317
+ // ai_process_ip_addresses (jQuery ("div.ai-ip-data"));
318
+ ai_process_ip_addresses (jQuery (".ai-ip-data"));
319
  }
320
 
321
  if (typeof ai_adb_process_blocks == 'function') {
includes/js/ai-insert.min.js CHANGED
@@ -8,7 +8,7 @@ l(u,"ai-debug-bar")&&l(u,"ai-debug-script")&&(p(u,"ai-debug-script"),v(u,"ai-deb
8
  ai_insert_list_code=function(d){var l=document.getElementsByClassName(d)[0];if("undefined"!=typeof l){var v=ai_insert_code(l),p=l.closest("div.AI_FUNCT_GET_BLOCK_CLASS_NAME");if(p){v||p.removeAttribute("data-ai");var t=p.querySelectorAll(".ai-debug-block");p&&t.length&&(p.classList.remove("ai-list-block"),p.classList.remove("ai-list-block-ip"),p.style.visibility="",p.classList.contains("ai-remove-position")&&(p.style.position=""))}l.classList.remove(d);v&&ai_process_elements()}};
9
  ai_insert_viewport_code=function(d){var l=document.getElementsByClassName(d)[0];"undefined"!=typeof l&&(ai_insert_code(l),l.classList.remove(d),ai_process_elements())};ai_insert_code_by_class=function(d){var l=document.getElementsByClassName(d)[0];"undefined"!=typeof l&&(ai_insert_code(l),l.classList.remove(d))};
10
  ai_insert_client_code=function(d,l){var v=document.getElementsByClassName(d)[0];if("undefined"!=typeof v){var p=v.getAttribute("data-code");null!=p&&ai_check_block()&&ai_check_and_insert_block()&&(v.setAttribute("data-code",p.substring(Math.floor(l/19))),ai_insert_code_by_class(d),v.remove())}};ai_process_elements_active=!1;
11
- function ai_process_elements(){ai_process_elements_active||setTimeout(function(){ai_process_elements_active=!1;"function"==typeof ai_process_rotations&&ai_process_rotations();"function"==typeof ai_process_lists&&ai_process_lists(jQuery("div.ai-list-data"));"function"==typeof ai_process_ip_addresses&&ai_process_ip_addresses(jQuery("div.ai-ip-data"));"function"==typeof ai_adb_process_blocks&&ai_adb_process_blocks()},5);ai_process_elements_active=!0}
12
  var Arrive=function(d,l,v){function p(r,c,e){b.addMethod(c,e,r.unbindEvent);b.addMethod(c,e,r.unbindEventWithSelectorOrCallback);b.addMethod(c,e,r.unbindEventWithSelectorAndCallback)}function t(r){r.arrive=k.bindEvent;p(k,r,"unbindArrive");r.leave=w.bindEvent;p(w,r,"unbindLeave")}if(d.MutationObserver&&"undefined"!==typeof HTMLElement){var y=0,b=function(){var r=HTMLElement.prototype.matches||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector;
13
  return{matchesSelector:function(c,e){return c instanceof HTMLElement&&r.call(c,e)},addMethod:function(c,e,f){var a=c[e];c[e]=function(){if(f.length==arguments.length)return f.apply(this,arguments);if("function"==typeof a)return a.apply(this,arguments)}},callCallbacks:function(c,e){e&&e.options.onceOnly&&1==e.firedElems.length&&(c=[c[0]]);for(var f=0,a;a=c[f];f++)a&&a.callback&&a.callback.call(a.elem,a.elem);e&&e.options.onceOnly&&1==e.firedElems.length&&e.me.unbindEventWithSelectorAndCallback.call(e.target,
14
  e.selector,e.callback)},checkChildNodesRecursively:function(c,e,f,a){for(var g=0,h;h=c[g];g++)f(h,e,a)&&a.push({callback:e.callback,elem:h}),0<h.childNodes.length&&b.checkChildNodesRecursively(h.childNodes,e,f,a)},mergeArrays:function(c,e){var f={},a;for(a in c)c.hasOwnProperty(a)&&(f[a]=c[a]);for(a in e)e.hasOwnProperty(a)&&(f[a]=e[a]);return f},toElementsArray:function(c){"undefined"===typeof c||"number"===typeof c.length&&c!==d||(c=[c]);return c}}}(),u=function(){var r=function(){this._eventsBucket=
8
  ai_insert_list_code=function(d){var l=document.getElementsByClassName(d)[0];if("undefined"!=typeof l){var v=ai_insert_code(l),p=l.closest("div.AI_FUNCT_GET_BLOCK_CLASS_NAME");if(p){v||p.removeAttribute("data-ai");var t=p.querySelectorAll(".ai-debug-block");p&&t.length&&(p.classList.remove("ai-list-block"),p.classList.remove("ai-list-block-ip"),p.style.visibility="",p.classList.contains("ai-remove-position")&&(p.style.position=""))}l.classList.remove(d);v&&ai_process_elements()}};
9
  ai_insert_viewport_code=function(d){var l=document.getElementsByClassName(d)[0];"undefined"!=typeof l&&(ai_insert_code(l),l.classList.remove(d),ai_process_elements())};ai_insert_code_by_class=function(d){var l=document.getElementsByClassName(d)[0];"undefined"!=typeof l&&(ai_insert_code(l),l.classList.remove(d))};
10
  ai_insert_client_code=function(d,l){var v=document.getElementsByClassName(d)[0];if("undefined"!=typeof v){var p=v.getAttribute("data-code");null!=p&&ai_check_block()&&ai_check_and_insert_block()&&(v.setAttribute("data-code",p.substring(Math.floor(l/19))),ai_insert_code_by_class(d),v.remove())}};ai_process_elements_active=!1;
11
+ function ai_process_elements(){ai_process_elements_active||setTimeout(function(){ai_process_elements_active=!1;"function"==typeof ai_process_rotations&&ai_process_rotations();"function"==typeof ai_process_lists&&ai_process_lists(jQuery(".ai-list-data"));"function"==typeof ai_process_ip_addresses&&ai_process_ip_addresses(jQuery(".ai-ip-data"));"function"==typeof ai_adb_process_blocks&&ai_adb_process_blocks()},5);ai_process_elements_active=!0}
12
  var Arrive=function(d,l,v){function p(r,c,e){b.addMethod(c,e,r.unbindEvent);b.addMethod(c,e,r.unbindEventWithSelectorOrCallback);b.addMethod(c,e,r.unbindEventWithSelectorAndCallback)}function t(r){r.arrive=k.bindEvent;p(k,r,"unbindArrive");r.leave=w.bindEvent;p(w,r,"unbindLeave")}if(d.MutationObserver&&"undefined"!==typeof HTMLElement){var y=0,b=function(){var r=HTMLElement.prototype.matches||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector;
13
  return{matchesSelector:function(c,e){return c instanceof HTMLElement&&r.call(c,e)},addMethod:function(c,e,f){var a=c[e];c[e]=function(){if(f.length==arguments.length)return f.apply(this,arguments);if("function"==typeof a)return a.apply(this,arguments)}},callCallbacks:function(c,e){e&&e.options.onceOnly&&1==e.firedElems.length&&(c=[c[0]]);for(var f=0,a;a=c[f];f++)a&&a.callback&&a.callback.call(a.elem,a.elem);e&&e.options.onceOnly&&1==e.firedElems.length&&e.me.unbindEventWithSelectorAndCallback.call(e.target,
14
  e.selector,e.callback)},checkChildNodesRecursively:function(c,e,f,a){for(var g=0,h;h=c[g];g++)f(h,e,a)&&a.push({callback:e.callback,elem:h}),0<h.childNodes.length&&b.checkChildNodesRecursively(h.childNodes,e,f,a)},mergeArrays:function(c,e){var f={},a;for(a in c)c.hasOwnProperty(a)&&(f[a]=c[a]);for(a in e)e.hasOwnProperty(a)&&(f[a]=e[a]);return f},toElementsArray:function(c){"undefined"===typeof c||"number"===typeof c.length&&c!==d||(c=[c]);return c}}}(),u=function(){var r=function(){this._eventsBucket=
includes/js/ai-lists.js CHANGED
@@ -830,11 +830,13 @@ function ai_process_element (element) {
830
  }
831
 
832
  if (typeof ai_process_lists == 'function') {
833
- ai_process_lists (jQuery ("div.ai-list-data", element));
 
834
  }
835
 
836
  if (typeof ai_process_ip_addresses == 'function') {
837
- ai_process_ip_addresses (jQuery ("div.ai-ip-data", element));
 
838
  }
839
 
840
  if (typeof ai_adb_process_blocks == 'function') {
830
  }
831
 
832
  if (typeof ai_process_lists == 'function') {
833
+ // ai_process_lists (jQuery ("div.ai-list-data", element));
834
+ ai_process_lists (jQuery (".ai-list-data", element));
835
  }
836
 
837
  if (typeof ai_process_ip_addresses == 'function') {
838
+ // ai_process_ip_addresses (jQuery ("div.ai-ip-data", element));
839
+ ai_process_ip_addresses (jQuery (".ai-ip-data", element));
840
  }
841
 
842
  if (typeof ai_adb_process_blocks == 'function') {
includes/js/ai-lists.min.js CHANGED
@@ -17,6 +17,5 @@ q.find(".ai-debug-name.ai-scheduling-status").text(ai_front.fallback+"="+O))}}if
17
  d.css({position:""}),a(this).next(".ai-fallback").removeClass("ai-fallback"),"undefined"!=typeof a(this).data("fallback-code")?(b=b64d(a(this).data("fallback-code")),a(this).append(b),ai_process_element(this)):(a(this).hide(),d.find(".ai-debug-block").length||d.hide()),b=d.attr("data-ai"),"undefined"!==typeof b&&!1!==b&&(b=a(this).attr("fallback-tracking"),"undefined"!==typeof b&&!1!==b&&d.attr("data-ai",b))):(a(this).hide(),d.find(".ai-debug-block").length||d.hide(),d.removeAttr("data-ai").removeClass("ai-track"),
18
  d.find(".ai-debug-block").length?(d.css({visibility:""}).removeClass("ai-close"),d.hasClass("ai-remove-position")&&d.css({position:""})):d.hide());a(this).attr("data-code","");a(this).attr("data-fallback-code","");d.removeClass("ai-list-block")})}};a(document).ready(function(e){setTimeout(function(){ai_process_lists();setTimeout(function(){n()},50);if("function"==typeof ai_load_blocks)jQuery(document).on("cmplzEnableScripts",function(h){"all"===h.consentLevel&&ai_load_blocks()});jQuery("#ai-iab-tcf-bar").click(function(){AiCookies.remove("euconsent-v2",
19
  {path:"/",domain:"."+window.location.hostname});AiCookies.remove("__lxG__consent__v2",{path:"/",domain:"."+window.location.hostname});AiCookies.remove("__lxG__consent__v2_daisybit",{path:"/",domain:"."+window.location.hostname});AiCookies.remove("__lxG__consent__v2_gdaisybit",{path:"/",domain:"."+window.location.hostname});AiCookies.remove("cmplz_marketing",{path:"/",domain:"."+window.location.hostname});AiCookies.remove("cmplz_stats",{path:"/",domain:"."+window.location.hostname});AiCookies.remove("complianz_consent_status",
20
- {path:"/",domain:"."+window.location.hostname});jQuery("#ai-iab-tcf-status").text("COOKIE DELETED")})},5)})});
21
- function ai_process_element(a){setTimeout(function(){"function"==typeof ai_process_rotations_in_element&&ai_process_rotations_in_element(a);"function"==typeof ai_process_lists&&ai_process_lists(jQuery("div.ai-list-data",a));"function"==typeof ai_process_ip_addresses&&ai_process_ip_addresses(jQuery("div.ai-ip-data",a));"function"==typeof ai_adb_process_blocks&&ai_adb_process_blocks(a)},5)}
22
  function getAllUrlParams(a){var k=a?a.split("?")[1]:window.location.search.slice(1);a={};if(k){k=k.split("#")[0];k=k.split("&");for(var z=0;z<k.length;z++){var n=k[z].split("="),E=void 0,e=n[0].replace(/\[\d*\]/,function(h){E=h.slice(1,-1);return""});n="undefined"===typeof n[1]?"":n[1];e=e.toLowerCase();n=n.toLowerCase();a[e]?("string"===typeof a[e]&&(a[e]=[a[e]]),"undefined"===typeof E?a[e].push(n):a[e][E]=n):a[e]=n}}return a};
17
  d.css({position:""}),a(this).next(".ai-fallback").removeClass("ai-fallback"),"undefined"!=typeof a(this).data("fallback-code")?(b=b64d(a(this).data("fallback-code")),a(this).append(b),ai_process_element(this)):(a(this).hide(),d.find(".ai-debug-block").length||d.hide()),b=d.attr("data-ai"),"undefined"!==typeof b&&!1!==b&&(b=a(this).attr("fallback-tracking"),"undefined"!==typeof b&&!1!==b&&d.attr("data-ai",b))):(a(this).hide(),d.find(".ai-debug-block").length||d.hide(),d.removeAttr("data-ai").removeClass("ai-track"),
18
  d.find(".ai-debug-block").length?(d.css({visibility:""}).removeClass("ai-close"),d.hasClass("ai-remove-position")&&d.css({position:""})):d.hide());a(this).attr("data-code","");a(this).attr("data-fallback-code","");d.removeClass("ai-list-block")})}};a(document).ready(function(e){setTimeout(function(){ai_process_lists();setTimeout(function(){n()},50);if("function"==typeof ai_load_blocks)jQuery(document).on("cmplzEnableScripts",function(h){"all"===h.consentLevel&&ai_load_blocks()});jQuery("#ai-iab-tcf-bar").click(function(){AiCookies.remove("euconsent-v2",
19
  {path:"/",domain:"."+window.location.hostname});AiCookies.remove("__lxG__consent__v2",{path:"/",domain:"."+window.location.hostname});AiCookies.remove("__lxG__consent__v2_daisybit",{path:"/",domain:"."+window.location.hostname});AiCookies.remove("__lxG__consent__v2_gdaisybit",{path:"/",domain:"."+window.location.hostname});AiCookies.remove("cmplz_marketing",{path:"/",domain:"."+window.location.hostname});AiCookies.remove("cmplz_stats",{path:"/",domain:"."+window.location.hostname});AiCookies.remove("complianz_consent_status",
20
+ {path:"/",domain:"."+window.location.hostname});jQuery("#ai-iab-tcf-status").text("COOKIE DELETED")})},5)})});function ai_process_element(a){setTimeout(function(){"function"==typeof ai_process_rotations_in_element&&ai_process_rotations_in_element(a);"function"==typeof ai_process_lists&&ai_process_lists(jQuery(".ai-list-data",a));"function"==typeof ai_process_ip_addresses&&ai_process_ip_addresses(jQuery(".ai-ip-data",a));"function"==typeof ai_adb_process_blocks&&ai_adb_process_blocks(a)},5)}
 
21
  function getAllUrlParams(a){var k=a?a.split("?")[1]:window.location.search.slice(1);a={};if(k){k=k.split("#")[0];k=k.split("&");for(var z=0;z<k.length;z++){var n=k[z].split("="),E=void 0,e=n[0].replace(/\[\d*\]/,function(h){E=h.slice(1,-1);return""});n="undefined"===typeof n[1]?"":n[1];e=e.toLowerCase();n=n.toLowerCase();a[e]?("string"===typeof a[e]&&(a[e]=[a[e]]),"undefined"===typeof E?a[e].push(n):a[e][E]=n):a[e]=n}}return a};
includes/js/ai-rotation.js CHANGED
@@ -347,11 +347,13 @@ function ai_process_elements () {
347
  }
348
 
349
  if (typeof ai_process_lists == 'function') {
350
- ai_process_lists (jQuery ("div.ai-list-data"));
 
351
  }
352
 
353
  if (typeof ai_process_ip_addresses == 'function') {
354
- ai_process_ip_addresses (jQuery ("div.ai-ip-data"));
 
355
  }
356
 
357
  if (typeof ai_adb_process_blocks == 'function') {
347
  }
348
 
349
  if (typeof ai_process_lists == 'function') {
350
+ // ai_process_lists (jQuery ("div.ai-list-data"));
351
+ ai_process_lists (jQuery (".ai-list-data"));
352
  }
353
 
354
  if (typeof ai_process_ip_addresses == 'function') {
355
+ // ai_process_ip_addresses (jQuery ("div.ai-ip-data"));
356
+ ai_process_ip_addresses (jQuery (".ai-ip-data"));
357
  }
358
 
359
  if (typeof ai_adb_process_blocks == 'function') {
includes/js/ai-rotation.min.js CHANGED
@@ -1,9 +1,9 @@
1
- jQuery(function(a){function q(){a("div.ai-rotate.ai-rotation-groups").each(function(b,k){a(this).addClass("ai-timer");ai_process_rotation(this)})}var l=[];ai_process_rotation=function(b){if(a(b).hasClass("ai-unprocessed")||a(b).hasClass("ai-timer"))if(a(b).removeClass("ai-unprocessed").removeClass("ai-timer"),l.includes(b.selector)&&l.splice(l.indexOf(b.selector),1),"number"==typeof b.length)for(var k=0;k<b.length;k++)0==k?ai_process_single_rotation(b[k],!0):ai_process_single_rotation(b[k],!1);else ai_process_single_rotation(b,
2
- !0)};ai_process_single_rotation=function(b,k){var h=a(b).children(".ai-rotate-option");if(0!=h.length){h.hide();if("undefined"==typeof a(b).data("next"))if("undefined"!=typeof a(h[0]).data("group")){var g=-1,p=[];a("span[data-ai-groups]").each(function(b){(a(this)[0].offsetWidth||a(this)[0].offsetHeight||a(this)[0].getClientRects().length)&&p.push(this)});1<=p.length&&JSON.parse(b64d(a(p).first().data("ai-groups"))).forEach(function(b,c){-1==g&&h.each(function(c){if(b64d(a(this).data("group"))==b)return g=
3
- c,!1})})}else{var e=a(b).data("shares");if("string"===typeof e){e=JSON.parse(atob(e));var f=Math.round(100*Math.random());for(var c=0;c<e.length&&(g=c,0>e[c]||!(f<=e[c]));c++);}else e=a(b).hasClass("ai-unique"),f=new Date,e?("number"!=typeof ai_rotation_seed&&(ai_rotation_seed=(Math.floor(1E3*Math.random())+f.getMilliseconds())%h.length),e=a(b).data("counter"),g=ai_rotation_seed+e,g>=h.length&&(g-=h.length)):(g=Math.floor(Math.random()*h.length),f.getMilliseconds()%2&&(g=h.length-g-1))}else g=parseInt(a(b).attr("data-next")),
4
- f=a(h[g]),"undefined"!=typeof f.data("code")&&(f=a(b64d(f.data("code")))),0!=f.find("span[data-ai-groups]").addBack("span[data-ai-groups]").length&&0!=a(".ai-rotation-groups").length&&setTimeout(function(){q()},5);if(!(0>g||g>=h.length)){f=a(h[g]);e="";if("undefined"!=typeof f.data("time")){c=atob(f.data("time"));if(0==c&&1<h.length){var d=g;do{d++;d>=h.length&&(d=0);var m=a(h[d]);if("undefined"==typeof m.data("time")){g=d;f=a(h[g]);c=0;break}m=atob(m.data("time"))}while(0==m&&d!=g);0!=c&&(g=d,f=
5
- a(h[g]),c=atob(f.data("time")))}if(0<c&&(d=g+1,d>=h.length&&(d=0),"undefined"!=typeof a(b).data("info"))){e=JSON.parse(atob(a(b).data("info")))[0];a(b).attr("data-next",d);var n="div.ai-rotate.ai-"+e;l.includes(n)&&(k=!1);k&&(l.push(n),setTimeout(function(){a(n).addClass("ai-timer");ai_process_rotation(a(n))},1E3*c));e=" ("+c+" s)"}}else"undefined"==typeof f.data("group")&&h.each(function(b){b!=g&&a(this).remove()});f.css({display:"",visibility:"",position:"",width:"",height:"",top:"",left:""}).removeClass("ai-rotate-hidden").removeClass("ai-rotate-hidden-2");
6
  a(b).css({position:""});"undefined"!=typeof f.data("code")&&(h.empty(),c=b64d(f.data("code")),f.append(c),ai_process_elements());f=b64d(f.data("name"));d=a(b).closest(".ai-debug-block");0!=d.length&&(c=d.find("kbd.ai-option-name"),d=d.find(".ai-debug-block"),"undefined"!=typeof d&&(d=d.find("kbd.ai-option-name"),c=c.slice(0,c.length-d.length)),"undefined"!=typeof c&&(d=c.first().data("separator"),"undefined"==typeof d&&(d=""),c.html(d+f+e)));c=!1;d=a(b).closest(".ai-adb-show");0!=d.length&&d.attr("data-ai-tracking")&&
7
- (e=JSON.parse(b64d(d.attr("data-ai-tracking"))),"undefined"!==typeof e&&e.constructor===Array&&(e[1]=g+1,e[3]=f,d.attr("data-ai-tracking",b64e(JSON.stringify(e))),c=!0));c||(c=a(b).closest("div[data-ai]"),"undefined"!=typeof c.attr("data-ai")&&(e=JSON.parse(b64d(c.attr("data-ai"))),"undefined"!==typeof e&&e.constructor===Array&&(e[1]=g+1,e[3]=f,c.attr("data-ai",b64e(JSON.stringify(e))))))}}};ai_process_rotations=function(){a("div.ai-rotate").each(function(a,k){ai_process_rotation(this)})};ai_process_rotations_in_element=
8
- function(b){a("div.ai-rotate",b).each(function(a,b){ai_process_rotation(this)})};a(document).ready(function(a){setTimeout(function(){ai_process_rotations()},10)})});ai_process_elements_active=!1;
9
- function ai_process_elements(){ai_process_elements_active||setTimeout(function(){ai_process_elements_active=!1;"function"==typeof ai_process_rotations&&ai_process_rotations();"function"==typeof ai_process_lists&&ai_process_lists(jQuery("div.ai-list-data"));"function"==typeof ai_process_ip_addresses&&ai_process_ip_addresses(jQuery("div.ai-ip-data"));"function"==typeof ai_adb_process_blocks&&ai_adb_process_blocks()},5);ai_process_elements_active=!0};
1
+ jQuery(function(a){function r(){a("div.ai-rotate.ai-rotation-groups").each(function(b,k){a(this).addClass("ai-timer");ai_process_rotation(this)})}var l=[];ai_process_rotation=function(b){if(a(b).hasClass("ai-unprocessed")||a(b).hasClass("ai-timer"))if(a(b).removeClass("ai-unprocessed").removeClass("ai-timer"),l.includes(b.selector)&&l.splice(l.indexOf(b.selector),1),"number"==typeof b.length)for(var k=0;k<b.length;k++)0==k?ai_process_single_rotation(b[k],!0):ai_process_single_rotation(b[k],!1);else ai_process_single_rotation(b,
2
+ !0)};ai_process_single_rotation=function(b,k){var h=a(b).children(".ai-rotate-option");if(0!=h.length){h.hide();if("undefined"==typeof a(b).data("next"))if("undefined"!=typeof a(h[0]).data("group")){var g=-1,q=[];a("span[data-ai-groups]").each(function(m){(a(this)[0].offsetWidth||a(this)[0].offsetHeight||a(this)[0].getClientRects().length)&&q.push(this)});1<=q.length&&JSON.parse(b64d(a(q).first().data("ai-groups"))).forEach(function(m,u){-1==g&&h.each(function(t){if(b64d(a(this).data("group"))==m)return g=
3
+ t,!1})})}else{var e=a(b).data("shares");if("string"===typeof e){e=JSON.parse(atob(e));var f=Math.round(100*Math.random());for(var c=0;c<e.length&&(g=c,0>e[c]||!(f<=e[c]));c++);}else e=a(b).hasClass("ai-unique"),f=new Date,e?("number"!=typeof ai_rotation_seed&&(ai_rotation_seed=(Math.floor(1E3*Math.random())+f.getMilliseconds())%h.length),e=a(b).data("counter"),g=ai_rotation_seed+e,g>=h.length&&(g-=h.length)):(g=Math.floor(Math.random()*h.length),f.getMilliseconds()%2&&(g=h.length-g-1))}else g=parseInt(a(b).attr("data-next")),
4
+ f=a(h[g]),"undefined"!=typeof f.data("code")&&(f=a(b64d(f.data("code")))),0!=f.find("span[data-ai-groups]").addBack("span[data-ai-groups]").length&&0!=a(".ai-rotation-groups").length&&setTimeout(function(){r()},5);if(!(0>g||g>=h.length)){f=a(h[g]);e="";if("undefined"!=typeof f.data("time")){c=atob(f.data("time"));if(0==c&&1<h.length){var d=g;do{d++;d>=h.length&&(d=0);var n=a(h[d]);if("undefined"==typeof n.data("time")){g=d;f=a(h[g]);c=0;break}n=atob(n.data("time"))}while(0==n&&d!=g);0!=c&&(g=d,f=
5
+ a(h[g]),c=atob(f.data("time")))}if(0<c&&(d=g+1,d>=h.length&&(d=0),"undefined"!=typeof a(b).data("info"))){e=JSON.parse(atob(a(b).data("info")))[0];a(b).attr("data-next",d);var p="div.ai-rotate.ai-"+e;l.includes(p)&&(k=!1);k&&(l.push(p),setTimeout(function(){a(p).addClass("ai-timer");ai_process_rotation(a(p))},1E3*c));e=" ("+c+" s)"}}else"undefined"==typeof f.data("group")&&h.each(function(m){m!=g&&a(this).remove()});f.css({display:"",visibility:"",position:"",width:"",height:"",top:"",left:""}).removeClass("ai-rotate-hidden").removeClass("ai-rotate-hidden-2");
6
  a(b).css({position:""});"undefined"!=typeof f.data("code")&&(h.empty(),c=b64d(f.data("code")),f.append(c),ai_process_elements());f=b64d(f.data("name"));d=a(b).closest(".ai-debug-block");0!=d.length&&(c=d.find("kbd.ai-option-name"),d=d.find(".ai-debug-block"),"undefined"!=typeof d&&(d=d.find("kbd.ai-option-name"),c=c.slice(0,c.length-d.length)),"undefined"!=typeof c&&(d=c.first().data("separator"),"undefined"==typeof d&&(d=""),c.html(d+f+e)));c=!1;d=a(b).closest(".ai-adb-show");0!=d.length&&d.attr("data-ai-tracking")&&
7
+ (e=JSON.parse(b64d(d.attr("data-ai-tracking"))),"undefined"!==typeof e&&e.constructor===Array&&(e[1]=g+1,e[3]=f,d.attr("data-ai-tracking",b64e(JSON.stringify(e))),c=!0));c||(c=a(b).closest("div[data-ai]"),"undefined"!=typeof c.attr("data-ai")&&(e=JSON.parse(b64d(c.attr("data-ai"))),"undefined"!==typeof e&&e.constructor===Array&&(e[1]=g+1,e[3]=f,c.attr("data-ai",b64e(JSON.stringify(e))))))}}};ai_process_rotations=function(){a("div.ai-rotate").each(function(b,k){ai_process_rotation(this)})};ai_process_rotations_in_element=
8
+ function(b){a("div.ai-rotate",b).each(function(k,h){ai_process_rotation(this)})};a(document).ready(function(b){setTimeout(function(){ai_process_rotations()},10)})});ai_process_elements_active=!1;
9
+ function ai_process_elements(){ai_process_elements_active||setTimeout(function(){ai_process_elements_active=!1;"function"==typeof ai_process_rotations&&ai_process_rotations();"function"==typeof ai_process_lists&&ai_process_lists(jQuery(".ai-list-data"));"function"==typeof ai_process_ip_addresses&&ai_process_ip_addresses(jQuery(".ai-ip-data"));"function"==typeof ai_adb_process_blocks&&ai_adb_process_blocks()},5);ai_process_elements_active=!0};
js/ad-inserter.js CHANGED
@@ -1,4 +1,4 @@
1
- var javascript_version = "2.6.16";
2
  var ignore_key = true;
3
  var start = 1;
4
  var end = 16;
@@ -1879,21 +1879,6 @@ jQuery(document).ready (function($) {
1879
  var editor_disabled = $(this).is(":checked");
1880
 
1881
  switch_editor (block, editor_disabled);
1882
-
1883
- // var editor = ace.edit ("editor-" + block);
1884
- // var textarea = $("#block-" + block);
1885
- // var ace_editor = $("#editor-" + block);
1886
-
1887
- // if (editor_disabled) {
1888
- // textarea.val (editor.session.getValue());
1889
- // textarea.css ('display', 'block');
1890
- // ace_editor.css ('display', 'none');
1891
- // } else {
1892
- // editor.session.setValue (textarea.val ())
1893
- // editor.renderer.updateFull();
1894
- // ace_editor.css ('display', 'block');
1895
- // textarea.css ('display', 'none');
1896
- // }
1897
  });
1898
  }
1899
  }
@@ -2204,8 +2189,10 @@ jQuery(document).ready (function($) {
2204
 
2205
  $('#simple-editor-h').checkboxButton ().click (function () {
2206
  var tab_id = $("#ai-plugin-settings-tab-container .ui-tabs-panel:visible").attr("id");
2207
- if (active_tab == 0 && tab_id == 'tab-header') {
 
2208
  $('#ai-tab-container .simple-editor-button').click();
 
2209
  }
2210
  });
2211
  // Switch to simple editor if the button was pressed before the tab was configured
@@ -2221,8 +2208,10 @@ jQuery(document).ready (function($) {
2221
 
2222
  $('#simple-editor-f').checkboxButton ().click (function () {
2223
  var tab_id = $("#ai-plugin-settings-tab-container .ui-tabs-panel:visible").attr("id");
2224
- if (active_tab == 0 && tab_id == 'tab-footer') {
 
2225
  $('#ai-tab-container .simple-editor-button').click();
 
2226
  }
2227
  });
2228
  // Switch to simple editor if the button was pressed before the tab was configured
@@ -2263,8 +2252,10 @@ jQuery(document).ready (function($) {
2263
 
2264
  $('#simple-editor-a').checkboxButton ().click (function () {
2265
  var tab_id = $("#ai-plugin-settings-tab-container .ui-tabs-panel:visible").attr("id");
2266
- if (active_tab == 0 && tab_id == 'tab-adblocking') {
 
2267
  $('#ai-tab-container .simple-editor-button').click();
 
2268
  }
2269
  });
2270
  // Switch to simple editor if the button was pressed before the tab was configured
@@ -3105,8 +3096,10 @@ jQuery(document).ready (function($) {
3105
 
3106
  $('#simple-editor-' + tab).checkboxButton ().click (function () {
3107
  var block = $(this).attr('id').replace ("simple-editor-", "");
3108
- if (block == active_tab) {
 
3109
  $('#ai-tab-container .simple-editor-button').click();
 
3110
  }
3111
  });
3112
  // Switch to simple editor if the button was pressed before the tab was configured
@@ -4644,6 +4637,41 @@ jQuery(document).ready (function($) {
4644
  clipboard.find ('input[name]:text').eq (index).attr ('value', $(this).val ());
4645
  });
4646
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4647
  clipboard.find ('textarea.simple-editor').text (get_editor_text (active_tab));
4648
 
4649
  $("#ai-container .ai-copy").each (function () {
1
+ var javascript_version = "2.6.18";
2
  var ignore_key = true;
3
  var start = 1;
4
  var end = 16;
1879
  var editor_disabled = $(this).is(":checked");
1880
 
1881
  switch_editor (block, editor_disabled);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1882
  });
1883
  }
1884
  }
2189
 
2190
  $('#simple-editor-h').checkboxButton ().click (function () {
2191
  var tab_id = $("#ai-plugin-settings-tab-container .ui-tabs-panel:visible").attr("id");
2192
+ if (active_tab == 0 && tab_id == 'tab-header' && !$(this).hasClass ('clicked')) {
2193
+ $(this).addClass ('clicked')
2194
  $('#ai-tab-container .simple-editor-button').click();
2195
+ $(this).removeClass ('clicked')
2196
  }
2197
  });
2198
  // Switch to simple editor if the button was pressed before the tab was configured
2208
 
2209
  $('#simple-editor-f').checkboxButton ().click (function () {
2210
  var tab_id = $("#ai-plugin-settings-tab-container .ui-tabs-panel:visible").attr("id");
2211
+ if (active_tab == 0 && tab_id == 'tab-footer' && !$(this).hasClass ('clicked')) {
2212
+ $(this).addClass ('clicked')
2213
  $('#ai-tab-container .simple-editor-button').click();
2214
+ $(this).removeClass ('clicked')
2215
  }
2216
  });
2217
  // Switch to simple editor if the button was pressed before the tab was configured
2252
 
2253
  $('#simple-editor-a').checkboxButton ().click (function () {
2254
  var tab_id = $("#ai-plugin-settings-tab-container .ui-tabs-panel:visible").attr("id");
2255
+ if (active_tab == 0 && tab_id == 'tab-adblocking' && !$(this).hasClass ('clicked')) {
2256
+ $(this).addClass ('clicked')
2257
  $('#ai-tab-container .simple-editor-button').click();
2258
+ $(this).removeClass ('clicked')
2259
  }
2260
  });
2261
  // Switch to simple editor if the button was pressed before the tab was configured
3096
 
3097
  $('#simple-editor-' + tab).checkboxButton ().click (function () {
3098
  var block = $(this).attr('id').replace ("simple-editor-", "");
3099
+ if (block == active_tab && !$(this).hasClass ('clicked')) {
3100
+ $(this).addClass ('clicked')
3101
  $('#ai-tab-container .simple-editor-button').click();
3102
+ $(this).removeClass ('clicked')
3103
  }
3104
  });
3105
  // Switch to simple editor if the button was pressed before the tab was configured
4637
  clipboard.find ('input[name]:text').eq (index).attr ('value', $(this).val ());
4638
  });
4639
 
4640
+
4641
+ // Lists
4642
+ if ($('#list-settings-' + active_tab).is(':visible')) {
4643
+ clipboard.find ('#list-settings-999').show ();
4644
+ } else {
4645
+ clipboard.find ('#list-settings-999').hide ();
4646
+ }
4647
+
4648
+ if ($('#list-settings-' + active_tab).hasClass('ai-expanded')) {
4649
+ clipboard.find ('#list-settings-999').addClass ('ai-expanded');
4650
+ } else {
4651
+ clipboard.find ('#list-settings-999').removeClass ('ai-expanded');
4652
+ }
4653
+
4654
+ $('div#tab-' + active_tab + ' table.ai-lists tr').each (function (index){
4655
+ if ($(this).is(':visible')) {
4656
+ clipboard.find ('table.ai-lists tr').eq (index).show ();
4657
+ } else {
4658
+ clipboard.find ('table.ai-lists tr').eq (index).hide ();
4659
+ }
4660
+
4661
+ if ($(this).find ('span.checkbox-list-button').hasClass ('dashicons-no')) {
4662
+ clipboard.find ('table.ai-lists tr').eq (index).find ('span.checkbox-list-button').addClass ('dashicons-no').removeClass ('dashicons-yes');
4663
+ } else {
4664
+ clipboard.find ('table.ai-lists tr').eq (index).find ('span.checkbox-list-button').removeClass ('dashicons-no').addClass ('dashicons-yes');
4665
+ }
4666
+
4667
+ if ($(this).hasClass ('list-items')) {
4668
+ clipboard.find ('table.ai-lists tr').eq (index).addClass ('list-items');
4669
+ } else {
4670
+ clipboard.find ('table.ai-lists tr').eq (index).removeClass ('list-items');
4671
+ }
4672
+ });
4673
+
4674
+
4675
  clipboard.find ('textarea.simple-editor').text (get_editor_text (active_tab));
4676
 
4677
  $("#ai-container .ai-copy").each (function () {
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: ads, adsense, ad rotation, ad manager, amp, amazon, ad blocking detection,
6
  Requires at least: 4.6
7
  Tested up to: 5.5
8
  Requires PHP: 5.6
9
- Stable tag: 2.6.16
10
  License: GPLv3
11
 
12
  Manage Google AdSense, Media.net, Amazon banners, ads.txt, ad rotation, sticky widgets, AMP ads, DFP, tracking, AdSense header and footer code
@@ -335,6 +335,13 @@ If you are not happy to reveal this information and you have opted in, simply di
335
 
336
  == Changelog ==
337
 
 
 
 
 
 
 
 
338
  = 2.6.16 =
339
  - Added support for ad blocking detection action every n pageviews
340
  - Added support to individually disable pageview or click tracking (Pro only)
@@ -471,6 +478,13 @@ For the changelog of earlier versions, please refer to the separate changelog.tx
471
 
472
  == Upgrade Notice ==
473
 
 
 
 
 
 
 
 
474
  = 2.6.16 =
475
  Added support for ad blocking detection action every n pageviews;
476
  Added support to individually disable pageview or click tracking (Pro only);
6
  Requires at least: 4.6
7
  Tested up to: 5.5
8
  Requires PHP: 5.6
9
+ Stable tag: 2.6.18
10
  License: GPLv3
11
 
12
  Manage Google AdSense, Media.net, Amazon banners, ads.txt, ad rotation, sticky widgets, AMP ads, DFP, tracking, AdSense header and footer code
335
 
336
  == Changelog ==
337
 
338
+ = 2.6.18 =
339
+ - Added support to change Dynamic blocks setting for adinserter PHP function call
340
+ - Few minor bug fixes, cosmetic changes and code improvements
341
+
342
+ = 2.6.17 =
343
+ - Fix for double client-side insertions when using geolocation (Pro only)
344
+
345
  = 2.6.16 =
346
  - Added support for ad blocking detection action every n pageviews
347
  - Added support to individually disable pageview or click tracking (Pro only)
478
 
479
  == Upgrade Notice ==
480
 
481
+ = 2.6.18 =
482
+ Added support to change Dynamic blocks setting for adinserter PHP function call;
483
+ Few minor bug fixes, cosmetic changes and code improvements
484
+
485
+ = 2.6.17 =
486
+ Fix for double client-side insertions when using geolocation (Pro only)
487
+
488
  = 2.6.16 =
489
  Added support for ad blocking detection action every n pageviews;
490
  Added support to individually disable pageview or click tracking (Pro only);
settings.php CHANGED
@@ -3410,6 +3410,11 @@ function generate_settings_form (){
3410
  replace_blocked_image ('ai-info-3', 'info-3.jpg', 'block');
3411
  replace_blocked_image ('ai-ez-1', 'ez-1.jpg', 'block');
3412
  replace_blocked_image ('ai-ez-2', 'ez-2.jpg', 'block');
 
 
 
 
 
3413
  replace_blocked_image ('ai-pro-1', 'icon-256x256.jpg', 'block');
3414
  replace_blocked_image ('ai-pro-2', 'ai-charts-250.png', 'block');
3415
  replace_blocked_image ('ai-pro-3', 'ai-countries-250.png', 'block');
@@ -5020,6 +5025,18 @@ function sidebar_addense_alternative () { ?>
5020
  break;
5021
  case 5:
5022
  case 6:
 
 
 
 
 
 
 
 
 
 
 
 
5023
  case 7:
5024
  case 8:
5025
  ?>
@@ -5030,7 +5047,7 @@ function sidebar_addense_alternative () { ?>
5030
  <div style="clear: both;"></div>
5031
  </div>
5032
  <div class="ai-form rounded" style="height: 90px; padding: 8px 4px 8px 12px;">
5033
- <a href='https://www.ezoic.com/?utm_source=ad-inserter&utm_medium=ads&utm_campaign=ad-inserter-ads&utm_term=adinserter&utm_content=ezoic' class="clear-link" title="<?php _e ('Looking for AdSense alternative?', 'ad-inserter'); ?>" target="_blank"><img id="ai-ez-1" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ez-1.jpg" /></a>
5034
  </div>
5035
  <?php
5036
  break;
@@ -5230,7 +5247,7 @@ function sidebar_pro () {
5230
  <a href="https://adinserter.pro/documentation/ad-impression-and-click-tracking" class="clear-link" title="<?php _e ('A/B testing - Track ad impressions and clicks', 'ad-inserter'); ?>" target="_blank"><img id="ai-pro-2" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ai-charts-250.png" /></a>
5231
  <!-- <a href='https://www.media.net/program?ha=e9Pw4uwo2Uw/5xjjsB3lnYZZWUI+hzRSONzDaYA9EwX+3jg/PJYwFshOFEjop5NH2wRNDfr357ZTY1zlhCk7zw%3D%3D&loc=2' class="clear-link" title="<?php _e ('Looking for AdSense alternative?', 'ad-inserter'); ?>" target="_blank"><img id="ai-media-9" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>contextual-9.jpg" /></a>-->
5232
  <?php break; case 3: ?>
5233
- <a href="https://www.ezoic.com/?utm_source=ad-inserter&utm_medium=ads&utm_campaign=ad-inserter-ads&utm_term=adinserter&utm_content=ezoic&loc=2" class="clear-link" title="<?php _e ('Looking for AdSense alternative?', 'ad-inserter'); ?>" target="_blank"><img id="ai-ez-2" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ez-2.jpg" /></a>
5234
  <?php break;
5235
  } ?>
5236
  </div>
@@ -5248,7 +5265,7 @@ function sidebar_pro () {
5248
  <?php break;
5249
  case 2:
5250
  ?>
5251
- <a href="https://www.ezoic.com/?utm_source=ad-inserter&utm_medium=ads&utm_campaign=ad-inserter-ads&utm_term=adinserter&utm_content=ezoic&loc=2" class="clear-link" title="<?php _e ('Looking for AdSense alternative?', 'ad-inserter'); ?>" target="_blank"><img id="ai-ez-2" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ez-2.jpg" /></a>
5252
  <?php break;
5253
  case 3:
5254
  ?>
@@ -5262,7 +5279,7 @@ function sidebar_pro () {
5262
  <?php switch ($version) {
5263
  case 0: ?>
5264
  <!-- <a href='https://www.media.net/program?ha=e9Pw4uwo2Uw/5xjjsB3lnYZZWUI+hzRSONzDaYA9EwX+3jg/PJYwFshOFEjop5NH2wRNDfr357ZTY1zlhCk7zw%3D%3D&loc=2' class="clear-link" title="<?php _e ('Looking for AdSense alternative?', 'ad-inserter'); ?>" target="_blank"><img id="ai-media-9" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>contextual-9.gif" /></a>-->
5265
- <a href="https://www.ezoic.com/?utm_source=ad-inserter&utm_medium=ads&utm_campaign=ad-inserter-ads&utm_term=adinserter&utm_content=ezoic&loc=2" class="clear-link" title="<?php _e ('Looking for AdSense alternative?', 'ad-inserter'); ?>" target="_blank"><img id="ai-ez-2" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ez-2.jpg" /></a>
5266
  <?php break; case 1: ?>
5267
  <a href="https://adinserter.pro/documentation/black-and-white-lists#geo-targeting" class="clear-link" title="Geotargeting - black/white-list countries" target="_blank"><img id="ai-pro-3" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ai-countries-250.png" /></a>
5268
  <!-- <a href='https://www.media.net/program?ha=e9Pw4uwo2Uw/5xjjsB3lnYZZWUI+hzRSONzDaYA9EwX+3jg/PJYwFshOFEjop5NH2wRNDfr357ZTY1zlhCk7zw%3D%3D&loc=2' class="clear-link" title="<?php _e ('Looking for AdSense alternative?', 'ad-inserter'); ?>" target="_blank"><img id="ai-media-2" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>contextual-2.jpg" /></a>-->
@@ -5286,7 +5303,7 @@ function sidebar_pro () {
5286
  <?php break;
5287
  case 1:
5288
  ?>
5289
- <a href="https://www.ezoic.com/?utm_source=ad-inserter&utm_medium=ads&utm_campaign=ad-inserter-ads&utm_term=adinserter&utm_content=ezoic&loc=2" class="clear-link" title="<?php _e ('Looking for AdSense alternative?', 'ad-inserter'); ?>" target="_blank"><img id="ai-ez-2" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ez-2.jpg" /></a>
5290
  <?php break;
5291
  case 2:
5292
  ?>
3410
  replace_blocked_image ('ai-info-3', 'info-3.jpg', 'block');
3411
  replace_blocked_image ('ai-ez-1', 'ez-1.jpg', 'block');
3412
  replace_blocked_image ('ai-ez-2', 'ez-2.jpg', 'block');
3413
+ replace_blocked_image ('ai-ez-2', 'ez-2.png', 'block');
3414
+ replace_blocked_image ('ai-ez-3', 'ez-3.png', 'block');
3415
+ replace_blocked_image ('ai-ez-4', 'ez-4.png', 'block');
3416
+ replace_blocked_image ('ai-ez-5', 'ez-5.png', 'block');
3417
+ replace_blocked_image ('ai-ez-6', 'ez-6.png', 'block');
3418
  replace_blocked_image ('ai-pro-1', 'icon-256x256.jpg', 'block');
3419
  replace_blocked_image ('ai-pro-2', 'ai-charts-250.png', 'block');
3420
  replace_blocked_image ('ai-pro-3', 'ai-countries-250.png', 'block');
5025
  break;
5026
  case 5:
5027
  case 6:
5028
+ ?>
5029
+ <div class="ai-form header rounded">
5030
+ <div style="float: left;">
5031
+ <h2 style="display: inline-block; margin: 5px 0;"><?php _e ('Blank ad blocks? Looking for AdSense alternative?', 'ad-inserter'); ?></h2>
5032
+ </div>
5033
+ <div style="clear: both;"></div>
5034
+ </div>
5035
+ <div class="ai-form rounded" style="height: 90px; padding: 8px 4px 8px 12px;">
5036
+ <a href='https://www.ezoic.com/?utm_source=ad-inserter&utm_medium=ads&utm_campaign=ad-inserter-ads&utm_term=adinserter&utm_content=ezoic' class="clear-link" title="<?php _e ('Looking for AdSense alternative?', 'ad-inserter'); ?>" target="_blank"><img id="ai-ez-4" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ez-4.png" /></a>
5037
+ </div>
5038
+ <?php
5039
+ break;
5040
  case 7:
5041
  case 8:
5042
  ?>
5047
  <div style="clear: both;"></div>
5048
  </div>
5049
  <div class="ai-form rounded" style="height: 90px; padding: 8px 4px 8px 12px;">
5050
+ <a href='https://www.ezoic.com/?utm_source=ad-inserter&utm_medium=ads&utm_campaign=ad-inserter-ads&utm_term=adinserter&utm_content=ezoic' class="clear-link" title="<?php _e ('Looking for AdSense alternative?', 'ad-inserter'); ?>" target="_blank"><img id="ai-ez-6" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ez-6.png" /></a>
5051
  </div>
5052
  <?php
5053
  break;
5247
  <a href="https://adinserter.pro/documentation/ad-impression-and-click-tracking" class="clear-link" title="<?php _e ('A/B testing - Track ad impressions and clicks', 'ad-inserter'); ?>" target="_blank"><img id="ai-pro-2" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ai-charts-250.png" /></a>
5248
  <!-- <a href='https://www.media.net/program?ha=e9Pw4uwo2Uw/5xjjsB3lnYZZWUI+hzRSONzDaYA9EwX+3jg/PJYwFshOFEjop5NH2wRNDfr357ZTY1zlhCk7zw%3D%3D&loc=2' class="clear-link" title="<?php _e ('Looking for AdSense alternative?', 'ad-inserter'); ?>" target="_blank"><img id="ai-media-9" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>contextual-9.jpg" /></a>-->
5249
  <?php break; case 3: ?>
5250
+ <a href="https://www.ezoic.com/?utm_source=ad-inserter&utm_medium=ads&utm_campaign=ad-inserter-ads&utm_term=adinserter&utm_content=ezoic&loc=2" class="clear-link" title="<?php _e ('Looking for AdSense alternative?', 'ad-inserter'); ?>" target="_blank"><img id="ai-ez-3" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ez-3.png" /></a>
5251
  <?php break;
5252
  } ?>
5253
  </div>
5265
  <?php break;
5266
  case 2:
5267
  ?>
5268
+ <a href="https://www.ezoic.com/?utm_source=ad-inserter&utm_medium=ads&utm_campaign=ad-inserter-ads&utm_term=adinserter&utm_content=ezoic&loc=2" class="clear-link" title="<?php _e ('Looking for AdSense alternative?', 'ad-inserter'); ?>" target="_blank"><img id="ai-ez-5" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ez-5.png" /></a>
5269
  <?php break;
5270
  case 3:
5271
  ?>
5279
  <?php switch ($version) {
5280
  case 0: ?>
5281
  <!-- <a href='https://www.media.net/program?ha=e9Pw4uwo2Uw/5xjjsB3lnYZZWUI+hzRSONzDaYA9EwX+3jg/PJYwFshOFEjop5NH2wRNDfr357ZTY1zlhCk7zw%3D%3D&loc=2' class="clear-link" title="<?php _e ('Looking for AdSense alternative?', 'ad-inserter'); ?>" target="_blank"><img id="ai-media-9" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>contextual-9.gif" /></a>-->
5282
+ <a href="https://www.ezoic.com/?utm_source=ad-inserter&utm_medium=ads&utm_campaign=ad-inserter-ads&utm_term=adinserter&utm_content=ezoic&loc=2" class="clear-link" title="<?php _e ('Looking for AdSense alternative?', 'ad-inserter'); ?>" target="_blank"><img id="ai-ez-3" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ez-3.png" /></a>
5283
  <?php break; case 1: ?>
5284
  <a href="https://adinserter.pro/documentation/black-and-white-lists#geo-targeting" class="clear-link" title="Geotargeting - black/white-list countries" target="_blank"><img id="ai-pro-3" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ai-countries-250.png" /></a>
5285
  <!-- <a href='https://www.media.net/program?ha=e9Pw4uwo2Uw/5xjjsB3lnYZZWUI+hzRSONzDaYA9EwX+3jg/PJYwFshOFEjop5NH2wRNDfr357ZTY1zlhCk7zw%3D%3D&loc=2' class="clear-link" title="<?php _e ('Looking for AdSense alternative?', 'ad-inserter'); ?>" target="_blank"><img id="ai-media-2" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>contextual-2.jpg" /></a>-->
5303
  <?php break;
5304
  case 1:
5305
  ?>
5306
+ <a href="https://www.ezoic.com/?utm_source=ad-inserter&utm_medium=ads&utm_campaign=ad-inserter-ads&utm_term=adinserter&utm_content=ezoic&loc=2" class="clear-link" title="<?php _e ('Looking for AdSense alternative?', 'ad-inserter'); ?>" target="_blank"><img id="ai-ez-5" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ez-5.png" /></a>
5307
  <?php break;
5308
  case 2:
5309
  ?>