Version Description
- 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.7.13 |
Comparing to | |
See all releases |
Code changes from version 2.7.12 to 2.7.13
- ad-inserter.php +16 -4
- class.php +44 -25
- constants.php +1 -1
- css/ai-settings.css +1 -1
- images/ap-1.png +0 -0
- images/ap-2.png +0 -0
- includes/ace/mode-ai-html.js +1 -1
- includes/ace/mode-ai-php.js +1 -1
- includes/js/ai-lists.js +1 -1
- includes/js/ai-lists.min.js +3 -3
- includes/preview.php +1 -1
- js/ad-inserter.js +1 -1
- js/ad-inserter.min.js +1 -1
- readme.txt +7 -1
- settings.php +9 -9
ad-inserter.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
/*
|
4 |
Plugin Name: Ad Inserter
|
5 |
-
Version: 2.7.
|
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,9 @@ Requires PHP: 5.6
|
|
17 |
|
18 |
Change Log
|
19 |
|
|
|
|
|
|
|
20 |
Ad Inserter 2.7.12 - 2022-03-09
|
21 |
- Security fix for settings page save url
|
22 |
- Added support to disable ad blocking detection for specific devices
|
@@ -812,6 +815,7 @@ function ai_process_head_codes ($head) {
|
|
812 |
return ($head);
|
813 |
}
|
814 |
|
|
|
815 |
function ai_buffering_start_hook () {
|
816 |
global $ai_wp_data;
|
817 |
|
@@ -4718,13 +4722,17 @@ function ai_write_debug_info ($write_processing_log = false) {
|
|
4718 |
|
4719 |
echo "\n";
|
4720 |
|
4721 |
-
echo '
|
4722 |
echo 'DISALLOW_FILE_EDIT: ', defined ('DISALLOW_FILE_EDIT') && DISALLOW_FILE_EDIT ? 'SET' : "NO", "\n";
|
4723 |
echo 'DISALLOW_FILE_MODS: ', defined ('DISALLOW_FILE_MODS') && DISALLOW_FILE_MODS ? 'SET' : "NO", "\n";
|
4724 |
echo 'DISALLOW_UNFILTERED_HTML:', defined ('DISALLOW_UNFILTERED_HTML') && DISALLOW_UNFILTERED_HTML ? 'SET' : "NO", "\n";
|
4725 |
|
4726 |
echo "\n";
|
4727 |
|
|
|
|
|
|
|
|
|
4728 |
echo "MULTISITE: ", is_multisite() ? "YES" : "NO", "\n";
|
4729 |
if (is_multisite()) {
|
4730 |
echo "MAIN SITE: ", is_main_site () ? "YES" : "NO", "\n";
|
@@ -7031,7 +7039,7 @@ a.ai-debug-center {text-align: center; cursor: default; font-size: 10px; text-de
|
|
7031 |
.ai-debug-ad-overlay {position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: #8f8; opacity: 0.6; z-index: 999999990}
|
7032 |
|
7033 |
.ai-debug-block ins.adsbygoogle[data-ad-status="unfilled"] .ai-debug-ad-overlay {display: none;}
|
7034 |
-
.ai-debug-block ins.adsbygoogle[data-ad-status="unfilled"] {background: url(
|
7035 |
|
7036 |
.ai-auto-ads {background-color: #84f;}
|
7037 |
.ai-no-slot {background-color: #48f;}
|
@@ -11292,6 +11300,10 @@ function replace_ai_tags ($content, $general_tag = '') {
|
|
11292 |
return $ad_data;
|
11293 |
}
|
11294 |
|
|
|
|
|
|
|
|
|
11295 |
|
11296 |
// ===========================================================================================
|
11297 |
|
@@ -11410,7 +11422,7 @@ $ai_wp_data [AI_FOOTER_INLINE_SCRIPTS] = false;
|
|
11410 |
$ai_wp_data [AI_W3TC_DEBUGGING] = false;
|
11411 |
$ai_wp_data [AI_CLIENT_SIDE_FILTER_CHECKS] = false;
|
11412 |
$ai_wp_data [AI_PARALLAX] = false;
|
11413 |
-
$ai_wp_data [AI_PHP_PROCESSING] =
|
11414 |
$ai_wp_data [AI_UNFILTERED_HTML] = !(defined ('DISALLOW_UNFILTERED_HTML') && DISALLOW_UNFILTERED_HTML);
|
11415 |
|
11416 |
|
2 |
|
3 |
/*
|
4 |
Plugin Name: Ad Inserter
|
5 |
+
Version: 2.7.13
|
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.7.13 - 2022-04-02
|
21 |
+
- Few minor bug fixes, cosmetic changes and code improvements
|
22 |
+
|
23 |
Ad Inserter 2.7.12 - 2022-03-09
|
24 |
- Security fix for settings page save url
|
25 |
- Added support to disable ad blocking detection for specific devices
|
815 |
return ($head);
|
816 |
}
|
817 |
|
818 |
+
// Not used
|
819 |
function ai_buffering_start_hook () {
|
820 |
global $ai_wp_data;
|
821 |
|
4722 |
|
4723 |
echo "\n";
|
4724 |
|
4725 |
+
echo 'AI_NO_PHP_PROCESSING: ', defined ('AI_NO_PHP_PROCESSING') ? 'SET' : "NO", "\n";
|
4726 |
echo 'DISALLOW_FILE_EDIT: ', defined ('DISALLOW_FILE_EDIT') && DISALLOW_FILE_EDIT ? 'SET' : "NO", "\n";
|
4727 |
echo 'DISALLOW_FILE_MODS: ', defined ('DISALLOW_FILE_MODS') && DISALLOW_FILE_MODS ? 'SET' : "NO", "\n";
|
4728 |
echo 'DISALLOW_UNFILTERED_HTML:', defined ('DISALLOW_UNFILTERED_HTML') && DISALLOW_UNFILTERED_HTML ? 'SET' : "NO", "\n";
|
4729 |
|
4730 |
echo "\n";
|
4731 |
|
4732 |
+
echo 'W3TC_DYNAMIC_SECURITY: ', defined ('W3TC_DYNAMIC_SECURITY') ? 'SET' : "NO", "\n";
|
4733 |
+
|
4734 |
+
echo "\n";
|
4735 |
+
|
4736 |
echo "MULTISITE: ", is_multisite() ? "YES" : "NO", "\n";
|
4737 |
if (is_multisite()) {
|
4738 |
echo "MAIN SITE: ", is_main_site () ? "YES" : "NO", "\n";
|
7039 |
.ai-debug-ad-overlay {position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: #8f8; opacity: 0.6; z-index: 999999990}
|
7040 |
|
7041 |
.ai-debug-block ins.adsbygoogle[data-ad-status="unfilled"] .ai-debug-ad-overlay {display: none;}
|
7042 |
+
.ai-debug-block ins.adsbygoogle[data-ad-status="unfilled"] {background: url(https://via.placeholder.com/800x800/aaffaa/000000.png?text=NO%20AD%20SERVED); background-size: cover; background-repeat: no-repeat; background-position: center;}
|
7043 |
|
7044 |
.ai-auto-ads {background-color: #84f;}
|
7045 |
.ai-no-slot {background-color: #48f;}
|
11300 |
return $ad_data;
|
11301 |
}
|
11302 |
|
11303 |
+
function ai_php_enabled () {
|
11304 |
+
$php_enabled = !(defined ('DISALLOW_FILE_EDIT') && DISALLOW_FILE_EDIT) && !(defined ('DISALLOW_FILE_MODS') && DISALLOW_FILE_MODS);
|
11305 |
+
return apply_filters ('ai_php_enabled', $php_enabled);
|
11306 |
+
}
|
11307 |
|
11308 |
// ===========================================================================================
|
11309 |
|
11422 |
$ai_wp_data [AI_W3TC_DEBUGGING] = false;
|
11423 |
$ai_wp_data [AI_CLIENT_SIDE_FILTER_CHECKS] = false;
|
11424 |
$ai_wp_data [AI_PARALLAX] = false;
|
11425 |
+
$ai_wp_data [AI_PHP_PROCESSING] = ai_php_enabled ();
|
11426 |
$ai_wp_data [AI_UNFILTERED_HTML] = !(defined ('DISALLOW_UNFILTERED_HTML') && DISALLOW_UNFILTERED_HTML);
|
11427 |
|
11428 |
|
class.php
CHANGED
@@ -605,14 +605,24 @@ abstract class ai_BaseCodeBlock {
|
|
605 |
$ai_total_hook_php_time += microtime (true) - $hook_start_time;
|
606 |
|
607 |
$php_enabled = $ai_wp_data [AI_PHP_PROCESSING];
|
608 |
-
if (
|
609 |
$php_enabled = false;
|
610 |
}
|
611 |
|
612 |
if ($php_enabled && $obj->get_process_php () && !get_disable_php_processing () && (!is_multisite() || is_main_site () || multisite_php_processing ()) && !defined ('AI_NO_PHP_PROCESSING')) {
|
613 |
$global_name = 'GENERATED_CODE';
|
614 |
|
615 |
-
if (isset ($obj->wp_options [$global_name]) && (!isset ($ai_wp_data [AI_BLOCK_PHP_CODE_CACHING][$this->number]) || $ai_wp_data [AI_BLOCK_PHP_CODE_CACHING][$this->number]))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
616 |
|
617 |
$start_time = microtime (true);
|
618 |
|
@@ -2721,10 +2731,6 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
2721 |
}
|
2722 |
|
2723 |
return (
|
2724 |
-
// '<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' -->' . $code .
|
2725 |
-
// ' if (!isset ($ai_enabled) || $ai_enabled) echo $ai_code; else {echo ai_extract_debug_bar ($ai_code);}' .
|
2726 |
-
// '<!-- /mfunc '. W3TC_DYNAMIC_SECURITY.' -->'
|
2727 |
-
|
2728 |
'<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' ' . $code . ' if (!isset ($ai_enabled) || $ai_enabled) echo $ai_code; else {echo ai_extract_debug_bar ($ai_code);}' . ' --><!-- /mfunc '. W3TC_DYNAMIC_SECURITY.' -->'
|
2729 |
);
|
2730 |
}
|
@@ -2749,9 +2755,6 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
2749 |
$this->w3tc_debug []= ' REGENERATE W3TC';
|
2750 |
}
|
2751 |
|
2752 |
-
// preg_match_all ('#<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' -->(.*?)<!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->#', $code, $php_codes);
|
2753 |
-
// $html_codes = explode ('[?#?]', preg_replace ('#<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' -->(.*?)<!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->#', '[?#?]', $code));
|
2754 |
-
|
2755 |
preg_match_all ('#<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' (.*?) --><!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->#', $code, $php_codes);
|
2756 |
$html_codes = explode ('[?#?]', preg_replace ('#<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' (.*?) --><!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->#', '[?#?]', $code));
|
2757 |
|
@@ -2783,10 +2786,6 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
2783 |
$this->w3tc_debug []= ' BASE64 ENCODE W3TC';
|
2784 |
}
|
2785 |
|
2786 |
-
// $base64_code = '<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
|
2787 |
-
// $base64_code .= $this->w3tc_code . ' if (!isset ($ai_enabled) || $ai_enabled) echo base64_encode ($ai_code);';
|
2788 |
-
// $base64_code .= '<!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
|
2789 |
-
|
2790 |
$base64_code = '<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' ';
|
2791 |
$base64_code .= $this->w3tc_code . ' if (!isset ($ai_enabled) || $ai_enabled) echo base64_encode ($ai_code);';
|
2792 |
$base64_code .= ' --><!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
|
@@ -2799,13 +2798,9 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
2799 |
$this->w3tc_debug []= ' BASE64 ENCODE FROM HTML';
|
2800 |
}
|
2801 |
|
2802 |
-
// preg_match_all ('#<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' -->(.*?)<!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->#', $code, $php_codes);
|
2803 |
-
// $html_codes = explode ('[?#?]', preg_replace ('#<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' -->(.*?)<!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->#', '[?#?]', $code));
|
2804 |
-
|
2805 |
preg_match_all ('#<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' (.*?) --><!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->#', $code, $php_codes);
|
2806 |
$html_codes = explode ('[?#?]', preg_replace ('#<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' (.*?) --><!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->#', '[?#?]', $code));
|
2807 |
|
2808 |
-
// $base64_code = '<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
|
2809 |
$base64_code = '<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' ';
|
2810 |
$base64_code .= 'ob_start ();';
|
2811 |
|
@@ -2819,7 +2814,6 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
2819 |
}
|
2820 |
|
2821 |
$base64_code .= 'echo base64_encode (ob_get_clean());';
|
2822 |
-
// $base64_code .= '<!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
|
2823 |
$base64_code .= ' --><!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
|
2824 |
|
2825 |
return ($base64_code);
|
@@ -4625,6 +4619,7 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
4625 |
}
|
4626 |
|
4627 |
$processed_code = $this->generate_html_from_w3tc_code ();
|
|
|
4628 |
break;
|
4629 |
}
|
4630 |
}
|
@@ -5321,10 +5316,39 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
5321 |
$code = '';
|
5322 |
$this->check_code_insertions = null;
|
5323 |
|
|
|
|
|
|
|
|
|
5324 |
do {
|
5325 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5326 |
} while (is_array ($this->check_codes) && isset ($this->check_codes [$this->check_codes_index + 1]));
|
5327 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5328 |
|
5329 |
if (is_array ($this->check_codes)) {
|
5330 |
if ($this->check_code_insertions === null) {
|
@@ -5343,6 +5367,7 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
5343 |
|
5344 |
// Additional code (ad label, close button) for a CHECK block
|
5345 |
if ($this->check_block_additional_code != '') {
|
|
|
5346 |
if ($w3tc) {
|
5347 |
if ($ai_wp_data [AI_W3TC_DEBUGGING]) {
|
5348 |
$this->w3tc_debug []= 'PROCESS ADDITIONAL CODE';
|
@@ -5376,12 +5401,6 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
5376 |
if ($w3tc) {
|
5377 |
$this->w3tc_code .= ' $ai_code = base64_decode (\''.base64_encode ($wrapper_before).'\') . $ai_code . base64_decode (\''.$this->base64_encode_w3tc ($wrapper_after, false).'\');';
|
5378 |
|
5379 |
-
// Process W3TC filter hook
|
5380 |
-
$this->w3tc_code .= ' $ai_code_org = $ai_code; if (!isset ($ai_enabled) || $ai_enabled) {$ai_code = apply_filters ("ai_block_w3tc_code_single_insertion", $ai_code_org, ' . $this->number . ');}';
|
5381 |
-
if ($ai_wp_data [AI_W3TC_DEBUGGING]) {
|
5382 |
-
$this->w3tc_code .= ' if ($ai_code != $ai_code_org) {$ai_code = ai_w3tc_block_end_message ("PROCESS HOOK FILTER ai_block_w3tc_code_single_insertion", $ai_code);}';
|
5383 |
-
}
|
5384 |
-
|
5385 |
$code = $this->generate_html_from_w3tc_code ();
|
5386 |
} else $code = $wrapper_before . $code . $wrapper_after;
|
5387 |
}
|
605 |
$ai_total_hook_php_time += microtime (true) - $hook_start_time;
|
606 |
|
607 |
$php_enabled = $ai_wp_data [AI_PHP_PROCESSING];
|
608 |
+
if (!ai_php_enabled ()) {
|
609 |
$php_enabled = false;
|
610 |
}
|
611 |
|
612 |
if ($php_enabled && $obj->get_process_php () && !get_disable_php_processing () && (!is_multisite() || is_main_site () || multisite_php_processing ()) && !defined ('AI_NO_PHP_PROCESSING')) {
|
613 |
$global_name = 'GENERATED_CODE';
|
614 |
|
615 |
+
if (isset ($obj->wp_options [$global_name]) && (!isset ($ai_wp_data [AI_BLOCK_PHP_CODE_CACHING][$this->number]) || $ai_wp_data [AI_BLOCK_PHP_CODE_CACHING][$this->number])) {
|
616 |
+
$code = $obj->wp_options [$global_name];
|
617 |
+
$unfiltered_html = $ai_wp_data [AI_UNFILTERED_HTML];
|
618 |
+
if (defined ('DISALLOW_UNFILTERED_HTML') && DISALLOW_UNFILTERED_HTML) {
|
619 |
+
$unfiltered_html = false;
|
620 |
+
}
|
621 |
+
if (!$unfiltered_html) {
|
622 |
+
$code = wp_kses ($code, 'post');
|
623 |
+
}
|
624 |
+
return $code;
|
625 |
+
}
|
626 |
|
627 |
$start_time = microtime (true);
|
628 |
|
2731 |
}
|
2732 |
|
2733 |
return (
|
|
|
|
|
|
|
|
|
2734 |
'<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' ' . $code . ' if (!isset ($ai_enabled) || $ai_enabled) echo $ai_code; else {echo ai_extract_debug_bar ($ai_code);}' . ' --><!-- /mfunc '. W3TC_DYNAMIC_SECURITY.' -->'
|
2735 |
);
|
2736 |
}
|
2755 |
$this->w3tc_debug []= ' REGENERATE W3TC';
|
2756 |
}
|
2757 |
|
|
|
|
|
|
|
2758 |
preg_match_all ('#<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' (.*?) --><!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->#', $code, $php_codes);
|
2759 |
$html_codes = explode ('[?#?]', preg_replace ('#<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' (.*?) --><!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->#', '[?#?]', $code));
|
2760 |
|
2786 |
$this->w3tc_debug []= ' BASE64 ENCODE W3TC';
|
2787 |
}
|
2788 |
|
|
|
|
|
|
|
|
|
2789 |
$base64_code = '<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' ';
|
2790 |
$base64_code .= $this->w3tc_code . ' if (!isset ($ai_enabled) || $ai_enabled) echo base64_encode ($ai_code);';
|
2791 |
$base64_code .= ' --><!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
|
2798 |
$this->w3tc_debug []= ' BASE64 ENCODE FROM HTML';
|
2799 |
}
|
2800 |
|
|
|
|
|
|
|
2801 |
preg_match_all ('#<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' (.*?) --><!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->#', $code, $php_codes);
|
2802 |
$html_codes = explode ('[?#?]', preg_replace ('#<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' (.*?) --><!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->#', '[?#?]', $code));
|
2803 |
|
|
|
2804 |
$base64_code = '<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' ';
|
2805 |
$base64_code .= 'ob_start ();';
|
2806 |
|
2814 |
}
|
2815 |
|
2816 |
$base64_code .= 'echo base64_encode (ob_get_clean());';
|
|
|
2817 |
$base64_code .= ' --><!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
|
2818 |
|
2819 |
return ($base64_code);
|
4619 |
}
|
4620 |
|
4621 |
$processed_code = $this->generate_html_from_w3tc_code ();
|
4622 |
+
|
4623 |
break;
|
4624 |
}
|
4625 |
}
|
5316 |
$code = '';
|
5317 |
$this->check_code_insertions = null;
|
5318 |
|
5319 |
+
$check_options = 0;
|
5320 |
+
$w3tc_options = false;
|
5321 |
+
$w3tc_codes = '';
|
5322 |
+
|
5323 |
do {
|
5324 |
+
$code_for_single_insertion = $this->get_code_for_single_insertion ($include_viewport_classes, $hidden_widgets, $code_only);
|
5325 |
+
|
5326 |
+
$check_options ++;
|
5327 |
+
if ($this->w3tc_code != '') {
|
5328 |
+
$w3tc_options = true;
|
5329 |
+
$w3tc_code = $this->w3tc_code;
|
5330 |
+
} else {
|
5331 |
+
// Gnerate W3TC code if W3TC was not used for the option
|
5332 |
+
$w3tc_code = '$ai_code = base64_decode (\''.base64_encode ($code).'\'); $ai_enabled = true;';
|
5333 |
+
}
|
5334 |
+
|
5335 |
+
// $w3tc_codes will be used only if any of the options uses W3TC
|
5336 |
+
$w3tc_codes .= $w3tc_code . ' if (!isset ($ai_check_code)) $ai_check_code = \'\'; $ai_check_code .= $ai_code;';
|
5337 |
+
|
5338 |
+
$code .= $code_for_single_insertion;
|
5339 |
} while (is_array ($this->check_codes) && isset ($this->check_codes [$this->check_codes_index + 1]));
|
5340 |
|
5341 |
+
if ($w3tc_options) {
|
5342 |
+
switch ($check_options) {
|
5343 |
+
case 1:
|
5344 |
+
// Nothing to do - leave the object as it is including $this->w3tc_code
|
5345 |
+
break;
|
5346 |
+
default:
|
5347 |
+
// Put merged options into $ai_code
|
5348 |
+
$this->w3tc_code = $w3tc_codes . ' $ai_code = $ai_check_code; $ai_enabled = true;';
|
5349 |
+
break;
|
5350 |
+
}
|
5351 |
+
} else $this->w3tc_code = '';
|
5352 |
|
5353 |
if (is_array ($this->check_codes)) {
|
5354 |
if ($this->check_code_insertions === null) {
|
5367 |
|
5368 |
// Additional code (ad label, close button) for a CHECK block
|
5369 |
if ($this->check_block_additional_code != '') {
|
5370 |
+
// Close button will not be inserted on empty block
|
5371 |
if ($w3tc) {
|
5372 |
if ($ai_wp_data [AI_W3TC_DEBUGGING]) {
|
5373 |
$this->w3tc_debug []= 'PROCESS ADDITIONAL CODE';
|
5401 |
if ($w3tc) {
|
5402 |
$this->w3tc_code .= ' $ai_code = base64_decode (\''.base64_encode ($wrapper_before).'\') . $ai_code . base64_decode (\''.$this->base64_encode_w3tc ($wrapper_after, false).'\');';
|
5403 |
|
|
|
|
|
|
|
|
|
|
|
|
|
5404 |
$code = $this->generate_html_from_w3tc_code ();
|
5405 |
} else $code = $wrapper_before . $code . $wrapper_after;
|
5406 |
}
|
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.7.
|
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.7.13');
|
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.7.
|
3 |
}
|
4 |
|
5 |
#blocked-warning {
|
1 |
#ai-data {
|
2 |
+
font-family: "2.7.13"; /* Used for version number of the file */
|
3 |
}
|
4 |
|
5 |
#blocked-warning {
|
images/ap-1.png
DELETED
Binary file
|
images/ap-2.png
DELETED
Binary file
|
includes/ace/mode-ai-html.js
CHANGED
@@ -37,7 +37,7 @@ function add_ai_highlighting_rules (highlighter, highlight_rules) {
|
|
37 |
highlighter.$ai_separators2 = highlighter.$lang.arrayToMap ("head|amp".split ("|"));
|
38 |
highlighter.$ai_separators3 = highlighter.$lang.arrayToMap ("rotate".split ("|"));
|
39 |
highlighter.$ai_separators4 = highlighter.$lang.arrayToMap ("fallback".split ("|"));
|
40 |
-
highlighter.$ai_attributes = highlighter.$lang.arrayToMap ("block|code|name|group|ignore|viewport|debugger|adb|tracking|css|text|selectors|custom-field|random|data|share|time|counter|category|tag|taxonomy|id|url|url-parameter|referrer|client|scheduling|ip-address|country|disable".split ("|"));
|
41 |
|
42 |
//WP shortcodes
|
43 |
highlighter.$rules ['start'].unshift (
|
37 |
highlighter.$ai_separators2 = highlighter.$lang.arrayToMap ("head|amp".split ("|"));
|
38 |
highlighter.$ai_separators3 = highlighter.$lang.arrayToMap ("rotate".split ("|"));
|
39 |
highlighter.$ai_separators4 = highlighter.$lang.arrayToMap ("fallback".split ("|"));
|
40 |
+
highlighter.$ai_attributes = highlighter.$lang.arrayToMap ("block|code|name|group|ignore|viewport|debugger|adb|tracking|css|text|selectors|custom-field|random|data|share|time|counter|category|tag|taxonomy|id|url|url-parameter|referrer|client|scheduling|ip-address|country|cookie|disable".split ("|"));
|
41 |
|
42 |
//WP shortcodes
|
43 |
highlighter.$rules ['start'].unshift (
|
includes/ace/mode-ai-php.js
CHANGED
@@ -37,7 +37,7 @@ function add_ai_highlighting_rules (highlighter, highlight_rules) {
|
|
37 |
highlighter.$ai_separators2 = highlighter.$lang.arrayToMap ("head|amp".split ("|"));
|
38 |
highlighter.$ai_separators3 = highlighter.$lang.arrayToMap ("rotate".split ("|"));
|
39 |
highlighter.$ai_separators4 = highlighter.$lang.arrayToMap ("fallback".split ("|"));
|
40 |
-
highlighter.$ai_attributes = highlighter.$lang.arrayToMap ("block|code|name|group|ignore|viewport|debugger|adb|tracking|css|text|selectors|custom-field|random|data|share|time|counter|category|tag|taxonomy|id|url|url-parameter|referrer|client|scheduling|ip-address|country|disable".split ("|"));
|
41 |
|
42 |
//WP shortcodes
|
43 |
highlighter.$rules ['start'].unshift (
|
37 |
highlighter.$ai_separators2 = highlighter.$lang.arrayToMap ("head|amp".split ("|"));
|
38 |
highlighter.$ai_separators3 = highlighter.$lang.arrayToMap ("rotate".split ("|"));
|
39 |
highlighter.$ai_separators4 = highlighter.$lang.arrayToMap ("fallback".split ("|"));
|
40 |
+
highlighter.$ai_attributes = highlighter.$lang.arrayToMap ("block|code|name|group|ignore|viewport|debugger|adb|tracking|css|text|selectors|custom-field|random|data|share|time|counter|category|tag|taxonomy|id|url|url-parameter|referrer|client|scheduling|ip-address|country|cookie|disable".split ("|"));
|
41 |
|
42 |
//WP shortcodes
|
43 |
highlighter.$rules ['start'].unshift (
|
includes/js/ai-lists.js
CHANGED
@@ -962,7 +962,7 @@ jQuery (function ($) {
|
|
962 |
block_wrapping_div.css ({"position": ""});
|
963 |
}
|
964 |
} else
|
965 |
-
if (block_wrapping_div.attr ('style').indexOf ('height:') == - 1) {
|
966 |
block_wrapping_div.hide ();
|
967 |
}
|
968 |
}
|
962 |
block_wrapping_div.css ({"position": ""});
|
963 |
}
|
964 |
} else
|
965 |
+
if (block_wrapping_div [0].hasAttribute ('style') && block_wrapping_div.attr ('style').indexOf ('height:') == - 1) {
|
966 |
block_wrapping_div.hide ();
|
967 |
}
|
968 |
}
|
includes/js/ai-lists.min.js
CHANGED
@@ -19,9 +19,9 @@ var C=(new Date).getTime()+Q,F=new Date(C),J=F.getDay();z.includes("-")||P.inclu
|
|
19 |
1E3).toString()+" ="+(C>=B).toString()+" end_date:"+Math.floor(r/1E3).toString()+" =:"+(C<r).toString()+" days:"+D.toString()+" =:"+D.includes(J.toString()).toString());w.find(".ai-debug-name.ai-scheduling-status").text(d?ai_front.visible:ai_front.hidden);d||0==U||(w.removeClass("ai-debug-scheduling").addClass("ai-debug-fallback"),w.find(".ai-debug-name.ai-scheduling-status").text(ai_front.fallback+" = "+U))}if(h||!d&&N)return!0;a(this).css({visibility:"",position:"",width:"",height:"","z-index":""});
|
20 |
d?(e.css({visibility:""}),e.hasClass("ai-remove-position")&&e.css({position:""}),"undefined"!=typeof a(this).data("code")&&(d=b64d(a(this).data("code")),0!=a(this).closest("head").length?(a(this).after(d),a(this).remove()):a(this).append(d),ai_process_element_lists(this))):g&&!z&&0!=U?(e.css({visibility:""}),e.hasClass("ai-remove-position")&&e.css({position:""}),a(this).next(".ai-fallback").removeClass("ai-fallback"),"undefined"!=typeof a(this).data("fallback-code")?(d=b64d(a(this).data("fallback-code")),
|
21 |
a(this).append(d),ai_process_element_lists(this)):(a(this).hide(),e.find(".ai-debug-block").length||-1!=e.attr("style").indexOf("height:")||e.hide()),d=e.attr("data-ai"),"undefined"!==typeof d&&!1!==d&&(d=a(this).attr("fallback-tracking"),"undefined"!==typeof d&&!1!==d&&e.attr("data-ai-"+a(this).attr("fallback_level"),d))):(a(this).hide(),e.length&&(e.removeAttr("data-ai").removeClass("ai-track"),e.find(".ai-debug-block").length?(e.css({visibility:""}).removeClass("ai-close"),e.hasClass("ai-remove-position")&&
|
22 |
-
e.css({position:""}))
|
23 |
-
jQuery("#ai-iab-tcf-bar").show()});jQuery("#ai-iab-tcf-bar").click(function(){k("euconsent-v2");k("__lxG__consent__v2");k("__lxG__consent__v2_daisybit");k("__lxG__consent__v2_gdaisybit");k("CookieLawInfoConsent");k("cookielawinfo-checkbox-advertisement");k("cookielawinfo-checkbox-analytics");k("cookielawinfo-checkbox-necessary");k("complianz_policy_id");k("complianz_consent_status");k("cmplz_marketing");
|
24 |
-
k("cmplz_banner-status");k("cmplz_functional");k("cmplz_policy_id");k("cmplz_statistics");k("moove_gdpr_popup");k("real_cookie_banner-blog:1-tcf");k("real_cookie_banner-blog:1");jQuery("#ai-iab-tcf-status").text("CONSENT COOKIES DELETED")})},5)})});
|
25 |
function ai_process_element_lists(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_process_filter_hooks&&ai_process_filter_hooks(jQuery(".ai-filter-check",a));"function"==typeof ai_adb_process_blocks&&ai_adb_process_blocks(a);"function"==typeof ai_process_impressions&&
|
26 |
1==ai_tracking_finished&&ai_process_impressions();"function"==typeof ai_install_click_trackers&&1==ai_tracking_finished&&ai_install_click_trackers();"function"==typeof ai_install_close_buttons&&ai_install_close_buttons(document)},5)}
|
27 |
function getAllUrlParams(a){var n=a?a.split("?")[1]:window.location.search.slice(1);a={};if(n){n=n.split("#")[0];n=n.split("&");for(var E=0;E<n.length;E++){var u=n[E].split("="),H=void 0,v=u[0].replace(/\[\d*\]/,function(k){H=k.slice(1,-1);return""});u="undefined"===typeof u[1]?"":u[1];v=v.toLowerCase();u=u.toLowerCase();a[v]?("string"===typeof a[v]&&(a[v]=[a[v]]),"undefined"===typeof H?a[v].push(u):a[v][H]=u):a[v]=u}}return a};
|
19 |
1E3).toString()+" ="+(C>=B).toString()+" end_date:"+Math.floor(r/1E3).toString()+" =:"+(C<r).toString()+" days:"+D.toString()+" =:"+D.includes(J.toString()).toString());w.find(".ai-debug-name.ai-scheduling-status").text(d?ai_front.visible:ai_front.hidden);d||0==U||(w.removeClass("ai-debug-scheduling").addClass("ai-debug-fallback"),w.find(".ai-debug-name.ai-scheduling-status").text(ai_front.fallback+" = "+U))}if(h||!d&&N)return!0;a(this).css({visibility:"",position:"",width:"",height:"","z-index":""});
|
20 |
d?(e.css({visibility:""}),e.hasClass("ai-remove-position")&&e.css({position:""}),"undefined"!=typeof a(this).data("code")&&(d=b64d(a(this).data("code")),0!=a(this).closest("head").length?(a(this).after(d),a(this).remove()):a(this).append(d),ai_process_element_lists(this))):g&&!z&&0!=U?(e.css({visibility:""}),e.hasClass("ai-remove-position")&&e.css({position:""}),a(this).next(".ai-fallback").removeClass("ai-fallback"),"undefined"!=typeof a(this).data("fallback-code")?(d=b64d(a(this).data("fallback-code")),
|
21 |
a(this).append(d),ai_process_element_lists(this)):(a(this).hide(),e.find(".ai-debug-block").length||-1!=e.attr("style").indexOf("height:")||e.hide()),d=e.attr("data-ai"),"undefined"!==typeof d&&!1!==d&&(d=a(this).attr("fallback-tracking"),"undefined"!==typeof d&&!1!==d&&e.attr("data-ai-"+a(this).attr("fallback_level"),d))):(a(this).hide(),e.length&&(e.removeAttr("data-ai").removeClass("ai-track"),e.find(".ai-debug-block").length?(e.css({visibility:""}).removeClass("ai-close"),e.hasClass("ai-remove-position")&&
|
22 |
+
e.css({position:""})):e[0].hasAttribute("style")&&-1==e.attr("style").indexOf("height:")&&e.hide()));a(this).attr("data-code","");a(this).attr("data-fallback-code","");e.removeClass("ai-list-block")})}};a(document).ready(function(c){setTimeout(function(){ai_process_lists();setTimeout(function(){H();if("function"==typeof ai_load_blocks){var l=function(G){"cmplzEnableScripts"!=G.type&&"all"!==G.consentLevel||ai_load_blocks()};jQuery(document).on("cmplzEnableScripts",l);jQuery(document).on("cmplz_event_marketing",
|
23 |
+
l)}},50);jQuery(".ai-debug-page-type").dblclick(function(){jQuery("#ai-iab-tcf-status").text("CONSENT COOKIES");jQuery("#ai-iab-tcf-bar").show()});jQuery("#ai-iab-tcf-bar").click(function(){k("euconsent-v2");k("__lxG__consent__v2");k("__lxG__consent__v2_daisybit");k("__lxG__consent__v2_gdaisybit");k("CookieLawInfoConsent");k("cookielawinfo-checkbox-advertisement");k("cookielawinfo-checkbox-analytics");k("cookielawinfo-checkbox-necessary");k("complianz_policy_id");k("complianz_consent_status");k("cmplz_marketing");
|
24 |
+
k("cmplz_consent_status");k("cmplz_preferences");k("cmplz_statistics-anonymous");k("cmplz_choice");k("cmplz_banner-status");k("cmplz_functional");k("cmplz_policy_id");k("cmplz_statistics");k("moove_gdpr_popup");k("real_cookie_banner-blog:1-tcf");k("real_cookie_banner-blog:1");jQuery("#ai-iab-tcf-status").text("CONSENT COOKIES DELETED")})},5)})});
|
25 |
function ai_process_element_lists(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_process_filter_hooks&&ai_process_filter_hooks(jQuery(".ai-filter-check",a));"function"==typeof ai_adb_process_blocks&&ai_adb_process_blocks(a);"function"==typeof ai_process_impressions&&
|
26 |
1==ai_tracking_finished&&ai_process_impressions();"function"==typeof ai_install_click_trackers&&1==ai_tracking_finished&&ai_install_click_trackers();"function"==typeof ai_install_close_buttons&&ai_install_close_buttons(document)},5)}
|
27 |
function getAllUrlParams(a){var n=a?a.split("?")[1]:window.location.search.slice(1);a={};if(n){n=n.split("#")[0];n=n.split("&");for(var E=0;E<n.length;E++){var u=n[E].split("="),H=void 0,v=u[0].replace(/\[\d*\]/,function(k){H=k.slice(1,-1);return""});u="undefined"===typeof u[1]?"":u[1];v=v.toLowerCase();u=u.toLowerCase();a[v]?("string"===typeof a[v]&&(a[v]=[a[v]]),"undefined"===typeof H?a[v].push(u):a[v][H]=u):a[v]=u}}return a};
|
includes/preview.php
CHANGED
@@ -2317,7 +2317,7 @@ select {
|
|
2317 |
.ai-info-1 {background: #000; color: #fff;}
|
2318 |
.ai-info-2 {background: #fff; color: #000;}
|
2319 |
|
2320 |
-
.highlighted #wrapper ins.adsbygoogle[data-ad-status="unfilled"] {background: url(
|
2321 |
|
2322 |
input {
|
2323 |
/* cursor: pointer;*/
|
2317 |
.ai-info-1 {background: #000; color: #fff;}
|
2318 |
.ai-info-2 {background: #fff; color: #000;}
|
2319 |
|
2320 |
+
.highlighted #wrapper ins.adsbygoogle[data-ad-status="unfilled"] {background: url(https://via.placeholder.com/800x800/ffffff/000000.png?text=NO%20AD%20SERVED); background-size: cover; background-repeat: no-repeat; background-position: center;}
|
2321 |
|
2322 |
input {
|
2323 |
/* cursor: pointer;*/
|
js/ad-inserter.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
var javascript_version = "2.7.
|
2 |
var ignore_key = true;
|
3 |
var start = 1;
|
4 |
var end = 16;
|
1 |
+
var javascript_version = "2.7.13"
|
2 |
var ignore_key = true;
|
3 |
var start = 1;
|
4 |
var end = 16;
|
js/ad-inserter.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
var javascript_version="2.7.
|
2 |
10,AI_BETWEEN_COMMENTS=11,AI_AFTER_COMMENTS=12,AI_FOOTER=13,AI_ABOVE_HEADER=14,AI_BEFORE_HTML_ELEMENT=15,AI_AFTER_HTML_ELEMENT=16,AI_INSIDE_HTML_ELEMENT=17,AI_BEFORE_IMAGE=18,AI_AFTER_IMAGE=19,AI_ALIGNMENT_DEFAULT=0,AI_ALIGNMENT_LEFT=1,AI_ALIGNMENT_RIGHT=2,AI_ALIGNMENT_CENTER=3,AI_ALIGNMENT_FLOAT_LEFT=4,AI_ALIGNMENT_FLOAT_RIGHT=5,AI_ALIGNMENT_NO_WRAPPING=6,AI_ALIGNMENT_CUSTOM_CSS=7,AI_ALIGNMENT_STICKY_LEFT=8,AI_ALIGNMENT_STICKY_RIGHT=9,AI_ALIGNMENT_STICKY_TOP=10,AI_ALIGNMENT_STICKY_BOTTOM=11,AI_ALIGNMENT_STICKY=
|
3 |
12,AI_ADB_ACTION_NONE=0,AI_ADB_ACTION_MESSAGE=1,AI_ADB_ACTION_REDIRECTION=2,AI_ADB_BLOCK_ACTION_DO_NOTHING=0,AI_ADB_BLOCK_ACTION_REPLACE=1,AI_ADB_BLOCK_ACTION_SHOW=2,AI_ADB_BLOCK_ACTION_HIDE=3,AI_CODE_UNKNOWN=100,AI_CODE_BANNER=0,AI_CODE_ADSENSE=1,AI_CODE_AMAZON=2,AI_ADSENSE_STANDARD=0,AI_ADSENSE_LINK=1,AI_ADSENSE_IN_ARTICLE=2,AI_ADSENSE_IN_FEED=3,AI_ADSENSE_MATCHED_CONTENT=4,AI_ADSENSE_SIZE_FIXED=0,AI_ADSENSE_SIZE_RESPONSIVE=1,AI_ADSENSE_SIZE_FIXED_BY_VIEWPORT=2,AI_HTML_INSERTION_CLIENT_SIDE=0,AI_HTML_INSERTION_SEREVR_SIDE=
|
4 |
2,AI_STICK_TO_THE_LEFT=0,AI_STICK_TO_THE_CONTENT_LEFT=1,AI_STICK_HORIZONTAL_CENTER=2,AI_STICK_TO_THE_CONTENT_RIGHT=3,AI_STICK_TO_THE_RIGHT=4,AI_STICK_TO_THE_TOP=0,AI_STICK_VERTICAL_CENTER=1,AI_SCROLL_WITH_THE_CONTENT=2,AI_STICK_TO_THE_BOTTOM=3,AI_ANIMATION_NONE=0,AI_BACKGROUND_REPEAT_DEFAULT=0,AI_BACKGROUND_REPEAT_NO=1,AI_BACKGROUND_REPEAT_YES=2,AI_BACKGROUND_REPEAT_HORIZONTALY=3,AI_BACKGROUND_REPEAT_VERTICALLY=4,AI_BACKGROUND_REPEAT_SPACE=5,AI_BACKGROUND_REPEAT_ROUND=6,AI_BACKGROUND_SIZE_DEFAULT=
|
1 |
+
var javascript_version="2.7.13",ignore_key=!0,start=1,end=16,active_tab=1,active_tab_0=0,tabs_to_configure=[],debug=!1,debug_title=!1,save_enabled=!0,current_tab=0,next_tab=0,syntax_highlighting=!1,settings_page="",dateFormat="yy-mm-dd",timeFormat="H:i:s",list_search_reload=!1,website_list_search_reload=!1,AI_DISABLED=0,AI_BEFORE_POST=1,AI_AFTER_POST=2,AI_BEFORE_CONTENT=3,AI_AFTER_CONTENT=4,AI_BEFORE_PARAGRAPH=5,AI_AFTER_PARAGRAPH=6,AI_BEFORE_EXCERPT=7,AI_AFTER_EXCERPT=8,AI_BETWEEN_POSTS=9,AI_BEFORE_COMMENTS=
|
2 |
10,AI_BETWEEN_COMMENTS=11,AI_AFTER_COMMENTS=12,AI_FOOTER=13,AI_ABOVE_HEADER=14,AI_BEFORE_HTML_ELEMENT=15,AI_AFTER_HTML_ELEMENT=16,AI_INSIDE_HTML_ELEMENT=17,AI_BEFORE_IMAGE=18,AI_AFTER_IMAGE=19,AI_ALIGNMENT_DEFAULT=0,AI_ALIGNMENT_LEFT=1,AI_ALIGNMENT_RIGHT=2,AI_ALIGNMENT_CENTER=3,AI_ALIGNMENT_FLOAT_LEFT=4,AI_ALIGNMENT_FLOAT_RIGHT=5,AI_ALIGNMENT_NO_WRAPPING=6,AI_ALIGNMENT_CUSTOM_CSS=7,AI_ALIGNMENT_STICKY_LEFT=8,AI_ALIGNMENT_STICKY_RIGHT=9,AI_ALIGNMENT_STICKY_TOP=10,AI_ALIGNMENT_STICKY_BOTTOM=11,AI_ALIGNMENT_STICKY=
|
3 |
12,AI_ADB_ACTION_NONE=0,AI_ADB_ACTION_MESSAGE=1,AI_ADB_ACTION_REDIRECTION=2,AI_ADB_BLOCK_ACTION_DO_NOTHING=0,AI_ADB_BLOCK_ACTION_REPLACE=1,AI_ADB_BLOCK_ACTION_SHOW=2,AI_ADB_BLOCK_ACTION_HIDE=3,AI_CODE_UNKNOWN=100,AI_CODE_BANNER=0,AI_CODE_ADSENSE=1,AI_CODE_AMAZON=2,AI_ADSENSE_STANDARD=0,AI_ADSENSE_LINK=1,AI_ADSENSE_IN_ARTICLE=2,AI_ADSENSE_IN_FEED=3,AI_ADSENSE_MATCHED_CONTENT=4,AI_ADSENSE_SIZE_FIXED=0,AI_ADSENSE_SIZE_RESPONSIVE=1,AI_ADSENSE_SIZE_FIXED_BY_VIEWPORT=2,AI_HTML_INSERTION_CLIENT_SIDE=0,AI_HTML_INSERTION_SEREVR_SIDE=
|
4 |
2,AI_STICK_TO_THE_LEFT=0,AI_STICK_TO_THE_CONTENT_LEFT=1,AI_STICK_HORIZONTAL_CENTER=2,AI_STICK_TO_THE_CONTENT_RIGHT=3,AI_STICK_TO_THE_RIGHT=4,AI_STICK_TO_THE_TOP=0,AI_STICK_VERTICAL_CENTER=1,AI_SCROLL_WITH_THE_CONTENT=2,AI_STICK_TO_THE_BOTTOM=3,AI_ANIMATION_NONE=0,AI_BACKGROUND_REPEAT_DEFAULT=0,AI_BACKGROUND_REPEAT_NO=1,AI_BACKGROUND_REPEAT_YES=2,AI_BACKGROUND_REPEAT_HORIZONTALY=3,AI_BACKGROUND_REPEAT_VERTICALLY=4,AI_BACKGROUND_REPEAT_SPACE=5,AI_BACKGROUND_REPEAT_ROUND=6,AI_BACKGROUND_SIZE_DEFAULT=
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Tags: ads, adsense, ad rotation, ad manager, amp, amazon, ad blocking detection,
|
|
6 |
Requires at least: 4.9
|
7 |
Tested up to: 5.9
|
8 |
Requires PHP: 5.6
|
9 |
-
Stable tag: 2.7.
|
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
|
@@ -355,6 +355,9 @@ If you are not happy to reveal this information and you have opted in, simply di
|
|
355 |
|
356 |
== Changelog ==
|
357 |
|
|
|
|
|
|
|
358 |
= 2.7.12 =
|
359 |
- Security fix for settings page save url
|
360 |
- Added support to disable ad blocking detection for specific devices
|
@@ -631,6 +634,9 @@ For the changelog of earlier versions, please refer to the separate changelog.tx
|
|
631 |
|
632 |
== Upgrade Notice ==
|
633 |
|
|
|
|
|
|
|
634 |
= 2.7.12 =
|
635 |
Security fix for settings page save url;
|
636 |
Added support to disable ad blocking detection for specific devices;
|
6 |
Requires at least: 4.9
|
7 |
Tested up to: 5.9
|
8 |
Requires PHP: 5.6
|
9 |
+
Stable tag: 2.7.13
|
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
|
355 |
|
356 |
== Changelog ==
|
357 |
|
358 |
+
= 2.7.13 =
|
359 |
+
- Few minor bug fixes, cosmetic changes and code improvements
|
360 |
+
|
361 |
= 2.7.12 =
|
362 |
- Security fix for settings page save url
|
363 |
- Added support to disable ad blocking detection for specific devices
|
634 |
|
635 |
== Upgrade Notice ==
|
636 |
|
637 |
+
= 2.7.13 =
|
638 |
+
Few minor bug fixes, cosmetic changes and code improvements
|
639 |
+
|
640 |
= 2.7.12 =
|
641 |
Security fix for settings page save url;
|
642 |
Added support to disable ad blocking detection for specific devices;
|
settings.php
CHANGED
@@ -5493,7 +5493,7 @@ function ai_check_page () {
|
|
5493 |
function sidebar_addense_alternative () { ?>
|
5494 |
|
5495 |
<?php
|
5496 |
-
switch (rand (1,
|
5497 |
case 1:
|
5498 |
case 2:
|
5499 |
case 3:
|
@@ -5750,8 +5750,8 @@ function sidebar_pro () {
|
|
5750 |
<!-- <a href='https://adinserter.pro/documentation/ad-blocking-detection' class="clear-link" title="<?php _e ('Ad blocking detection and content protection', 'ad-inserter'); ?>" target="_blank"><img id="ai-adb" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ai-adb.png" /></a>-->
|
5751 |
<a href='https://setupad.com/maximise-your-ad-revenue-with-header-bidding/?utm_source=ad-inserter-plugin&utm_medium=banner&utm_campaign=250x250-Maximise-Your-Ad-Revenue' class="clear-link" title="<?php _e ('Maximize Your Ad Revenue', 'ad-inserter'); ?>" target="_blank"><img id="ai-sa-1" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>sa-1.png" /></a>
|
5752 |
<?php break; case 2: ?>
|
5753 |
-
|
5754 |
-
<a href="https://www.adpushup.com/publisher/get-started?utm_source=ad_inserter" class="clear-link" title="<?php _e ('Supercharge your AdSense revenue by upto 40%', 'ad-inserter'); ?>" target="_blank"><img id="ai-ap-1" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ap-1.png" /></a
|
5755 |
<?php break; case 3: ?>
|
5756 |
<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-7" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ez-7.jpg" /></a>
|
5757 |
<?php break;
|
@@ -5775,8 +5775,8 @@ function sidebar_pro () {
|
|
5775 |
<?php break;
|
5776 |
case 3:
|
5777 |
?>
|
5778 |
-
|
5779 |
-
<a href="https://www.adpushup.com/publisher/get-started?utm_source=ad_inserter" class="clear-link" title="<?php _e ('Supercharge your AdSense revenue by upto 40%', 'ad-inserter'); ?>" target="_blank"><img id="ai-ap-1" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ap-1.png" /></a
|
5780 |
<?php break;
|
5781 |
} ?>
|
5782 |
</div>
|
@@ -5787,8 +5787,8 @@ function sidebar_pro () {
|
|
5787 |
<!-- <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>-->
|
5788 |
<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-7" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ez-7.jpg" /></a>
|
5789 |
<?php break; case 1: ?>
|
5790 |
-
|
5791 |
-
<a href="https://www.adpushup.com/publisher/get-started?utm_source=ad_inserter" class="clear-link" title="<?php _e ('Supercharge your AdSense revenue by upto 40%', 'ad-inserter'); ?>" target="_blank"><img id="ai-ap-1" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ap-1.png" /></a
|
5792 |
<?php break; case 2: ?>
|
5793 |
<!-- <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>-->
|
5794 |
<a href='https://setupad.com/maximise-your-ad-revenue-with-header-bidding/?utm_source=ad-inserter-plugin&utm_medium=banner&utm_campaign=250x250-Maximise-Your-Ad-Revenue' class="clear-link" title="<?php _e ('Maximize Your Ad Revenue', 'ad-inserter'); ?>" target="_blank"><img id="ai-sa-1" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>sa-1.png" /></a>
|
@@ -5803,8 +5803,8 @@ function sidebar_pro () {
|
|
5803 |
<?php switch ($version) {
|
5804 |
case 0:
|
5805 |
?>
|
5806 |
-
|
5807 |
-
<a href="https://www.adpushup.com/publisher/get-started?utm_source=ad_inserter" class="clear-link" title="<?php _e ('Supercharge your AdSense revenue by upto 40%', 'ad-inserter'); ?>" target="_blank"><img id="ai-ap-1" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ap-1.png" /></a
|
5808 |
<!-- <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>-->
|
5809 |
<!-- <a href="https://adinserter.pro/" class="clear-link" title="Automate ad placement on posts and pages" target="_blank"><img id="ai-pro-1" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>icon-256x256.jpg" /></a>-->
|
5810 |
<?php break;
|
5493 |
function sidebar_addense_alternative () { ?>
|
5494 |
|
5495 |
<?php
|
5496 |
+
switch (rand (1, 12)) {
|
5497 |
case 1:
|
5498 |
case 2:
|
5499 |
case 3:
|
5750 |
<!-- <a href='https://adinserter.pro/documentation/ad-blocking-detection' class="clear-link" title="<?php _e ('Ad blocking detection and content protection', 'ad-inserter'); ?>" target="_blank"><img id="ai-adb" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ai-adb.png" /></a>-->
|
5751 |
<a href='https://setupad.com/maximise-your-ad-revenue-with-header-bidding/?utm_source=ad-inserter-plugin&utm_medium=banner&utm_campaign=250x250-Maximise-Your-Ad-Revenue' class="clear-link" title="<?php _e ('Maximize Your Ad Revenue', 'ad-inserter'); ?>" target="_blank"><img id="ai-sa-1" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>sa-1.png" /></a>
|
5752 |
<?php break; case 2: ?>
|
5753 |
+
<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>
|
5754 |
+
<!-- <a href="https://www.adpushup.com/publisher/get-started?utm_source=ad_inserter" class="clear-link" title="<?php _e ('Supercharge your AdSense revenue by upto 40%', 'ad-inserter'); ?>" target="_blank"><img id="ai-ap-1" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ap-1.png" /></a>-->
|
5755 |
<?php break; case 3: ?>
|
5756 |
<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-7" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ez-7.jpg" /></a>
|
5757 |
<?php break;
|
5775 |
<?php break;
|
5776 |
case 3:
|
5777 |
?>
|
5778 |
+
<a href='https://adinserter.pro/documentation/ad-blocking-detection' class="clear-link" title="<?php _e ('Ad blocking detection and content protection', 'ad-inserter'); ?>" target="_blank"><img id="ai-adb" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ai-adb.png" /></a>
|
5779 |
+
<!-- <a href="https://www.adpushup.com/publisher/get-started?utm_source=ad_inserter" class="clear-link" title="<?php _e ('Supercharge your AdSense revenue by upto 40%', 'ad-inserter'); ?>" target="_blank"><img id="ai-ap-1" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ap-1.png" /></a>-->
|
5780 |
<?php break;
|
5781 |
} ?>
|
5782 |
</div>
|
5787 |
<!-- <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>-->
|
5788 |
<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-7" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ez-7.jpg" /></a>
|
5789 |
<?php break; case 1: ?>
|
5790 |
+
<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>
|
5791 |
+
<!-- <a href="https://www.adpushup.com/publisher/get-started?utm_source=ad_inserter" class="clear-link" title="<?php _e ('Supercharge your AdSense revenue by upto 40%', 'ad-inserter'); ?>" target="_blank"><img id="ai-ap-1" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ap-1.png" /></a>-->
|
5792 |
<?php break; case 2: ?>
|
5793 |
<!-- <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>-->
|
5794 |
<a href='https://setupad.com/maximise-your-ad-revenue-with-header-bidding/?utm_source=ad-inserter-plugin&utm_medium=banner&utm_campaign=250x250-Maximise-Your-Ad-Revenue' class="clear-link" title="<?php _e ('Maximize Your Ad Revenue', 'ad-inserter'); ?>" target="_blank"><img id="ai-sa-1" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>sa-1.png" /></a>
|
5803 |
<?php switch ($version) {
|
5804 |
case 0:
|
5805 |
?>
|
5806 |
+
<a href='https://adinserter.pro/documentation/code-preview' class="clear-link" title="<?php _e ('Code preview with visual CSS editor', 'ad-inserter'); ?>" target="_blank"><img id="ai-preview" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ai-preview-250.png" /></a>
|
5807 |
+
<!-- <a href="https://www.adpushup.com/publisher/get-started?utm_source=ad_inserter" class="clear-link" title="<?php _e ('Supercharge your AdSense revenue by upto 40%', 'ad-inserter'); ?>" target="_blank"><img id="ai-ap-1" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ap-1.png" /></a>-->
|
5808 |
<!-- <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>-->
|
5809 |
<!-- <a href="https://adinserter.pro/" class="clear-link" title="Automate ad placement on posts and pages" target="_blank"><img id="ai-pro-1" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>icon-256x256.jpg" /></a>-->
|
5810 |
<?php break;
|