Version Description
- Improved compatibility with PHP 8
- Few minor bug fixes, cosmetic changes and code improvements
Download this release
Release Info
Developer | spacetime |
Plugin | Ad Inserter – WordPress Ads Management with AdSense Header Integration |
Version | 2.6.21 |
Comparing to | |
See all releases |
Code changes from version 2.6.20 to 2.6.21
- ad-inserter.php +15 -11
- constants.php +1 -1
- css/ai-settings.css +1 -1
- includes/dst/dst.php +2 -1
- includes/js/ai-lists.js +32 -14
- includes/js/ai-lists.min.js +17 -17
- js/ad-inserter.js +1 -1
- readme.txt +10 -2
ad-inserter.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
/*
|
4 |
Plugin Name: Ad Inserter
|
5 |
-
Version: 2.6.
|
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,10 @@ Requires PHP: 5.6
|
|
17 |
|
18 |
Change Log
|
19 |
|
|
|
|
|
|
|
|
|
20 |
Ad Inserter 2.6.20 - 2021-01-06
|
21 |
- Added support for alt text and lazy loading for banner code generator
|
22 |
- Few minor bug fixes, cosmetic changes and code improvements
|
@@ -7321,7 +7325,7 @@ function ai_settings () {
|
|
7321 |
}
|
7322 |
|
7323 |
|
7324 |
-
function ai_adinserter ($block_parameter
|
7325 |
global $block_object, $ad_inserter_globals, $ai_wp_data, $ai_last_check, $ai_total_hook_php_time, $filter_hooks;
|
7326 |
|
7327 |
$debug_processing = ($ai_wp_data [AI_WP_DEBUGGING] & AI_DEBUG_PROCESSING) != 0;
|
@@ -7417,7 +7421,7 @@ function ai_adinserter ($block_parameter = '', $options = '', &$block) {
|
|
7417 |
$hook_start_time = microtime (true);
|
7418 |
$custom_filter_check = apply_filters ("ai_block_insertion_check", true, $obj->number);
|
7419 |
if ($debug_processing && !$custom_filter_check) {
|
7420 |
-
$filter_hooks []= array ("ai_block_insertion_check", $
|
7421 |
}
|
7422 |
$ai_total_hook_php_time += microtime (true) - $hook_start_time;
|
7423 |
|
@@ -7587,7 +7591,7 @@ function ai_content_hook ($content = '') {
|
|
7587 |
$hook_start_time = microtime (true);
|
7588 |
$custom_filter_check = apply_filters ("ai_block_insertion_check", true, $obj->number);
|
7589 |
if ($debug_processing && !$custom_filter_check) {
|
7590 |
-
$filter_hooks []= array ("ai_block_insertion_check", $
|
7591 |
}
|
7592 |
$ai_total_hook_php_time += microtime (true) - $hook_start_time;
|
7593 |
if (!$custom_filter_check) continue;
|
@@ -7804,7 +7808,7 @@ function ai_excerpt_hook ($content = '') {
|
|
7804 |
$hook_start_time = microtime (true);
|
7805 |
$custom_filter_check = apply_filters ("ai_block_insertion_check", true, $obj->number);
|
7806 |
if ($debug_processing && !$custom_filter_check) {
|
7807 |
-
$filter_hooks []= array ("ai_block_insertion_check", $
|
7808 |
}
|
7809 |
$ai_total_hook_php_time += microtime (true) - $hook_start_time;
|
7810 |
if (!$custom_filter_check) continue;
|
@@ -7984,7 +7988,7 @@ function ai_comment_callback ($comment, $args, $depth) {
|
|
7984 |
$hook_start_time = microtime (true);
|
7985 |
$custom_filter_check = apply_filters ("ai_block_insertion_check", true, $obj->number);
|
7986 |
if ($debug_processing && !$custom_filter_check) {
|
7987 |
-
$filter_hooks []= array ("ai_block_insertion_check", $
|
7988 |
}
|
7989 |
$ai_total_hook_php_time += microtime (true) - $hook_start_time;
|
7990 |
if (!$custom_filter_check) continue;
|
@@ -8116,7 +8120,7 @@ function ai_comment_end_callback ($comment, $args, $depth) {
|
|
8116 |
$hook_start_time = microtime (true);
|
8117 |
$custom_filter_check = apply_filters ("ai_block_insertion_check", true, $obj->number);
|
8118 |
if ($debug_processing && !$custom_filter_check) {
|
8119 |
-
$filter_hooks []= array ("ai_block_insertion_check", $
|
8120 |
}
|
8121 |
$ai_total_hook_php_time += microtime (true) - $hook_start_time;
|
8122 |
if (!$custom_filter_check) continue;
|
@@ -8200,7 +8204,7 @@ function ai_comment_end_callback ($comment, $args, $depth) {
|
|
8200 |
$hook_start_time = microtime (true);
|
8201 |
$custom_filter_check = apply_filters ("ai_block_insertion_check", true, $obj->number);
|
8202 |
if ($debug_processing && !$custom_filter_check) {
|
8203 |
-
$filter_hooks []= array ("ai_block_insertion_check", $
|
8204 |
}
|
8205 |
$ai_total_hook_php_time += microtime (true) - $hook_start_time;
|
8206 |
if (!$custom_filter_check) continue;
|
@@ -8337,7 +8341,7 @@ function ai_custom_hook ($action, $insertion_type, $name, $translated_name = '',
|
|
8337 |
$hook_start_time = microtime (true);
|
8338 |
$custom_filter_check = apply_filters ("ai_block_insertion_check", true, $obj->number);
|
8339 |
if ($debug_processing && !$custom_filter_check) {
|
8340 |
-
$filter_hooks []= array ("ai_block_insertion_check", $
|
8341 |
}
|
8342 |
$ai_total_hook_php_time += microtime (true) - $hook_start_time;
|
8343 |
if (!$custom_filter_check) continue;
|
@@ -8744,7 +8748,7 @@ function ai_process_shortcode (&$block, $atts) {
|
|
8744 |
$custom_filter_check = apply_filters ("ai_block_insertion_check", true, $obj->number);
|
8745 |
$debug_processing = ($ai_wp_data [AI_WP_DEBUGGING] & AI_DEBUG_PROCESSING) != 0;
|
8746 |
if ($debug_processing && !$custom_filter_check) {
|
8747 |
-
$filter_hooks []= array ("ai_block_insertion_check", $
|
8748 |
}
|
8749 |
$ai_total_hook_php_time += microtime (true) - $hook_start_time;
|
8750 |
if (!$custom_filter_check) return "";
|
@@ -8983,7 +8987,7 @@ function ai_widget_draw ($args, $instance, &$block) {
|
|
8983 |
$custom_filter_check = apply_filters ("ai_block_insertion_check", true, $obj->number);
|
8984 |
$debug_processing = ($ai_wp_data [AI_WP_DEBUGGING] & AI_DEBUG_PROCESSING) != 0;
|
8985 |
if ($debug_processing && !$custom_filter_check) {
|
8986 |
-
$filter_hooks []= array ("ai_block_insertion_check", $
|
8987 |
}
|
8988 |
$ai_total_hook_php_time += microtime (true) - $hook_start_time;
|
8989 |
if (!$custom_filter_check) return;
|
2 |
|
3 |
/*
|
4 |
Plugin Name: Ad Inserter
|
5 |
+
Version: 2.6.21
|
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.21 - 2021-01-24
|
21 |
+
- Improved compatibility with PHP 8
|
22 |
+
- Few minor bug fixes, cosmetic changes and code improvements
|
23 |
+
|
24 |
Ad Inserter 2.6.20 - 2021-01-06
|
25 |
- Added support for alt text and lazy loading for banner code generator
|
26 |
- Few minor bug fixes, cosmetic changes and code improvements
|
7325 |
}
|
7326 |
|
7327 |
|
7328 |
+
function ai_adinserter ($block_parameter, $options, &$block) {
|
7329 |
global $block_object, $ad_inserter_globals, $ai_wp_data, $ai_last_check, $ai_total_hook_php_time, $filter_hooks;
|
7330 |
|
7331 |
$debug_processing = ($ai_wp_data [AI_WP_DEBUGGING] & AI_DEBUG_PROCESSING) != 0;
|
7421 |
$hook_start_time = microtime (true);
|
7422 |
$custom_filter_check = apply_filters ("ai_block_insertion_check", true, $obj->number);
|
7423 |
if ($debug_processing && !$custom_filter_check) {
|
7424 |
+
$filter_hooks []= array ("ai_block_insertion_check", $obj->number);
|
7425 |
}
|
7426 |
$ai_total_hook_php_time += microtime (true) - $hook_start_time;
|
7427 |
|
7591 |
$hook_start_time = microtime (true);
|
7592 |
$custom_filter_check = apply_filters ("ai_block_insertion_check", true, $obj->number);
|
7593 |
if ($debug_processing && !$custom_filter_check) {
|
7594 |
+
$filter_hooks []= array ("ai_block_insertion_check", $obj->number);
|
7595 |
}
|
7596 |
$ai_total_hook_php_time += microtime (true) - $hook_start_time;
|
7597 |
if (!$custom_filter_check) continue;
|
7808 |
$hook_start_time = microtime (true);
|
7809 |
$custom_filter_check = apply_filters ("ai_block_insertion_check", true, $obj->number);
|
7810 |
if ($debug_processing && !$custom_filter_check) {
|
7811 |
+
$filter_hooks []= array ("ai_block_insertion_check", $obj->number);
|
7812 |
}
|
7813 |
$ai_total_hook_php_time += microtime (true) - $hook_start_time;
|
7814 |
if (!$custom_filter_check) continue;
|
7988 |
$hook_start_time = microtime (true);
|
7989 |
$custom_filter_check = apply_filters ("ai_block_insertion_check", true, $obj->number);
|
7990 |
if ($debug_processing && !$custom_filter_check) {
|
7991 |
+
$filter_hooks []= array ("ai_block_insertion_check", $obj->number);
|
7992 |
}
|
7993 |
$ai_total_hook_php_time += microtime (true) - $hook_start_time;
|
7994 |
if (!$custom_filter_check) continue;
|
8120 |
$hook_start_time = microtime (true);
|
8121 |
$custom_filter_check = apply_filters ("ai_block_insertion_check", true, $obj->number);
|
8122 |
if ($debug_processing && !$custom_filter_check) {
|
8123 |
+
$filter_hooks []= array ("ai_block_insertion_check", $obj->number);
|
8124 |
}
|
8125 |
$ai_total_hook_php_time += microtime (true) - $hook_start_time;
|
8126 |
if (!$custom_filter_check) continue;
|
8204 |
$hook_start_time = microtime (true);
|
8205 |
$custom_filter_check = apply_filters ("ai_block_insertion_check", true, $obj->number);
|
8206 |
if ($debug_processing && !$custom_filter_check) {
|
8207 |
+
$filter_hooks []= array ("ai_block_insertion_check", $obj->number);
|
8208 |
}
|
8209 |
$ai_total_hook_php_time += microtime (true) - $hook_start_time;
|
8210 |
if (!$custom_filter_check) continue;
|
8341 |
$hook_start_time = microtime (true);
|
8342 |
$custom_filter_check = apply_filters ("ai_block_insertion_check", true, $obj->number);
|
8343 |
if ($debug_processing && !$custom_filter_check) {
|
8344 |
+
$filter_hooks []= array ("ai_block_insertion_check", $obj->number);
|
8345 |
}
|
8346 |
$ai_total_hook_php_time += microtime (true) - $hook_start_time;
|
8347 |
if (!$custom_filter_check) continue;
|
8748 |
$custom_filter_check = apply_filters ("ai_block_insertion_check", true, $obj->number);
|
8749 |
$debug_processing = ($ai_wp_data [AI_WP_DEBUGGING] & AI_DEBUG_PROCESSING) != 0;
|
8750 |
if ($debug_processing && !$custom_filter_check) {
|
8751 |
+
$filter_hooks []= array ("ai_block_insertion_check", $obj->number);
|
8752 |
}
|
8753 |
$ai_total_hook_php_time += microtime (true) - $hook_start_time;
|
8754 |
if (!$custom_filter_check) return "";
|
8987 |
$custom_filter_check = apply_filters ("ai_block_insertion_check", true, $obj->number);
|
8988 |
$debug_processing = ($ai_wp_data [AI_WP_DEBUGGING] & AI_DEBUG_PROCESSING) != 0;
|
8989 |
if ($debug_processing && !$custom_filter_check) {
|
8990 |
+
$filter_hooks []= array ("ai_block_insertion_check", $obj->number);
|
8991 |
}
|
8992 |
$ai_total_hook_php_time += microtime (true) - $hook_start_time;
|
8993 |
if (!$custom_filter_check) return;
|
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.
|
35 |
|
36 |
if (!defined ('AD_INSERTER_PLUGIN_BASENAME'))
|
37 |
define ('AD_INSERTER_PLUGIN_BASENAME', plugin_basename (__FILE__));
|
31 |
define ('AD_INSERTER_NAME', 'Ad Inserter');
|
32 |
|
33 |
if (!defined( 'AD_INSERTER_VERSION'))
|
34 |
+
define ('AD_INSERTER_VERSION', '2.6.21');
|
35 |
|
36 |
if (!defined ('AD_INSERTER_PLUGIN_BASENAME'))
|
37 |
define ('AD_INSERTER_PLUGIN_BASENAME', plugin_basename (__FILE__));
|
css/ai-settings.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
#ai-data {
|
2 |
-
font-family: "2.6.
|
3 |
}
|
4 |
|
5 |
#blocked-warning {
|
1 |
#ai-data {
|
2 |
+
font-family: "2.6.21"; /* Used for version number of the file */
|
3 |
}
|
4 |
|
5 |
#blocked-warning {
|
includes/dst/dst.php
CHANGED
@@ -175,7 +175,8 @@ class DST_Client {
|
|
175 |
public function __construct ($_settings = array ()) {
|
176 |
|
177 |
if (!isset ($_settings ['main_file'])) {
|
178 |
-
$debug_backtrace = debug_backtrace (false, 1);
|
|
|
179 |
$_settings ['main_file'] = $debug_backtrace [0]['file'];
|
180 |
}
|
181 |
|
175 |
public function __construct ($_settings = array ()) {
|
176 |
|
177 |
if (!isset ($_settings ['main_file'])) {
|
178 |
+
// $debug_backtrace = debug_backtrace (false, 1);
|
179 |
+
$debug_backtrace = debug_backtrace (0, 1);
|
180 |
$_settings ['main_file'] = $debug_backtrace [0]['file'];
|
181 |
}
|
182 |
|
includes/js/ai-lists.js
CHANGED
@@ -505,14 +505,32 @@ jQuery (function ($) {
|
|
505 |
check_and_call__tcfapi (false)
|
506 |
} else {
|
507 |
if (typeof ai_tcData_retrying == 'undefined') {
|
508 |
-
ai_tcData_retrying = true;
|
509 |
|
510 |
-
if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2: __tcfapi not found, waiting...");
|
511 |
|
512 |
setTimeout (function() {
|
513 |
if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2: checking again for __tcfapi");
|
514 |
-
|
515 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
516 |
} else {
|
517 |
if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2: __tcfapi still waiting...");
|
518 |
}
|
@@ -791,21 +809,21 @@ jQuery (function ($) {
|
|
791 |
|
792 |
setTimeout (function() {
|
793 |
ai_install_tcf_callback_useractioncomplete ();
|
794 |
-
}, 50);
|
795 |
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
|
800 |
-
|
801 |
-
|
802 |
|
803 |
-
|
804 |
-
|
805 |
-
|
|
|
806 |
}
|
807 |
}
|
808 |
-
}
|
809 |
|
810 |
jQuery("#ai-iab-tcf-bar").click (function () {
|
811 |
AiCookies.remove ('euconsent-v2', {path: "/", domain: '.' + window.location.hostname});
|
505 |
check_and_call__tcfapi (false)
|
506 |
} else {
|
507 |
if (typeof ai_tcData_retrying == 'undefined') {
|
508 |
+
ai_tcData_retrying = true;
|
509 |
|
510 |
+
if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2: __tcfapi not found 1, waiting...");
|
511 |
|
512 |
setTimeout (function() {
|
513 |
if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2: checking again for __tcfapi");
|
514 |
+
|
515 |
+
if (typeof __tcfapi == 'function') {
|
516 |
+
check_and_call__tcfapi (false);
|
517 |
+
} else {
|
518 |
+
if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2: __tcfapi not found 2, waiting...");
|
519 |
+
|
520 |
+
setTimeout (function() {
|
521 |
+
if (typeof __tcfapi == 'function') {
|
522 |
+
check_and_call__tcfapi (false);
|
523 |
+
} else {
|
524 |
+
if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2: __tcfapi not found 3, waiting...");
|
525 |
+
|
526 |
+
setTimeout (function() {
|
527 |
+
check_and_call__tcfapi (true);
|
528 |
+
}, 3000);
|
529 |
+
}
|
530 |
+
|
531 |
+
}, 1000);
|
532 |
+
}
|
533 |
+
}, 600);
|
534 |
} else {
|
535 |
if (ai_debug) console.log ("AI LISTS COOKIE tcf-v2: __tcfapi still waiting...");
|
536 |
}
|
809 |
|
810 |
setTimeout (function() {
|
811 |
ai_install_tcf_callback_useractioncomplete ();
|
|
|
812 |
|
813 |
+
if (typeof ai_load_blocks == 'function') {
|
814 |
+
// https://adinserter.pro/faq/gdpr-compliance-cookies-consent#manual-loading
|
815 |
+
jQuery(document).on ("cmplzEnableScripts", ai_cmplzEnableScripts);
|
816 |
|
817 |
+
// Complianz Privacy Suite
|
818 |
+
jQuery(document).on ("cmplz_event_marketing", ai_cmplzEnableScripts);
|
819 |
|
820 |
+
function ai_cmplzEnableScripts (consentData) {
|
821 |
+
if (consentData.consentLevel === 'all'){
|
822 |
+
ai_load_blocks ();
|
823 |
+
}
|
824 |
}
|
825 |
}
|
826 |
+
}, 50);
|
827 |
|
828 |
jQuery("#ai-iab-tcf-bar").click (function () {
|
829 |
AiCookies.remove ('euconsent-v2', {path: "/", domain: '.' + window.location.hostname});
|
includes/js/ai-lists.min.js
CHANGED
@@ -1,22 +1,22 @@
|
|
1 |
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(a){return a.raw=a};$jscomp.createTemplateTagFirstArgWithRaw=function(a,k){a.raw=k;return a};$jscomp.arrayIteratorImpl=function(a){var k=0;return function(){return k<a.length?{done:!1,value:a[k++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.makeIterator=function(a){var k="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return k?k.call(a):$jscomp.arrayIterator(a)};
|
2 |
-
jQuery(function(a){function k(e){e=e.match(F);return null!=e&&1<e.length&&"string"===typeof e[1]&&0<e[1].length?e[1].toLowerCase():null}function A(e){try{var h=Date.parse(e);isNaN(h)&&(h=null)}catch(
|
3 |
"function"==typeof __tcfapi&&"function"==typeof ai_load_blocks&&"undefined"==typeof ai_iab_tcf_callback_installed&&(__tcfapi("addEventListener",2,function(e,h){h&&"useractioncomplete"===e.eventStatus&&(ai_tcData=e,ai_load_blocks(),jQuery("#ai-iab-tcf-status").text("DATA LOADED"),jQuery("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"))}),ai_iab_tcf_callback_installed=!0)}Array.prototype.includes||(Array.prototype.includes=function(e){return!!~this.indexOf(e)});var F=/:\/\/(.[^/:]+)/i;
|
4 |
ai_process_lists=function(e){function h(d,b,g){if(0==d.length){if("!@!"==g)return!0;b!=g&&("true"==g.toLowerCase()?g=!0:"false"==g.toLowerCase()&&(g=!1));return b==g}if("object"!=typeof b&&"array"!=typeof b)return!1;var f=d[0];d=d.slice(1);if("*"==f)for(b=$jscomp.makeIterator(Object.entries(b)),f=b.next();!f.done;f=b.next()){if(f=$jscomp.makeIterator(f.value),f.next(),f=f.next().value,h(d,f,g))return!0}else if(f in b)return h(d,b[f],g);return!1}function w(d,b,g){if("object"!=typeof d||-1==b.indexOf("["))return!1;
|
5 |
-
b=b.replace(/]| /gi,"").split("[");return h(b,d,g)}function
|
6 |
-
10)):"cmpuishown"==d.eventStatus&&(ai_cmpuishown=!0,a("#ai-iab-tcf-status").text("CMP UI SHOWN"),a("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"))):(a("#ai-iab-tcf-status").text("__tcfapi getTCData failed"),a("#ai-iab-tcf-bar").removeClass("status-ok").addClass("status-error"))}))}function
|
7 |
-
d&&(a("#ai-iab-tcf-bar").addClass("status-error").removeClass("status-ok"),a("#ai-iab-tcf-status").text("MISSING: __tcfapi function not found"))}e=null==e?a("div.ai-list-data, meta.ai-list-data"):e.filter(".ai-list-data");if(e.length){e.removeClass("ai-list-data");var G=document.cookie.split(";");G.forEach(function(d,b){G[b]=d.trim()});var Q=getAllUrlParams(window.location.search);if(null!=Q.referrer)var r=Q.referrer;else r=document.referrer,""!=r&&(r=k(r));var
|
8 |
-
if("undefined"!==typeof MobileDetect)var R=new MobileDetect(
|
9 |
-
1)){if(c=c.substr(0,c.length-1),0==r.indexOf(c))return l=!0,!1}else if("#"==c){if(""==r)return l=!0,!1}else if(c==r)return l=!0,!1});switch(f){case "B":l&&(b=!1);break;case "W":l||(b=!1)}}if(b&&(g=a(this).attr("client-list"),"undefined"!=typeof g&&"undefined"!==typeof R))switch(g=b64d(g).split(","),f=a(this).attr("client-list-type"),l=!1,a.each(g,function(t,c){if(""==c)return!0;if("*"==c.charAt(0))if("*"==c.charAt(c.length-1)){if(c=c.substr(1,c.length-2).toLowerCase(),-1!=
|
10 |
-
!1}else{if(c=c.substr(1).toLowerCase(),
|
11 |
-
decodeURIComponent(t[1])}S[t[0]]=c});var x=!1,
|
12 |
-
(a("#ai-iab-tcf-bar").addClass("status-ok"),p=p.replace(/]| /gi,"").split("["),p.shift(),x=(p=h(p,ai_tcData,z))?y:!y):(
|
13 |
-
(b=!1)}a(this).hasClass("ai-list-manual")&&(b?(
|
14 |
-
f=!1;if(b){u=a(this).attr("scheduling-start");var B=a(this).attr("scheduling-end"),C=a(this).attr("scheduling-days");if("undefined"!=typeof u&&"undefined"!=typeof B&&"undefined"!=typeof C){f=!0;var
|
15 |
-
|
16 |
-
q.find(".ai-debug-name.ai-scheduling-status").text(ai_front.fallback+"="+
|
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",
|
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()
|
19 |
-
h)}jQuery("#ai-iab-tcf-bar").click(function(){AiCookies.remove("euconsent-v2",{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",
|
20 |
-
{path:"/",domain:"."+window.location.hostname});AiCookies.remove("complianz_consent_status",{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(".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)}
|
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 A=0;A<k.length;A++){var n=k[A].split("="),F=void 0,e=n[0].replace(/\[\d*\]/,function(h){F=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 F?a[e].push(n):a[e][F]=n):a[e]=n}}return a};
|
1 |
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(a){return a.raw=a};$jscomp.createTemplateTagFirstArgWithRaw=function(a,k){a.raw=k;return a};$jscomp.arrayIteratorImpl=function(a){var k=0;return function(){return k<a.length?{done:!1,value:a[k++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.makeIterator=function(a){var k="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return k?k.call(a):$jscomp.arrayIterator(a)};
|
2 |
+
jQuery(function(a){function k(e){e=e.match(F);return null!=e&&1<e.length&&"string"===typeof e[1]&&0<e[1].length?e[1].toLowerCase():null}function A(e){try{var h=Date.parse(e);isNaN(h)&&(h=null)}catch(K){h=null}if(null==h&&e.includes(" ")){e=e.split(" ");try{h=Date.parse(e[0]);if(e[1].includes(":")){var w=e[1].split(":");h+=1E3*(3600*parseInt(w[0])+60*parseInt(w[1])+parseInt(w[2]))}isNaN(h)&&(h=null)}catch(K){h=null}}return h}function n(){(jQuery("#ai-iab-tcf-bar").length||jQuery(".ai-list-manual").length)&&
|
3 |
"function"==typeof __tcfapi&&"function"==typeof ai_load_blocks&&"undefined"==typeof ai_iab_tcf_callback_installed&&(__tcfapi("addEventListener",2,function(e,h){h&&"useractioncomplete"===e.eventStatus&&(ai_tcData=e,ai_load_blocks(),jQuery("#ai-iab-tcf-status").text("DATA LOADED"),jQuery("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"))}),ai_iab_tcf_callback_installed=!0)}Array.prototype.includes||(Array.prototype.includes=function(e){return!!~this.indexOf(e)});var F=/:\/\/(.[^/:]+)/i;
|
4 |
ai_process_lists=function(e){function h(d,b,g){if(0==d.length){if("!@!"==g)return!0;b!=g&&("true"==g.toLowerCase()?g=!0:"false"==g.toLowerCase()&&(g=!1));return b==g}if("object"!=typeof b&&"array"!=typeof b)return!1;var f=d[0];d=d.slice(1);if("*"==f)for(b=$jscomp.makeIterator(Object.entries(b)),f=b.next();!f.done;f=b.next()){if(f=$jscomp.makeIterator(f.value),f.next(),f=f.next().value,h(d,f,g))return!0}else if(f in b)return h(d,b[f],g);return!1}function w(d,b,g){if("object"!=typeof d||-1==b.indexOf("["))return!1;
|
5 |
+
b=b.replace(/]| /gi,"").split("[");return h(b,d,g)}function K(){"function"==typeof __tcfapi&&(a("#ai-iab-tcf-status").text("DETECTED"),__tcfapi("getTCData",2,function(d,b){b?(a("#ai-iab-tcf-bar").addClass("status-ok"),"tcloaded"==d.eventStatus||"useractioncomplete"==d.eventStatus?(ai_tcData=d,d.gdprApplies?a("#ai-iab-tcf-status").text("DATA LOADED"):jQuery("#ai-iab-tcf-status").text("GDPR DOES NOT APPLY"),a("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"),setTimeout(function(){ai_process_lists()},
|
6 |
+
10)):"cmpuishown"==d.eventStatus&&(ai_cmpuishown=!0,a("#ai-iab-tcf-status").text("CMP UI SHOWN"),a("#ai-iab-tcf-bar").addClass("status-ok").removeClass("status-error"))):(a("#ai-iab-tcf-status").text("__tcfapi getTCData failed"),a("#ai-iab-tcf-bar").removeClass("status-ok").addClass("status-error"))}))}function H(d){"function"==typeof __tcfapi?("undefined"==typeof ai_iab_tcf_callback_installed&&n(),"undefined"==typeof ai_tcData_requested&&(ai_tcData_requested=!0,K(),url_parameters_need_tcData=!0)):
|
7 |
+
d&&(a("#ai-iab-tcf-bar").addClass("status-error").removeClass("status-ok"),a("#ai-iab-tcf-status").text("MISSING: __tcfapi function not found"))}e=null==e?a("div.ai-list-data, meta.ai-list-data"):e.filter(".ai-list-data");if(e.length){e.removeClass("ai-list-data");var G=document.cookie.split(";");G.forEach(function(d,b){G[b]=d.trim()});var Q=getAllUrlParams(window.location.search);if(null!=Q.referrer)var r=Q.referrer;else r=document.referrer,""!=r&&(r=k(r));var L=window.navigator.userAgent,M=L.toLowerCase();
|
8 |
+
if("undefined"!==typeof MobileDetect)var R=new MobileDetect(L);e.each(function(){var d=a(this).closest("div.AI_FUNCT_GET_BLOCK_CLASS_NAME"),b=!0,g=a(this).attr("referer-list");if("undefined"!=typeof g){g=b64d(g).split(",");var f=a(this).attr("referer-list-type"),l=!1;a.each(g,function(t,c){if(""==c)return!0;if("*"==c.charAt(0))if("*"==c.charAt(c.length-1)){if(c=c.substr(1,c.length-2),-1!=r.indexOf(c))return l=!0,!1}else{if(c=c.substr(1),r.substr(-c.length)==c)return l=!0,!1}else if("*"==c.charAt(c.length-
|
9 |
+
1)){if(c=c.substr(0,c.length-1),0==r.indexOf(c))return l=!0,!1}else if("#"==c){if(""==r)return l=!0,!1}else if(c==r)return l=!0,!1});switch(f){case "B":l&&(b=!1);break;case "W":l||(b=!1)}}if(b&&(g=a(this).attr("client-list"),"undefined"!=typeof g&&"undefined"!==typeof R))switch(g=b64d(g).split(","),f=a(this).attr("client-list-type"),l=!1,a.each(g,function(t,c){if(""==c)return!0;if("*"==c.charAt(0))if("*"==c.charAt(c.length-1)){if(c=c.substr(1,c.length-2).toLowerCase(),-1!=M.indexOf(c))return l=!0,
|
10 |
+
!1}else{if(c=c.substr(1).toLowerCase(),M.substr(-c.length)==c)return l=!0,!1}else if("*"==c.charAt(c.length-1)){if(c=c.substr(0,c.length-1).toLowerCase(),0==M.indexOf(c))return l=!0,!1}else if(R.is(c))return l=!0,!1}),f){case "B":l&&(b=!1);break;case "W":l||(b=!1)}var N=g=!1;if(b&&(f=a(this).attr("parameter-list"),"undefined"!=typeof f)){f=b64d(f).split(",");var u=a(this).attr("parameter-list-type"),S=[];G.forEach(function(t){t=t.split("=");try{var c=JSON.parse(decodeURIComponent(t[1]))}catch(T){c=
|
11 |
+
decodeURIComponent(t[1])}S[t[0]]=c});var x=!1,I=a(this);a.each(f,function(t,c){var T=c.split("&&");a.each(T,function(X,m){var y=!0;m=m.trim();"!!"==m.substring(0,2)&&(y=!1,m=m.substring(2));var p=m,z="!@!",U=-1!=m.indexOf("["),V=(0==m.indexOf("tcf-v2")||0==m.indexOf("euconsent-v2"))&&-1!=m.indexOf("[");-1!=m.indexOf("=")&&(z=m.split("="),p=z[0],z=z[1],U=-1!=p.indexOf("["),V=(0==p.indexOf("tcf-v2")||0==p.indexOf("euconsent-v2"))&&-1!=p.indexOf("["));if(V)a("#ai-iab-tcf-bar").show(),"object"==typeof ai_tcData?
|
12 |
+
(a("#ai-iab-tcf-bar").addClass("status-ok"),p=p.replace(/]| /gi,"").split("["),p.shift(),x=(p=h(p,ai_tcData,z))?y:!y):(I.addClass("ai-list-data"),N=!0,"function"==typeof __tcfapi?H(!1):"undefined"==typeof ai_tcData_retrying&&(ai_tcData_retrying=!0,setTimeout(function(){"function"==typeof __tcfapi?H(!1):setTimeout(function(){"function"==typeof __tcfapi?H(!1):setTimeout(function(){H(!0)},3E3)},1E3)},600)));else if(U)x=(p=w(S,p,z))?y:!y;else{var O=!1;"!@!"==z?G.every(function(W){return W.split("=")[0]==
|
13 |
+
m?(O=!0,!1):!0}):O=-1!=G.indexOf(m);x=O?y:!y}if(!x)return!1});if(x)return!1});switch(u){case "B":x&&(b=!1);break;case "W":x||(b=!1)}a(this).hasClass("ai-list-manual")&&(b?(I.removeClass("ai-list-data"),I.removeClass("ai-list-manual")):(g=!0,I.addClass("ai-list-data")));if(!g&&!N&&(f=a(this).data("debug-info"),"undefined"!=typeof f&&(f=a("."+f),0!=f.length))){var q=f.parent();q.hasClass("ai-debug-info")&&q.remove()}}q=a(this).prevAll(".ai-debug-bar.ai-debug-lists");f=""==r?"#":r;q.find(".ai-debug-name.ai-list-info").text(f).attr("title",
|
14 |
+
L);q.find(".ai-debug-name.ai-list-status").text(b?ai_front.visible:ai_front.hidden);f=!1;if(b){u=a(this).attr("scheduling-start");var B=a(this).attr("scheduling-end"),C=a(this).attr("scheduling-days");if("undefined"!=typeof u&&"undefined"!=typeof B&&"undefined"!=typeof C){f=!0;var P=parseInt(a(this).attr("scheduling-fallback")),v=parseInt(a(this).attr("gmt"));u=A(b64d(u))+v;B=A(b64d(B))+v;C=b64d(C).split(",");q=a(this).attr("scheduling-type");var D=(new Date).getTime()+v,J=new Date(D),E=J.getDay();
|
15 |
+
0==E?E=6:E--;v=D>=u&&D<B&&C.includes(E.toString());switch(q){case "B":v=!v}v||(b=!1);J=J.toISOString().split(".")[0].replace("T"," ");q=a(this).prevAll(".ai-debug-bar.ai-debug-scheduling");q.find(".ai-debug-name.ai-scheduling-info").text(J+" "+E+" current_time:"+D.toString()+" start_date:"+u.toString()+" ="+(D>=u).toString()+" end_date:"+B.toString()+" =:"+(D<B).toString()+" days:"+C.toString()+" =:"+C.includes(E.toString()).toString());q.find(".ai-debug-name.ai-scheduling-status").text(b?ai_front.visible:
|
16 |
+
ai_front.hidden);b||0==P||(q.removeClass("ai-debug-scheduling").addClass("ai-debug-fallback"),q.find(".ai-debug-name.ai-scheduling-status").text(ai_front.fallback+"="+P))}}if(g||N)return!0;a(this).css({visibility:"",position:"",width:"",height:"","z-index":""});b?(d.css({visibility:""}),d.hasClass("ai-remove-position")&&d.css({position:""}),"undefined"!=typeof a(this).data("code")&&(b=b64d(a(this).data("code")),0!=a(this).closest("head").length?(a(this).after(b),a(this).remove()):a(this).append(b),
|
17 |
+
ai_process_element(this))):f&&!v&&0!=P?(d.css({visibility:""}),d.hasClass("ai-remove-position")&&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",
|
18 |
+
b))):(a(this).hide(),d.find(".ai-debug-block").length||d.hide(),d.removeAttr("data-ai").removeClass("ai-track"),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();if("function"==typeof ai_load_blocks){var h=
|
19 |
+
function(w){"all"===w.consentLevel&&ai_load_blocks()};jQuery(document).on("cmplzEnableScripts",h);jQuery(document).on("cmplz_event_marketing",h)}},50);jQuery("#ai-iab-tcf-bar").click(function(){AiCookies.remove("euconsent-v2",{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",
|
20 |
+
{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",{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(".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)}
|
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 A=0;A<k.length;A++){var n=k[A].split("="),F=void 0,e=n[0].replace(/\[\d*\]/,function(h){F=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 F?a[e].push(n):a[e][F]=n):a[e]=n}}return a};
|
js/ad-inserter.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
var javascript_version = "2.6.
|
2 |
var ignore_key = true;
|
3 |
var start = 1;
|
4 |
var end = 16;
|
1 |
+
var javascript_version = "2.6.21";
|
2 |
var ignore_key = true;
|
3 |
var start = 1;
|
4 |
var end = 16;
|
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.6
|
8 |
Requires PHP: 5.6
|
9 |
-
Stable tag: 2.6.
|
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
|
@@ -15,7 +15,7 @@ Manage Google AdSense, Media.net, Amazon banners, ads.txt, ad rotation, sticky w
|
|
15 |
|
16 |
Ad management plugin with many advanced advertising features to insert ad codes at optimal positions.
|
17 |
|
18 |
-
Supports all kinds of ads including **Google AdSense**, **Google Ad Manager** (DFP - DoubleClick for publishers), contextual **Amazon Native Shopping Ads**, **Media.net** and **rotating banners.**
|
19 |
|
20 |
This plugin is more than AdSense plugin or plugin for ads. It provides many advanced options to insert opt-in forms, header scripts, Javascript, CSS, HTML, PHP, analytics, tracking or advert code anywhere on the page.
|
21 |
|
@@ -335,6 +335,10 @@ If you are not happy to reveal this information and you have opted in, simply di
|
|
335 |
|
336 |
== Changelog ==
|
337 |
|
|
|
|
|
|
|
|
|
338 |
= 2.6.20 =
|
339 |
- Added support for alt text and lazy loading for banner code generator
|
340 |
- Few minor bug fixes, cosmetic changes and code improvements
|
@@ -490,6 +494,10 @@ For the changelog of earlier versions, please refer to the separate changelog.tx
|
|
490 |
|
491 |
== Upgrade Notice ==
|
492 |
|
|
|
|
|
|
|
|
|
493 |
= 2.6.20 =
|
494 |
Added support for alt text and lazy loading for banner code generator;
|
495 |
Few minor bug fixes, cosmetic changes and code improvements
|
6 |
Requires at least: 4.6
|
7 |
Tested up to: 5.6
|
8 |
Requires PHP: 5.6
|
9 |
+
Stable tag: 2.6.21
|
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
|
15 |
|
16 |
Ad management plugin with many advanced advertising features to insert ad codes at optimal positions.
|
17 |
|
18 |
+
Supports all kinds of ads including **Google AdSense**, **Google Ad Manager** (DFP - DoubleClick for publishers), contextual **Amazon Native Shopping Ads**, **Media.net** , **Infolinks** and **rotating banners.**
|
19 |
|
20 |
This plugin is more than AdSense plugin or plugin for ads. It provides many advanced options to insert opt-in forms, header scripts, Javascript, CSS, HTML, PHP, analytics, tracking or advert code anywhere on the page.
|
21 |
|
335 |
|
336 |
== Changelog ==
|
337 |
|
338 |
+
= 2.6.21 =
|
339 |
+
- Improved compatibility with PHP 8
|
340 |
+
- Few minor bug fixes, cosmetic changes and code improvements
|
341 |
+
|
342 |
= 2.6.20 =
|
343 |
- Added support for alt text and lazy loading for banner code generator
|
344 |
- Few minor bug fixes, cosmetic changes and code improvements
|
494 |
|
495 |
== Upgrade Notice ==
|
496 |
|
497 |
+
= 2.6.21 =
|
498 |
+
Improved compatibility with PHP 8;
|
499 |
+
Few minor bug fixes, cosmetic changes and code improvements
|
500 |
+
|
501 |
= 2.6.20 =
|
502 |
Added support for alt text and lazy loading for banner code generator;
|
503 |
Few minor bug fixes, cosmetic changes and code improvements
|