Version Description
- Added support for consent attribute for code generator for AdSense and Amazon AMP ads
- Added support for random number shortcode
- Added support for && and !! operators in client-side client list checks
- Added scheduling time on blocks list (Pro only)
- Improved undismissible message when ad blocking is detected
- 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.24 |
Comparing to | |
See all releases |
Code changes from version 2.6.23 to 2.6.24
- ad-inserter.php +114 -24
- class.php +54 -19
- constants.php +3 -1
- css/ai-settings.css +1 -1
- images/ez-1.jpg +0 -0
- images/ez-2.jpg +0 -0
- images/ez-3.png +0 -0
- images/ez-4.png +0 -0
- images/ez-7.jpg +0 -0
- images/ez-8.jpg +0 -0
- includes/ace/mode-ai-html.js +1 -1
- includes/js/ai-adb-try.js +12 -0
- includes/js/ai-adb-try.min.js +1 -0
- includes/js/ai-insert.js +13 -1
- includes/js/ai-insert.min.js +19 -19
- includes/js/ai-lists.js +70 -33
- includes/js/ai-lists.min.js +21 -21
- includes/js/ai-sidebar.js +1 -1
- includes/js/ai-sidebar.min.js +2 -2
- includes/preview-adb.php +3 -3
- js/ad-inserter.js +16 -1
- readme.txt +17 -1
- settings.php +20 -7
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,14 @@ Requires PHP: 5.6
|
|
17 |
|
18 |
Change Log
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
Ad Inserter 2.6.23 - 2021-03-17
|
21 |
- Reduced layout shift when using lists and client-side dynamic blocks
|
22 |
- Few minor bug fixes, cosmetic changes and code improvements
|
@@ -2373,7 +2381,9 @@ function add_head_inline_styles () {
|
|
2373 |
|
2374 |
$debugging =
|
2375 |
$ai_wp_data [AI_WP_DEBUGGING] != 0 ||
|
2376 |
-
(get_remote_debugging () || ($ai_wp_data [AI_WP_USER] & AI_USER_LOGGED_IN) != 0) &&
|
|
|
|
|
2377 |
|
2378 |
if ($ai_wp_data [AI_CLIENT_SIDE_DETECTION] ||
|
2379 |
get_dynamic_blocks () == AI_DYNAMIC_BLOCKS_CLIENT_SIDE_SHOW ||
|
@@ -2538,7 +2548,7 @@ function ai_replace_js_data ($js) {
|
|
2538 |
}
|
2539 |
|
2540 |
if (defined ('AI_ADBLOCKING_DETECTION') && AI_ADBLOCKING_DETECTION) {
|
2541 |
-
if (strpos ($js, 'AI_ADB_OVERLAY_WINDOW') !== false) {
|
2542 |
$adb = $block_object [AI_ADB_MESSAGE_OPTION_NAME];
|
2543 |
$tags = array ('div', 'span', 'ins', 'section', 'kbd');
|
2544 |
$message_tag = $tags [rand (0, count ($tags) - 1)];
|
@@ -2553,7 +2563,7 @@ function ai_replace_js_data ($js) {
|
|
2553 |
}
|
2554 |
|
2555 |
// $js = str_replace ('AI_ADB_OVERLAY_WINDOW', "jQuery ('<div>', {attr: {'id': 'ai-adb-overlay', 'style': b64d ('" . base64_encode (str_replace (array ("'", "\r", "\n"), array ("\'", '', ''), $basic_adb_overlay_css) . get_overlay_css ()) . "')}})", $js);
|
2556 |
-
$overlay_code = "jQuery ('<".$overlay_tag.">', {attr: {'style': b64d ('" . base64_encode (str_replace (array ("'", "\r", "\n"), array ("\'", '', ''), ai_randomize_properties ($basic_adb_overlay_css,
|
2557 |
|
2558 |
for ($level = 1; $level <= 5; $level ++) {
|
2559 |
switch (rand (1, 10)) {
|
@@ -2572,13 +2582,13 @@ function ai_replace_js_data ($js) {
|
|
2572 |
continue 2;
|
2573 |
}
|
2574 |
|
2575 |
-
$overlay_code .= ".append (jQuery ('<div>')).append (jQuery ('<div>', {attr: {'style': b64d ('" . base64_encode (str_replace (array ("'", "\r", "\n"), array ("\'", '', ''), ai_randomize_properties ($basic_adb_overlay_css, 100,
|
2576 |
|
2577 |
$overlay_code = "jQuery ('<".$tag.">').append (" . $overlay_code . ')';
|
2578 |
|
2579 |
-
if (rand (1, 10) > 5) $overlay_code .= ".append (jQuery ('<div>', {attr: {'style': b64d ('" . base64_encode (str_replace (array ("'", "\r", "\n"), array ("\'", '', ''), ai_randomize_properties ($basic_adb_overlay_css, 100,
|
2580 |
if (rand (1, 10) > 5) $overlay_code .= ".append (jQuery ('<div>'))";
|
2581 |
-
if (rand (1, 10) > 5) $overlay_code .= ".prepend (jQuery ('<div>', {attr: {'style': b64d ('" . base64_encode (str_replace (array ("'", "\r", "\n"), array ("\'", '', ''), ai_randomize_properties ($basic_adb_overlay_css, 100,
|
2582 |
if (rand (1, 10) > 5) $overlay_code .= ".prepend (jQuery ('<div>'))";
|
2583 |
}
|
2584 |
|
@@ -2607,18 +2617,67 @@ function ai_replace_js_data ($js) {
|
|
2607 |
continue 2;
|
2608 |
}
|
2609 |
|
2610 |
-
$message_code .= ".append (jQuery ('<p>')).append (jQuery ('<div>', {attr: {'style': b64d ('" . base64_encode (str_replace (array ("'", "\r", "\n"), array ("\'", '', ''), ai_randomize_properties ($basic_adb_message_css,
|
2611 |
|
2612 |
$message_code = "jQuery ('<".$tag.">').append (" . $message_code . ')';
|
2613 |
-
if (rand (1, 10) > 7) $message_code .= ".append (jQuery ('<div>', {attr: {'style': b64d ('" . base64_encode (str_replace (array ("'", "\r", "\n"), array ("\'", '', ''), ai_randomize_properties ($basic_adb_message_css,
|
2614 |
if (rand (1, 10) > 7) $message_code .= ".append (jQuery ('<p>'))";
|
2615 |
-
if (rand (1, 10) > 7) $message_code .= ".prepend (jQuery ('<div>', {attr: {'style': b64d ('" . base64_encode (str_replace (array ("'", "\r", "\n"), array ("\'", '', ''), ai_randomize_properties ($basic_adb_message_css,
|
2616 |
if (rand (1, 10) > 7) $message_code .= ".prepend (jQuery ('<p>'))";
|
2617 |
if (rand (1, 10) > 3) $message_code .= ".prepend (jQuery ('<p>'))";
|
2618 |
}
|
2619 |
|
2620 |
$js = str_replace ('AI_ADB_MESSAGE_WINDOW', $message_code, $js);
|
2621 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2622 |
$js = str_replace ('AI_ADB_SELECTORS', get_adb_selectors (true), $js);
|
2623 |
|
2624 |
$redirection_page = get_redirection_page ();
|
@@ -2761,7 +2820,8 @@ function add_footer_inline_scripts () {
|
|
2761 |
|
2762 |
ob_start ();
|
2763 |
|
2764 |
-
|
|
|
2765 |
|
2766 |
if ($ai_wp_data [AI_FRONTEND_JS_DEBUGGING]) {
|
2767 |
$js_code = "";
|
@@ -2789,6 +2849,14 @@ function add_footer_inline_scripts () {
|
|
2789 |
echo ai_get_js ('ai-base64');
|
2790 |
}
|
2791 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2792 |
// Wait for jQuery
|
2793 |
if ($wait_for_jquery && !$ai_wp_data [AI_CODE_FOR_IFRAME]) {
|
2794 |
$jquery_ready_code = explode ("AI_JS_CODE=1", ai_get_js ('ai-wait-jquery', false));
|
@@ -5911,14 +5979,14 @@ function ai_ajax_backend () {
|
|
5911 |
$preview_parameters
|
5912 |
);
|
5913 |
}
|
5914 |
-
elseif ($
|
5915 |
require_once AD_INSERTER_PLUGIN_DIR.'includes/preview-adb.php';
|
5916 |
|
5917 |
$process_php = isset ($_POST ["php"]) && $_POST ["php"] == 1;
|
5918 |
|
5919 |
generate_code_preview_adb (base64_decode ($_POST ["code"]), $process_php);
|
5920 |
}
|
5921 |
-
elseif ($
|
5922 |
|
5923 |
if (defined ('AI_ADSENSE_API')) {
|
5924 |
require_once AD_INSERTER_PLUGIN_DIR.'includes/preview.php';
|
@@ -6771,13 +6839,13 @@ a.ai-debug-center {text-align: center; cursor: default; font-size: 10px; text-de
|
|
6771 |
|
6772 |
.ai-debug-display-none {display: none}
|
6773 |
|
6774 |
-
.ai-debug-block pre {margin: 0; padding: 2px 5px 2px; line-height: 14px;}
|
6775 |
|
6776 |
pre.ai-w3tc-debug {font-size: 12px;}
|
6777 |
|
6778 |
pre.ai-w3tc-debug.ai-w3tc-run {color: #00f;}
|
6779 |
|
6780 |
-
pre.ai-processing-log {direction: ltr; padding: 10px; background: #eee; color: #000; font-family: monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;}
|
6781 |
|
6782 |
.ai-debug-bar.ai-debug-lists.ai-debug-iab-tcf-2 kbd.ai-debug-text-left, .ai-debug-bar.ai-debug-lists.ai-debug-iab-tcf-2 kbd.ai-debug-text-right {
|
6783 |
min-width: 10%;
|
@@ -6971,21 +7039,27 @@ function ai_settings () {
|
|
6971 |
}
|
6972 |
}
|
6973 |
|
|
|
6974 |
if (!isset ($ai_options [$block]) || count ($ai_options [$block]) == 0) {
|
6975 |
if (isset ($_POST ['block-parameters-' . $block])) {
|
6976 |
$block_options = json_decode (base64_decode ($_POST ['block-parameters-' . $block]));
|
6977 |
|
6978 |
-
|
6979 |
-
$
|
6980 |
-
|
6981 |
-
|
|
|
|
|
6982 |
}
|
6983 |
-
}
|
6984 |
|
6985 |
-
|
6986 |
-
|
6987 |
-
|
6988 |
-
|
|
|
|
|
|
|
|
|
6989 |
} else {
|
6990 |
$settings_ok = false;
|
6991 |
$settings_errors []= "Missing parameter names for block $block";
|
@@ -8479,6 +8553,7 @@ function ai_process_shortcode (&$block, $atts) {
|
|
8479 |
"counter" => "",
|
8480 |
"http" => "",
|
8481 |
"custom-field" => "",
|
|
|
8482 |
"data" => "",
|
8483 |
"share" => "",
|
8484 |
"time" => "",
|
@@ -8643,6 +8718,21 @@ function ai_process_shortcode (&$block, $atts) {
|
|
8643 |
return $post_meta;
|
8644 |
}
|
8645 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8646 |
if ($parameters ['data'] != '') {
|
8647 |
if (strpos ($parameters ['data'], ',') !== false) {
|
8648 |
$data_tags = explode (',', $parameters ['data']);
|
2 |
|
3 |
/*
|
4 |
Plugin Name: Ad Inserter
|
5 |
+
Version: 2.6.24
|
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.24 - 2021-04-19
|
21 |
+
- Added support for consent attribute for code generator for AdSense and Amazon AMP ads
|
22 |
+
- Added support for random number shortcode
|
23 |
+
- Added support to use && and !! operators in client-side client list checks
|
24 |
+
- Added scheduling time on blocks list (Pro only)
|
25 |
+
- Improved undismissible message when ad blocking is detected
|
26 |
+
- Few minor bug fixes, cosmetic changes and code improvements
|
27 |
+
|
28 |
Ad Inserter 2.6.23 - 2021-03-17
|
29 |
- Reduced layout shift when using lists and client-side dynamic blocks
|
30 |
- Few minor bug fixes, cosmetic changes and code improvements
|
2381 |
|
2382 |
$debugging =
|
2383 |
$ai_wp_data [AI_WP_DEBUGGING] != 0 ||
|
2384 |
+
(get_remote_debugging () || ($ai_wp_data [AI_WP_USER] & AI_USER_LOGGED_IN) != 0) &&
|
2385 |
+
(isset ($_GET [AI_URL_DEBUG_PROCESSING_FE]) && $_GET [AI_URL_DEBUG_PROCESSING_FE] != 0 ||
|
2386 |
+
isset ($_GET [AI_URL_DEBUG_CODE]));
|
2387 |
|
2388 |
if ($ai_wp_data [AI_CLIENT_SIDE_DETECTION] ||
|
2389 |
get_dynamic_blocks () == AI_DYNAMIC_BLOCKS_CLIENT_SIDE_SHOW ||
|
2548 |
}
|
2549 |
|
2550 |
if (defined ('AI_ADBLOCKING_DETECTION') && AI_ADBLOCKING_DETECTION) {
|
2551 |
+
if (strpos ($js, 'AI_ADB_OVERLAY_WINDOW') !== false || strpos ($js, 'AI_ADB_MSG_HTML') !== false) {
|
2552 |
$adb = $block_object [AI_ADB_MESSAGE_OPTION_NAME];
|
2553 |
$tags = array ('div', 'span', 'ins', 'section', 'kbd');
|
2554 |
$message_tag = $tags [rand (0, count ($tags) - 1)];
|
2563 |
}
|
2564 |
|
2565 |
// $js = str_replace ('AI_ADB_OVERLAY_WINDOW', "jQuery ('<div>', {attr: {'id': 'ai-adb-overlay', 'style': b64d ('" . base64_encode (str_replace (array ("'", "\r", "\n"), array ("\'", '', ''), $basic_adb_overlay_css) . get_overlay_css ()) . "')}})", $js);
|
2566 |
+
$overlay_code = "jQuery ('<".$overlay_tag.">', {attr: {'style': b64d ('" . base64_encode (str_replace (array ("'", "\r", "\n"), array ("\'", '', ''), ai_randomize_properties ($basic_adb_overlay_css, 1110002, 9914998)) . ai_randomize_properties (get_overlay_css ())) . "')}})";
|
2567 |
|
2568 |
for ($level = 1; $level <= 5; $level ++) {
|
2569 |
switch (rand (1, 10)) {
|
2582 |
continue 2;
|
2583 |
}
|
2584 |
|
2585 |
+
$overlay_code .= ".append (jQuery ('<div>')).append (jQuery ('<div>', {attr: {'style': b64d ('" . base64_encode (str_replace (array ("'", "\r", "\n"), array ("\'", '', ''), ai_randomize_properties ($basic_adb_overlay_css, 100, 99999))) . "')}}))";
|
2586 |
|
2587 |
$overlay_code = "jQuery ('<".$tag.">').append (" . $overlay_code . ')';
|
2588 |
|
2589 |
+
if (rand (1, 10) > 5) $overlay_code .= ".append (jQuery ('<div>', {attr: {'style': b64d ('" . base64_encode (str_replace (array ("'", "\r", "\n"), array ("\'", '', ''), ai_randomize_properties ($basic_adb_overlay_css, 100, 99999))) . "')}}))";
|
2590 |
if (rand (1, 10) > 5) $overlay_code .= ".append (jQuery ('<div>'))";
|
2591 |
+
if (rand (1, 10) > 5) $overlay_code .= ".prepend (jQuery ('<div>', {attr: {'style': b64d ('" . base64_encode (str_replace (array ("'", "\r", "\n"), array ("\'", '', ''), ai_randomize_properties ($basic_adb_overlay_css, 100, 99999))) . "')}}))";
|
2592 |
if (rand (1, 10) > 5) $overlay_code .= ".prepend (jQuery ('<div>'))";
|
2593 |
}
|
2594 |
|
2617 |
continue 2;
|
2618 |
}
|
2619 |
|
2620 |
+
$message_code .= ".append (jQuery ('<p>')).append (jQuery ('<div>', {attr: {'style': b64d ('" . base64_encode (str_replace (array ("'", "\r", "\n"), array ("\'", '', ''), ai_randomize_properties ($basic_adb_message_css, 10000, 999999))) . "')}}))";
|
2621 |
|
2622 |
$message_code = "jQuery ('<".$tag.">').append (" . $message_code . ')';
|
2623 |
+
if (rand (1, 10) > 7) $message_code .= ".append (jQuery ('<div>', {attr: {'style': b64d ('" . base64_encode (str_replace (array ("'", "\r", "\n"), array ("\'", '', ''), ai_randomize_properties ($basic_adb_message_css, 10000, 999999))) . "')}}))";
|
2624 |
if (rand (1, 10) > 7) $message_code .= ".append (jQuery ('<p>'))";
|
2625 |
+
if (rand (1, 10) > 7) $message_code .= ".prepend (jQuery ('<div>', {attr: {'style': b64d ('" . base64_encode (str_replace (array ("'", "\r", "\n"), array ("\'", '', ''), ai_randomize_properties ($basic_adb_message_css, 10000, 999999))) . "')}}))";
|
2626 |
if (rand (1, 10) > 7) $message_code .= ".prepend (jQuery ('<p>'))";
|
2627 |
if (rand (1, 10) > 3) $message_code .= ".prepend (jQuery ('<p>'))";
|
2628 |
}
|
2629 |
|
2630 |
$js = str_replace ('AI_ADB_MESSAGE_WINDOW', $message_code, $js);
|
2631 |
|
2632 |
+
$js = str_replace ('AI_ADB_MSG_HTML', base64_encode (str_replace (array ("'", "\r", "\n"), array ("\'", '', ''), do_shortcode ($adb->ai_getCode ()))), $js);
|
2633 |
+
$js = str_replace ('AI_ADB_MSG_STYLE', base64_encode (str_replace (array ("'", "\r", "\n"), array ("\'", '', ''), ai_randomize_properties ($basic_adb_message_css, 100000, 9999999) . ai_randomize_properties (get_message_css ()))), $js);
|
2634 |
+
|
2635 |
+
|
2636 |
+
|
2637 |
+
$js_name_node = 'n'.rand (10000, 10000000);
|
2638 |
+
$js_name_index = 'i'.rand (10000, 10000000);
|
2639 |
+
|
2640 |
+
$js_code_1 = 'var '.$js_name_node.' = document.body.getElementsByTagName ("*"); for (var '.$js_name_index.'=0; '.$js_name_index.' < '.$js_name_node.'.length; '.$js_name_index.'++) {';
|
2641 |
+
$js_code_3 = '}';
|
2642 |
+
|
2643 |
+
$js_code_css = array ();
|
2644 |
+
if (rand (1, 10) > 3) $js_code_css []= 'style.filter = "blur('.rand (1, 4).'px) brightness('.rand (60, 80).'%)"';
|
2645 |
+
if (rand (1, 10) > 4) $js_code_css []= 'style.cursor = "no-drop"';
|
2646 |
+
if (rand (1, 10) > 3) $js_code_css []= 'style.cursor = "grab"';
|
2647 |
+
if (rand (1, 10) > 5) $js_code_css []= 'style.cursor = "grabbing"';
|
2648 |
+
if (rand (1, 10) > 6) $js_code_css []= 'style.cursor = "wait"';
|
2649 |
+
if (rand (1, 10) > 7) $js_code_css []= 'style.cursor = "not-allowed"';
|
2650 |
+
if (rand (1, 10) > 8) $js_code_css []= 'style.cursor = "cell"';
|
2651 |
+
if (rand (1, 10) > 9) $js_code_css []= 'style.cursor = "all-scroll"';
|
2652 |
+
if (rand (1, 10) > 5) $js_code_css []= 'style.background = "rgba('.rand (1, 255).', '.rand (1, 255).', '.rand (1, 255).', '.(rand (50, 80)/100).'"';
|
2653 |
+
if (rand (1, 10) > 6) $js_code_css []= 'style.opacity = "0.'.rand (55, 84).'"';
|
2654 |
+
if (rand (1, 10) > 6) $js_code_css []= 'style.zIndex = "'.rand (1, 12345).'"';
|
2655 |
+
if (rand (1, 10) > 7) $js_code_css []= 'style.textTransform = "uppercase"';
|
2656 |
+
if (rand (1, 10) > 7) $js_code_css []= 'style.letterSpacing = "'.rand (0, 5).'px"';
|
2657 |
+
if (rand (1, 10) > 5) $js_code_css []= 'style.border = "'.rand (2, 25).'px solid"';
|
2658 |
+
if (rand (1, 10) > 5) $js_code_css []= 'style.color = "rgba('.rand (1, 255).', '.rand (1, 255).', '.rand (1, 255).', '.(rand (20, 50)/100).'"';
|
2659 |
+
if (rand (1, 10) > 6) $js_code_css []= 'style.fontFamily = "sans-serif"';
|
2660 |
+
if (rand (1, 10) > 7) $js_code_css []= 'style.fontFamily = "serif"';
|
2661 |
+
if (rand (1, 10) > 8) $js_code_css []= 'style.fontFamily = "sans-serif"';
|
2662 |
+
if (rand (1, 10) > 6) $js_code_css []= 'style.fontFamily = "arial"';
|
2663 |
+
if (rand (1, 10) > 6) $js_code_css []= 'style.fontFamily = "monospace"';
|
2664 |
+
if (rand (1, 10) > 8) $js_code_css []= 'style.visibility = "hidden"';
|
2665 |
+
if (rand (1, 10) > 8) $js_code_css []= 'style.visibility = "collapse"';
|
2666 |
+
if (rand (1, 10) > 9) $js_code_css []= 'style.display = "list-item"';
|
2667 |
+
if (rand (1, 10) > 9) $js_code_css []= 'style.display = "inline"';
|
2668 |
+
|
2669 |
+
if (rand (1, 10) > 7) $js_code_css []= 'remove ()'; else
|
2670 |
+
if (rand (1, 10) > 7) $js_code_css []= 'parentNode.removeChild (@@)';
|
2671 |
+
$js_code_2 = '';
|
2672 |
+
foreach ($js_code_css as $js_code_css_line) {
|
2673 |
+
$js_code_css_line = str_replace ('@@', $js_name_node.'['.$js_name_index.']', $js_code_css_line);
|
2674 |
+
$js_code_2 .= $js_name_node.'['.$js_name_index.'].'.$js_code_css_line.';';
|
2675 |
+
}
|
2676 |
+
|
2677 |
+
$js = str_replace ('AI_ADB_HTML', base64_encode ($js_code_1.$js_code_2.$js_code_3), $js);
|
2678 |
+
|
2679 |
+
|
2680 |
+
|
2681 |
$js = str_replace ('AI_ADB_SELECTORS', get_adb_selectors (true), $js);
|
2682 |
|
2683 |
$redirection_page = get_redirection_page ();
|
2820 |
|
2821 |
ob_start ();
|
2822 |
|
2823 |
+
// Moved down
|
2824 |
+
// echo ai_front_translations_code ();
|
2825 |
|
2826 |
if ($ai_wp_data [AI_FRONTEND_JS_DEBUGGING]) {
|
2827 |
$js_code = "";
|
2849 |
echo ai_get_js ('ai-base64');
|
2850 |
}
|
2851 |
|
2852 |
+
if ($adb_code) {
|
2853 |
+
if (get_adb_action () == AI_ADB_ACTION_MESSAGE && get_undismissible_message ()) {
|
2854 |
+
echo ai_get_js ('ai-adb-try');
|
2855 |
+
}
|
2856 |
+
}
|
2857 |
+
|
2858 |
+
echo ai_front_translations_code ();
|
2859 |
+
|
2860 |
// Wait for jQuery
|
2861 |
if ($wait_for_jquery && !$ai_wp_data [AI_CODE_FOR_IFRAME]) {
|
2862 |
$jquery_ready_code = explode ("AI_JS_CODE=1", ai_get_js ('ai-wait-jquery', false));
|
5979 |
$preview_parameters
|
5980 |
);
|
5981 |
}
|
5982 |
+
elseif ($_POST ["preview"] == 'adb') {
|
5983 |
require_once AD_INSERTER_PLUGIN_DIR.'includes/preview-adb.php';
|
5984 |
|
5985 |
$process_php = isset ($_POST ["php"]) && $_POST ["php"] == 1;
|
5986 |
|
5987 |
generate_code_preview_adb (base64_decode ($_POST ["code"]), $process_php);
|
5988 |
}
|
5989 |
+
elseif ($_POST ["preview"] == 'adsense') {
|
5990 |
|
5991 |
if (defined ('AI_ADSENSE_API')) {
|
5992 |
require_once AD_INSERTER_PLUGIN_DIR.'includes/preview.php';
|
6839 |
|
6840 |
.ai-debug-display-none {display: none}
|
6841 |
|
6842 |
+
.ai-debug-block pre {direction: ltr; text-align: left; margin: 0; padding: 2px 5px 2px; line-height: 14px; background: #fff; color: #000; font-family: monospace; font-size: 12px;}
|
6843 |
|
6844 |
pre.ai-w3tc-debug {font-size: 12px;}
|
6845 |
|
6846 |
pre.ai-w3tc-debug.ai-w3tc-run {color: #00f;}
|
6847 |
|
6848 |
+
pre.ai-processing-log {direction: ltr; text-align: left; padding: 10px; background: #eee; color: #000; font-family: monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;}
|
6849 |
|
6850 |
.ai-debug-bar.ai-debug-lists.ai-debug-iab-tcf-2 kbd.ai-debug-text-left, .ai-debug-bar.ai-debug-lists.ai-debug-iab-tcf-2 kbd.ai-debug-text-right {
|
6851 |
min-width: 10%;
|
7039 |
}
|
7040 |
}
|
7041 |
|
7042 |
+
|
7043 |
if (!isset ($ai_options [$block]) || count ($ai_options [$block]) == 0) {
|
7044 |
if (isset ($_POST ['block-parameters-' . $block])) {
|
7045 |
$block_options = json_decode (base64_decode ($_POST ['block-parameters-' . $block]));
|
7046 |
|
7047 |
+
if (is_array ($block_options)) {
|
7048 |
+
foreach ($button_keys as $button_key) {
|
7049 |
+
$button_index = array_search ($button_key, $block_options);
|
7050 |
+
if ($button_index !== false) {
|
7051 |
+
unset ($block_options [$button_index]);
|
7052 |
+
}
|
7053 |
}
|
|
|
7054 |
|
7055 |
+
if (count ($block_options) != 0) {
|
7056 |
+
$settings_ok = false;
|
7057 |
+
$settings_errors []= "Missing settings for block $block: " . implode (', ', $block_options);
|
7058 |
+
}
|
7059 |
+
} else {
|
7060 |
+
$settings_ok = false;
|
7061 |
+
$settings_errors []= "Invalid parameter names for block $block";
|
7062 |
+
}
|
7063 |
} else {
|
7064 |
$settings_ok = false;
|
7065 |
$settings_errors []= "Missing parameter names for block $block";
|
8553 |
"counter" => "",
|
8554 |
"http" => "",
|
8555 |
"custom-field" => "",
|
8556 |
+
"random" => "",
|
8557 |
"data" => "",
|
8558 |
"share" => "",
|
8559 |
"time" => "",
|
8718 |
return $post_meta;
|
8719 |
}
|
8720 |
|
8721 |
+
if ($parameters ['random'] != '' || isset ($atts ['RANDOM']) || isset ($atts ['random'])) {
|
8722 |
+
$random_value_limits = trim ($parameters ['random']);
|
8723 |
+
$random_value = '';
|
8724 |
+
if ($random_value_limits == '') {
|
8725 |
+
$random_value = rand ();
|
8726 |
+
} else {
|
8727 |
+
if (strpos ($random_value_limits, ',') !== false) {
|
8728 |
+
$limits = explode (',', $random_value_limits);
|
8729 |
+
$random_value = rand ($limits [0], $limits [1]);
|
8730 |
+
} else $random_value = rand (0, $random_value_limits);
|
8731 |
+
}
|
8732 |
+
|
8733 |
+
return ($random_value);
|
8734 |
+
}
|
8735 |
+
|
8736 |
if ($parameters ['data'] != '') {
|
8737 |
if (strpos ($parameters ['data'], ',') !== false) {
|
8738 |
$data_tags = explode (',', $parameters ['data']);
|
class.php
CHANGED
@@ -3770,7 +3770,6 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
3770 |
$client_list_type = '';
|
3771 |
|
3772 |
if (isset ($this->check_url_parameters)) {
|
3773 |
-
// $url_parameters_raw = trim (str_replace (' ', '', $this->check_url_parameters));
|
3774 |
$url_parameters_raw = trim ($this->check_url_parameters);
|
3775 |
$url_parameter_list_type = $this->check_url_parameter_list_type;
|
3776 |
}
|
@@ -3781,7 +3780,8 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
3781 |
}
|
3782 |
|
3783 |
if (isset ($this->check_clients)) {
|
3784 |
-
$clients_raw = trim (str_replace (' ', '', strtolower ($this->check_clients)));
|
|
|
3785 |
$client_list_type = $this->check_clients_list_type;
|
3786 |
}
|
3787 |
|
@@ -3794,14 +3794,14 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
3794 |
|
3795 |
$check_again = true;
|
3796 |
} else {
|
3797 |
-
// $url_parameters_raw = trim (str_replace (' ', '', $this->get_url_parameter_list ()));
|
3798 |
$url_parameters_raw = trim ($this->get_url_parameter_list ());
|
3799 |
$url_parameter_list_type = $this->get_url_parameter_list_type ();
|
3800 |
|
3801 |
$referers_raw = trim (str_replace (' ', '', strtolower ($this->get_ad_domain_list ())));
|
3802 |
$referer_list_type = $this->get_ad_domain_list_type ();
|
3803 |
|
3804 |
-
$clients_raw = trim (str_replace (' ', '', strtolower ($this->get_client_list ())));
|
|
|
3805 |
$client_list_type = $this->get_client_list_type ();
|
3806 |
|
3807 |
switch ($this->get_scheduling()) {
|
@@ -3820,7 +3820,7 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
3820 |
|
3821 |
$url_parameters = base64_encode (html_entity_decode ($url_parameters_raw));
|
3822 |
$referers = base64_encode ($referers_raw);
|
3823 |
-
$clients = base64_encode ($clients_raw);
|
3824 |
|
3825 |
if (($this->client_side_cookie_check && $url_parameters != '') || $referers != '' || $clients != '' || $scheduling_type !== null) {
|
3826 |
switch ($dynamic_blocks) {
|
@@ -8683,22 +8683,26 @@ class ai_code_generator {
|
|
8683 |
';
|
8684 |
}
|
8685 |
|
8686 |
-
|
8687 |
-
|
8688 |
$code .= '[ADINSERTER AMP]
|
8689 |
|
8690 |
<amp-auto-ads
|
8691 |
-
|
|
|
|
|
|
|
8692 |
data-ad-client="'.esc_html ($data ['adsense-publisher-id']).'">
|
8693 |
</amp-auto-ads>';
|
8694 |
break;
|
8695 |
-
default:
|
8696 |
-
switch ($data ['adsense-amp']) {
|
8697 |
case AI_ADSENSE_AMP_ABOVE_THE_FOLD:
|
8698 |
$code .= '[ADINSERTER AMP]
|
8699 |
|
8700 |
<amp-ad
|
8701 |
-
|
|
|
|
|
|
|
8702 |
height=100
|
8703 |
type="adsense"
|
8704 |
data-ad-client="ca-'.esc_html ($data ['adsense-publisher-id']).'"
|
@@ -8709,7 +8713,10 @@ class ai_code_generator {
|
|
8709 |
$code .= '[ADINSERTER AMP]
|
8710 |
|
8711 |
<amp-ad
|
8712 |
-
|
|
|
|
|
|
|
8713 |
width=300
|
8714 |
height=250
|
8715 |
type="adsense"
|
@@ -8728,7 +8735,10 @@ class ai_code_generator {
|
|
8728 |
|
8729 |
<amp-sticky-ad layout="nodisplay">
|
8730 |
<amp-ad
|
8731 |
-
|
|
|
|
|
|
|
8732 |
height="'.esc_html ($data ['adsense-height']).'"
|
8733 |
type="adsense"
|
8734 |
data-ad-client="ca-'.esc_html ($data ['adsense-publisher-id']).'"
|
@@ -8737,8 +8747,6 @@ class ai_code_generator {
|
|
8737 |
</amp-sticky-ad>';
|
8738 |
break;
|
8739 |
}
|
8740 |
-
break;
|
8741 |
-
}
|
8742 |
}
|
8743 |
break;
|
8744 |
case AI_CODE_AMAZON:
|
@@ -8769,7 +8777,9 @@ class ai_code_generator {
|
|
8769 |
[ADINSERTER AMP]
|
8770 |
|
8771 |
<amp-ad
|
8772 |
-
'. ($data ['amazon-
|
|
|
|
|
8773 |
' : '') .
|
8774 |
' height = "'.esc_html ($data ['amazon-height']).'"
|
8775 |
type = "a9"
|
@@ -8876,10 +8886,20 @@ class ai_code_generator {
|
|
8876 |
$adsense_code = $dom->getElementsByTagName ('ins');
|
8877 |
$adsense_code_amp = $dom->getElementsByTagName ('amp-ad');
|
8878 |
$adsense_code_amp_sticky = $dom->getElementsByTagName ('amp-sticky-ad');
|
|
|
8879 |
|
8880 |
if ($adsense_code_amp_sticky->length != 0) {
|
8881 |
$adsense_amp = AI_ADSENSE_AMP_STICKY;
|
8882 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8883 |
|
8884 |
if ($adsense_code_amp->length != 0) {
|
8885 |
// $layout = $adsense_code_amp [0]->getAttribute ('layout'); // PHP 5.6.3
|
@@ -8915,6 +8935,7 @@ class ai_code_generator {
|
|
8915 |
'adsense-full-width-responsive' => '',
|
8916 |
'adsense-comment' => '',
|
8917 |
'adsense-amp' => $adsense_amp,
|
|
|
8918 |
);
|
8919 |
|
8920 |
// $data ['adsense-publisher-id'] = str_replace ('ca-', '', $adsense_code [0]->getAttribute ('data-ad-client'));
|
@@ -9023,6 +9044,9 @@ class ai_code_generator {
|
|
9023 |
|
9024 |
if ($adsense_amp == AI_ADSENSE_AMP_STICKY) {
|
9025 |
$data ['adsense-type'] = AI_ADSENSE_AMP_ONLY;
|
|
|
|
|
|
|
9026 |
} else
|
9027 |
switch ($adsense_ad_format) {
|
9028 |
case '':
|
@@ -9032,9 +9056,9 @@ class ai_code_generator {
|
|
9032 |
case 'autorelaxed':
|
9033 |
$data ['adsense-type'] = AI_ADSENSE_MATCHED_CONTENT;
|
9034 |
break;
|
9035 |
-
case 'link':
|
9036 |
-
$data ['adsense-type'] = AI_ADSENSE_LINK;
|
9037 |
-
break;
|
9038 |
case 'fluid':
|
9039 |
// $adsense_ad_layout = $adsense_code [0]->getAttribute ('data-ad-layout');
|
9040 |
$adsense_ad_layout = $adsense_code->item (0)->getAttribute ('data-ad-layout');
|
@@ -9056,6 +9080,12 @@ class ai_code_generator {
|
|
9056 |
|
9057 |
$data ['adsense-full-width-responsive'] = $adsense_code->item (0)->getAttribute ('data-full-width-responsive');
|
9058 |
|
|
|
|
|
|
|
|
|
|
|
|
|
9059 |
return $data;
|
9060 |
}
|
9061 |
}
|
@@ -9074,6 +9104,7 @@ class ai_code_generator {
|
|
9074 |
'adsense-layout' => '',
|
9075 |
'adsense-layout-key' => '',
|
9076 |
'adsense-amp' => $adsense_amp,
|
|
|
9077 |
);
|
9078 |
|
9079 |
$comment = preg_match ("#<!--(.+?)-->#", $code, $comment_match);
|
@@ -9110,6 +9141,7 @@ class ai_code_generator {
|
|
9110 |
'amazon-amp' => AI_AMAZON_AMP_DISABLED,
|
9111 |
'amazon-width' => '',
|
9112 |
'amazon-height' => '200',
|
|
|
9113 |
);
|
9114 |
|
9115 |
if (strpos ($code, 'data-amzn_assoc_') !== false) {
|
@@ -9122,6 +9154,9 @@ class ai_code_generator {
|
|
9122 |
if ($amazon_amp_ad->item (0)->getAttribute ('height') != '') {
|
9123 |
$data ['amazon-height'] = $amazon_amp_ad->item (0)->getAttribute ('height');
|
9124 |
}
|
|
|
|
|
|
|
9125 |
}
|
9126 |
|
9127 |
if (preg_match_all ("/(amzn_assoc_[^\s=]+?)\s*=\s*[\"](.+?)[\"]/", $code, $matches)) {
|
3770 |
$client_list_type = '';
|
3771 |
|
3772 |
if (isset ($this->check_url_parameters)) {
|
|
|
3773 |
$url_parameters_raw = trim ($this->check_url_parameters);
|
3774 |
$url_parameter_list_type = $this->check_url_parameter_list_type;
|
3775 |
}
|
3780 |
}
|
3781 |
|
3782 |
if (isset ($this->check_clients)) {
|
3783 |
+
// $clients_raw = trim (str_replace (' ', '', strtolower ($this->check_clients)));
|
3784 |
+
$clients_raw = trim ($this->check_clients);
|
3785 |
$client_list_type = $this->check_clients_list_type;
|
3786 |
}
|
3787 |
|
3794 |
|
3795 |
$check_again = true;
|
3796 |
} else {
|
|
|
3797 |
$url_parameters_raw = trim ($this->get_url_parameter_list ());
|
3798 |
$url_parameter_list_type = $this->get_url_parameter_list_type ();
|
3799 |
|
3800 |
$referers_raw = trim (str_replace (' ', '', strtolower ($this->get_ad_domain_list ())));
|
3801 |
$referer_list_type = $this->get_ad_domain_list_type ();
|
3802 |
|
3803 |
+
// $clients_raw = trim (str_replace (' ', '', strtolower ($this->get_client_list ())));
|
3804 |
+
$clients_raw = trim ($this->get_client_list ());
|
3805 |
$client_list_type = $this->get_client_list_type ();
|
3806 |
|
3807 |
switch ($this->get_scheduling()) {
|
3820 |
|
3821 |
$url_parameters = base64_encode (html_entity_decode ($url_parameters_raw));
|
3822 |
$referers = base64_encode ($referers_raw);
|
3823 |
+
$clients = base64_encode (html_entity_decode ($clients_raw));
|
3824 |
|
3825 |
if (($this->client_side_cookie_check && $url_parameters != '') || $referers != '' || $clients != '' || $scheduling_type !== null) {
|
3826 |
switch ($dynamic_blocks) {
|
8683 |
';
|
8684 |
}
|
8685 |
|
8686 |
+
switch ($data ['adsense-amp']) {
|
8687 |
+
case AI_ADSENSE_AMP_AUTO:
|
8688 |
$code .= '[ADINSERTER AMP]
|
8689 |
|
8690 |
<amp-auto-ads
|
8691 |
+
';
|
8692 |
+
if ($data ['adsense-amp-block-on-consent'] != '#') $code .= ' data-block-on-consent
|
8693 |
+
';
|
8694 |
+
$code .= ' type="adsense"
|
8695 |
data-ad-client="'.esc_html ($data ['adsense-publisher-id']).'">
|
8696 |
</amp-auto-ads>';
|
8697 |
break;
|
|
|
|
|
8698 |
case AI_ADSENSE_AMP_ABOVE_THE_FOLD:
|
8699 |
$code .= '[ADINSERTER AMP]
|
8700 |
|
8701 |
<amp-ad
|
8702 |
+
';
|
8703 |
+
if ($data ['adsense-amp-block-on-consent'] != '#') $code .= ' data-block-on-consent
|
8704 |
+
';
|
8705 |
+
$code .= ' layout="fixed-height"
|
8706 |
height=100
|
8707 |
type="adsense"
|
8708 |
data-ad-client="ca-'.esc_html ($data ['adsense-publisher-id']).'"
|
8713 |
$code .= '[ADINSERTER AMP]
|
8714 |
|
8715 |
<amp-ad
|
8716 |
+
';
|
8717 |
+
if ($data ['adsense-amp-block-on-consent'] != '#') $code .= ' data-block-on-consent
|
8718 |
+
';
|
8719 |
+
$code .= ' layout="responsive"
|
8720 |
width=300
|
8721 |
height=250
|
8722 |
type="adsense"
|
8735 |
|
8736 |
<amp-sticky-ad layout="nodisplay">
|
8737 |
<amp-ad
|
8738 |
+
';
|
8739 |
+
if ($data ['adsense-amp-block-on-consent'] != '#') $code .= ' data-block-on-consent
|
8740 |
+
';
|
8741 |
+
$code .= ' width="'.esc_html ($data ['adsense-width']).'"
|
8742 |
height="'.esc_html ($data ['adsense-height']).'"
|
8743 |
type="adsense"
|
8744 |
data-ad-client="ca-'.esc_html ($data ['adsense-publisher-id']).'"
|
8747 |
</amp-sticky-ad>';
|
8748 |
break;
|
8749 |
}
|
|
|
|
|
8750 |
}
|
8751 |
break;
|
8752 |
case AI_CODE_AMAZON:
|
8777 |
[ADINSERTER AMP]
|
8778 |
|
8779 |
<amp-ad
|
8780 |
+
'. ($data ['amazon-amp-block-on-consent'] != '#' ? ' data-block-on-consent
|
8781 |
+
' : '') .
|
8782 |
+
($data ['amazon-width'] != '' ? ' width = "'.esc_html ($data ['amazon-width']).'"
|
8783 |
' : '') .
|
8784 |
' height = "'.esc_html ($data ['amazon-height']).'"
|
8785 |
type = "a9"
|
8886 |
$adsense_code = $dom->getElementsByTagName ('ins');
|
8887 |
$adsense_code_amp = $dom->getElementsByTagName ('amp-ad');
|
8888 |
$adsense_code_amp_sticky = $dom->getElementsByTagName ('amp-sticky-ad');
|
8889 |
+
$adsense_code_amp_auto = $dom->getElementsByTagName ('amp-auto-ads');
|
8890 |
|
8891 |
if ($adsense_code_amp_sticky->length != 0) {
|
8892 |
$adsense_amp = AI_ADSENSE_AMP_STICKY;
|
8893 |
}
|
8894 |
+
elseif ($adsense_code_amp_auto->length != 0) {
|
8895 |
+
$adsense_amp = AI_ADSENSE_AMP_AUTO;
|
8896 |
+
}
|
8897 |
+
|
8898 |
+
if ($adsense_code_amp->length == 0) {
|
8899 |
+
if ($adsense_code_amp_auto->length != 0) {
|
8900 |
+
$adsense_code_amp = $adsense_code_amp_auto;
|
8901 |
+
}
|
8902 |
+
}
|
8903 |
|
8904 |
if ($adsense_code_amp->length != 0) {
|
8905 |
// $layout = $adsense_code_amp [0]->getAttribute ('layout'); // PHP 5.6.3
|
8935 |
'adsense-full-width-responsive' => '',
|
8936 |
'adsense-comment' => '',
|
8937 |
'adsense-amp' => $adsense_amp,
|
8938 |
+
'adsense-amp-block-on-consent' => '#',
|
8939 |
);
|
8940 |
|
8941 |
// $data ['adsense-publisher-id'] = str_replace ('ca-', '', $adsense_code [0]->getAttribute ('data-ad-client'));
|
9044 |
|
9045 |
if ($adsense_amp == AI_ADSENSE_AMP_STICKY) {
|
9046 |
$data ['adsense-type'] = AI_ADSENSE_AMP_ONLY;
|
9047 |
+
}
|
9048 |
+
elseif ($adsense_amp == AI_ADSENSE_AMP_AUTO) {
|
9049 |
+
$data ['adsense-type'] = AI_ADSENSE_AMP_ONLY;
|
9050 |
} else
|
9051 |
switch ($adsense_ad_format) {
|
9052 |
case '':
|
9056 |
case 'autorelaxed':
|
9057 |
$data ['adsense-type'] = AI_ADSENSE_MATCHED_CONTENT;
|
9058 |
break;
|
9059 |
+
// case 'link':
|
9060 |
+
// $data ['adsense-type'] = AI_ADSENSE_LINK;
|
9061 |
+
// break;
|
9062 |
case 'fluid':
|
9063 |
// $adsense_ad_layout = $adsense_code [0]->getAttribute ('data-ad-layout');
|
9064 |
$adsense_ad_layout = $adsense_code->item (0)->getAttribute ('data-ad-layout');
|
9080 |
|
9081 |
$data ['adsense-full-width-responsive'] = $adsense_code->item (0)->getAttribute ('data-full-width-responsive');
|
9082 |
|
9083 |
+
if ($adsense_code_amp->item (0) != null) {
|
9084 |
+
if ($adsense_code_amp->item (0)->hasAttribute ('data-block-on-consent')) {
|
9085 |
+
$data ['adsense-amp-block-on-consent'] = $adsense_code->item (0)->getAttribute ('data-block-on-consent');
|
9086 |
+
}
|
9087 |
+
}
|
9088 |
+
|
9089 |
return $data;
|
9090 |
}
|
9091 |
}
|
9104 |
'adsense-layout' => '',
|
9105 |
'adsense-layout-key' => '',
|
9106 |
'adsense-amp' => $adsense_amp,
|
9107 |
+
'adsense-amp-block-on-consent' => '#',
|
9108 |
);
|
9109 |
|
9110 |
$comment = preg_match ("#<!--(.+?)-->#", $code, $comment_match);
|
9141 |
'amazon-amp' => AI_AMAZON_AMP_DISABLED,
|
9142 |
'amazon-width' => '',
|
9143 |
'amazon-height' => '200',
|
9144 |
+
'amazon-amp-block-on-consent' => '#',
|
9145 |
);
|
9146 |
|
9147 |
if (strpos ($code, 'data-amzn_assoc_') !== false) {
|
9154 |
if ($amazon_amp_ad->item (0)->getAttribute ('height') != '') {
|
9155 |
$data ['amazon-height'] = $amazon_amp_ad->item (0)->getAttribute ('height');
|
9156 |
}
|
9157 |
+
if ($amazon_amp_ad->item (0)->hasAttribute ('data-block-on-consent')) {
|
9158 |
+
$data ['amazon-amp-block-on-consent'] = $amazon_amp_ad->item (0)->getAttribute ('data-block-on-consent');
|
9159 |
+
}
|
9160 |
}
|
9161 |
|
9162 |
if (preg_match_all ("/(amzn_assoc_[^\s=]+?)\s*=\s*[\"](.+?)[\"]/", $code, $matches)) {
|
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__));
|
@@ -1065,6 +1065,7 @@ define ('AI_CHECK_PARAGRAPHS_AFTER_NO_COUNTING_INSIDE_ELEMENTS', 61);
|
|
1065 |
define ('AI_CHECK_PARAGRAPHS_MAX_NUMBER', 62);
|
1066 |
define ('AI_CHECK_CLIENT', 63);
|
1067 |
define ('AI_CUSTOM_FILTER_CHECK', 64);
|
|
|
1068 |
|
1069 |
|
1070 |
define ('AI_PT_NONE', - 1);
|
@@ -1246,6 +1247,7 @@ define ('AI_ADSENSE_AMP_DISABLED', 0);
|
|
1246 |
define ('AI_ADSENSE_AMP_ABOVE_THE_FOLD', 1);
|
1247 |
define ('AI_ADSENSE_AMP_BELOW_THE_FOLD', 2);
|
1248 |
define ('AI_ADSENSE_AMP_STICKY', 3);
|
|
|
1249 |
|
1250 |
define ('AI_ADSENSE_SIZE_FIXED', 0);
|
1251 |
define ('AI_ADSENSE_SIZE_RESPONSIVE', 1);
|
31 |
define ('AD_INSERTER_NAME', 'Ad Inserter');
|
32 |
|
33 |
if (!defined( 'AD_INSERTER_VERSION'))
|
34 |
+
define ('AD_INSERTER_VERSION', '2.6.24');
|
35 |
|
36 |
if (!defined ('AD_INSERTER_PLUGIN_BASENAME'))
|
37 |
define ('AD_INSERTER_PLUGIN_BASENAME', plugin_basename (__FILE__));
|
1065 |
define ('AI_CHECK_PARAGRAPHS_MAX_NUMBER', 62);
|
1066 |
define ('AI_CHECK_CLIENT', 63);
|
1067 |
define ('AI_CUSTOM_FILTER_CHECK', 64);
|
1068 |
+
define ('AI_CHECK_CFP_IP_ADDRESS', 65);
|
1069 |
|
1070 |
|
1071 |
define ('AI_PT_NONE', - 1);
|
1247 |
define ('AI_ADSENSE_AMP_ABOVE_THE_FOLD', 1);
|
1248 |
define ('AI_ADSENSE_AMP_BELOW_THE_FOLD', 2);
|
1249 |
define ('AI_ADSENSE_AMP_STICKY', 3);
|
1250 |
+
define ('AI_ADSENSE_AMP_AUTO', 4);
|
1251 |
|
1252 |
define ('AI_ADSENSE_SIZE_FIXED', 0);
|
1253 |
define ('AI_ADSENSE_SIZE_RESPONSIVE', 1);
|
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.24"; /* Used for version number of the file */
|
3 |
}
|
4 |
|
5 |
#blocked-warning {
|
images/ez-1.jpg
DELETED
Binary file
|
images/ez-2.jpg
DELETED
Binary file
|
images/ez-3.png
DELETED
Binary file
|
images/ez-4.png
DELETED
Binary file
|
images/ez-7.jpg
ADDED
Binary file
|
images/ez-8.jpg
ADDED
Binary file
|
includes/ace/mode-ai-html.js
CHANGED
@@ -36,7 +36,7 @@ function add_ai_highlighting_rules (highlighter, highlight_rules) {
|
|
36 |
highlighter.$ai_separators1 = highlighter.$lang.arrayToMap ("http|count".split ("|"));
|
37 |
highlighter.$ai_separators2 = highlighter.$lang.arrayToMap ("head|amp".split ("|"));
|
38 |
highlighter.$ai_separators3 = highlighter.$lang.arrayToMap ("rotate".split ("|"));
|
39 |
-
highlighter.$ai_attributes = highlighter.$lang.arrayToMap ("block|code|name|group|ignore|check|viewport|debugger|adb|tracking|css|text|selectors|custom-field|data|share|time|counter|category|tag|taxonomy|id|url|url-parameter|referrer|client|ip-address|country|disable".split ("|"));
|
40 |
|
41 |
//WP shortcodes
|
42 |
highlighter.$rules ['start'].unshift (
|
36 |
highlighter.$ai_separators1 = highlighter.$lang.arrayToMap ("http|count".split ("|"));
|
37 |
highlighter.$ai_separators2 = highlighter.$lang.arrayToMap ("head|amp".split ("|"));
|
38 |
highlighter.$ai_separators3 = highlighter.$lang.arrayToMap ("rotate".split ("|"));
|
39 |
+
highlighter.$ai_attributes = highlighter.$lang.arrayToMap ("block|code|name|group|ignore|check|viewport|debugger|adb|tracking|css|text|selectors|custom-field|random|data|share|time|counter|category|tag|taxonomy|id|url|url-parameter|referrer|client|ip-address|country|disable".split ("|"));
|
40 |
|
41 |
//WP shortcodes
|
42 |
highlighter.$rules ['start'].unshift (
|
includes/js/ai-adb-try.js
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
try {
|
2 |
+
var ai_adb = window.jQuery && window.jQuery.fn, ai_check = ai_adb, ai_front = ai_adb, ai_adb_overlay = ai_adb, ai_check_block = ai_adb;
|
3 |
+
}
|
4 |
+
catch (e) {
|
5 |
+
eval (b64d ('AI_ADB_HTML'));
|
6 |
+
|
7 |
+
var m = document.createElement ("div");
|
8 |
+
m.style = b64d ('AI_ADB_MSG_STYLE');
|
9 |
+
m.innerHTML = b64d ('AI_ADB_MSG_HTML');
|
10 |
+
document.body.prepend (m);
|
11 |
+
}
|
12 |
+
|
includes/js/ai-adb-try.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
try{var ai_adb=window.jQuery&&window.jQuery.fn,ai_check=ai_adb,ai_front=ai_adb,ai_adb_overlay=ai_adb,ai_check_block=ai_adb}catch(a){eval(b64d("AI_ADB_HTML"));var m=document.createElement("div");m.style=b64d("AI_ADB_MSG_STYLE");m.innerHTML=b64d("AI_ADB_MSG_HTML");document.body.prepend(m)};
|
includes/js/ai-insert.js
CHANGED
@@ -257,10 +257,22 @@ ai_insert_viewport_code = function (id) {
|
|
257 |
var ai_block_div = document.getElementsByClassName (id) [0];
|
258 |
|
259 |
if (typeof ai_block_div != 'undefined') {
|
260 |
-
ai_insert_code (ai_block_div);
|
261 |
|
262 |
ai_block_div.classList.remove (id);
|
263 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
setTimeout (function () {
|
265 |
ai_block_div.removeAttribute ('style');
|
266 |
}, 2);
|
257 |
var ai_block_div = document.getElementsByClassName (id) [0];
|
258 |
|
259 |
if (typeof ai_block_div != 'undefined') {
|
260 |
+
var inserted = ai_insert_code (ai_block_div);
|
261 |
|
262 |
ai_block_div.classList.remove (id);
|
263 |
|
264 |
+
if (inserted) {
|
265 |
+
var wrapping_div = ai_block_div.closest ('div.AI_FUNCT_GET_BLOCK_CLASS_NAME');
|
266 |
+
|
267 |
+
if (wrapping_div != null) {
|
268 |
+
var viewport_style = ai_block_div.getAttribute ('style');
|
269 |
+
|
270 |
+
if (viewport_style != null) {
|
271 |
+
wrapping_div.setAttribute ('style', wrapping_div.getAttribute ('style') + ' ' + viewport_style);
|
272 |
+
}
|
273 |
+
}
|
274 |
+
}
|
275 |
+
|
276 |
setTimeout (function () {
|
277 |
ai_block_div.removeAttribute ('style');
|
278 |
}, 2);
|
includes/js/ai-insert.min.js
CHANGED
@@ -1,21 +1,21 @@
|
|
1 |
-
ai_insert=function(
|
2 |
-
ai_front.insertion_before:"after"==
|
3 |
-
b):jQuery(
|
4 |
b.parentNode.removeChild(b))}};
|
5 |
-
ai_insert_code=function(
|
6 |
-
|
7 |
-
|
8 |
-
ai_insert_list_code=function(
|
9 |
-
ai_insert_viewport_code=function(
|
10 |
-
ai_insert_client_code=function(
|
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(
|
13 |
-
return{matchesSelector:function(
|
14 |
-
e.selector,e.callback)},checkChildNodesRecursively:function(
|
15 |
-
[];this._beforeRemoving=this._beforeAdding=null};r.prototype.addEvent=function(
|
16 |
-
|
17 |
-
x=0;x<q.length;x++)e.addEvent(q[x],g,
|
18 |
-
g)return!0;return!1})};this.unbindEventWithSelectorAndCallback=function(g,
|
19 |
-
{attributes:!1,childList:!0,subtree:!0};f.fireOnAttributesModification&&(a.attributes=!0);return a},function(f,a){f.forEach(function(g){var
|
20 |
-
|
21 |
-
function(f,a,g){"undefined"===typeof g?(g=a,a=
|
1 |
+
ai_insert=function(c,h,t){for(var p=-1!=h.indexOf(":eq")?jQuery(h):document.querySelectorAll(h),u=0,y=p.length;u<y;u++){var b=p[u];selector_string=b.hasAttribute("id")?"#"+b.getAttribute("id"):b.hasAttribute("class")?"."+b.getAttribute("class").replace(RegExp(" ","g"),"."):"";var v=document.createElement("div");v.innerHTML=t;var m=v.getElementsByClassName("ai-selector-counter")[0];null!=m&&(m.innerText=u+1);m=v.getElementsByClassName("ai-debug-name ai-main")[0];if(null!=m){var l="";"before"==c?l=
|
2 |
+
ai_front.insertion_before:"after"==c?l=ai_front.insertion_after:"prepend"==c?l=ai_front.insertion_prepend:"append"==c?l=ai_front.insertion_append:"replace-content"==c?l=ai_front.insertion_replace_content:"replace-element"==c&&(l=ai_front.insertion_replace_element);-1==selector_string.indexOf(".ai-viewports")&&(m.innerText=l+" "+h+" ("+b.tagName.toLowerCase()+selector_string+")")}m=document.createRange();l=!0;try{var w=m.createContextualFragment(v.innerHTML)}catch(r){l=!1}"before"==c?l?b.parentNode.insertBefore(w,
|
3 |
+
b):jQuery(v.innerHTML).insertBefore(jQuery(b)):"after"==c?l?b.parentNode.insertBefore(w,b.nextSibling):jQuery(v.innerHTML).insertBefore(jQuery(b.nextSibling)):"prepend"==c?l?b.insertBefore(w,b.firstChild):jQuery(v.innerHTML).insertBefore(jQuery(b.firstChild)):"append"==c?l?b.insertBefore(w,null):jQuery(v.innerHTML).appendTo(jQuery(b)):"replace-content"==c?(b.innerHTML="",l?b.insertBefore(w,null):jQuery(v.innerHTML).appendTo(jQuery(b))):"replace-element"==c&&(l?b.parentNode.insertBefore(w,b):jQuery(v.innerHTML).insertBefore(jQuery(b)),
|
4 |
b.parentNode.removeChild(b))}};
|
5 |
+
ai_insert_code=function(c){function h(m,l){return null==m?!1:m.classList?m.classList.contains(l):-1<(" "+m.className+" ").indexOf(" "+l+" ")}function t(m,l){null!=m&&(m.classList?m.classList.add(l):m.className+=" "+l)}function p(m,l){null!=m&&(m.classList?m.classList.remove(l):m.className=m.className.replace(new RegExp("(^|\\b)"+l.split(" ").join("|")+"(\\b|$)","gi")," "))}if("undefined"!=typeof c){var u=!1;if(h(c,"no-visibility-check")||c.offsetWidth||c.offsetHeight||c.getClientRects().length){u=
|
6 |
+
c.getAttribute("data-code");var y=c.getAttribute("data-insertion"),b=c.getAttribute("data-selector");if(null!=u)if(null!=y&&null!=b){if(-1!=b.indexOf(":eq")?jQuery(b).length:document.querySelectorAll(b).length)ai_insert(y,b,b64d(u)),p(c,"ai-viewports")}else{y=document.createRange();b=!0;try{var v=y.createContextualFragment(b64d(u))}catch(m){b=!1}b?c.parentNode.insertBefore(v,c.nextSibling):jQuery(b64d(u)).insertBefore(jQuery(c.nextSibling));p(c,"ai-viewports")}u=!0}else v=c.previousElementSibling,
|
7 |
+
h(v,"ai-debug-bar")&&h(v,"ai-debug-script")&&(p(v,"ai-debug-script"),t(v,"ai-debug-viewport-invisible")),p(c,"ai-viewports");return u}};
|
8 |
+
ai_insert_list_code=function(c){var h=document.getElementsByClassName(c)[0];if("undefined"!=typeof h){var t=ai_insert_code(h),p=h.closest("div.AI_FUNCT_GET_BLOCK_CLASS_NAME");if(p){t||p.removeAttribute("data-ai");var u=p.querySelectorAll(".ai-debug-block");p&&u.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=""))}h.classList.remove(c);t&&ai_process_elements()}};
|
9 |
+
ai_insert_viewport_code=function(c){var h=document.getElementsByClassName(c)[0];if("undefined"!=typeof h){var t=ai_insert_code(h);h.classList.remove(c);t&&(c=h.closest("div.AI_FUNCT_GET_BLOCK_CLASS_NAME"),null!=c&&(t=h.getAttribute("style"),null!=t&&c.setAttribute("style",c.getAttribute("style")+" "+t)));setTimeout(function(){h.removeAttribute("style")},2);ai_process_elements()}};
|
10 |
+
ai_insert_code_by_class=function(c){var h=document.getElementsByClassName(c)[0];"undefined"!=typeof h&&(ai_insert_code(h),h.classList.remove(c))};ai_insert_client_code=function(c,h){var t=document.getElementsByClassName(c)[0];if("undefined"!=typeof t){var p=t.getAttribute("data-code");null!=p&&ai_check_block()&&ai_check_and_insert_block()&&(t.setAttribute("data-code",p.substring(Math.floor(h/19))),ai_insert_code_by_class(c),t.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(c,h,t){function p(r,d,e){b.addMethod(d,e,r.unbindEvent);b.addMethod(d,e,r.unbindEventWithSelectorOrCallback);b.addMethod(d,e,r.unbindEventWithSelectorAndCallback)}function u(r){r.arrive=l.bindEvent;p(l,r,"unbindArrive");r.leave=w.bindEvent;p(w,r,"unbindLeave")}if(c.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(d,e){return d instanceof HTMLElement&&r.call(d,e)},addMethod:function(d,e,f){var a=d[e];d[e]=function(){if(f.length==arguments.length)return f.apply(this,arguments);if("function"==typeof a)return a.apply(this,arguments)}},callCallbacks:function(d,e){e&&e.options.onceOnly&&1==e.firedElems.length&&(d=[d[0]]);for(var f=0,a;a=d[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(d,e,f,a){for(var g=0,k;k=d[g];g++)f(k,e,a)&&a.push({callback:e.callback,elem:k}),0<k.childNodes.length&&b.checkChildNodesRecursively(k.childNodes,e,f,a)},mergeArrays:function(d,e){var f={},a;for(a in d)d.hasOwnProperty(a)&&(f[a]=d[a]);for(a in e)e.hasOwnProperty(a)&&(f[a]=e[a]);return f},toElementsArray:function(d){"undefined"===typeof d||"number"===typeof d.length&&d!==c||(d=[d]);return d}}}(),v=function(){var r=function(){this._eventsBucket=
|
15 |
+
[];this._beforeRemoving=this._beforeAdding=null};r.prototype.addEvent=function(d,e,f,a){d={target:d,selector:e,options:f,callback:a,firedElems:[]};this._beforeAdding&&this._beforeAdding(d);this._eventsBucket.push(d);return d};r.prototype.removeEvent=function(d){for(var e=this._eventsBucket.length-1,f;f=this._eventsBucket[e];e--)d(f)&&(this._beforeRemoving&&this._beforeRemoving(f),(f=this._eventsBucket.splice(e,1))&&f.length&&(f[0].callback=null))};r.prototype.beforeAdding=function(d){this._beforeAdding=
|
16 |
+
d};r.prototype.beforeRemoving=function(d){this._beforeRemoving=d};return r}(),m=function(r,d){var e=new v,f=this,a={fireOnAttributesModification:!1};e.beforeAdding(function(g){var k=g.target;if(k===c.document||k===c)k=document.getElementsByTagName("html")[0];var n=new MutationObserver(function(x){d.call(this,x,g)});var q=r(g.options);n.observe(k,q);g.observer=n;g.me=f});e.beforeRemoving(function(g){g.observer.disconnect()});this.bindEvent=function(g,k,n){k=b.mergeArrays(a,k);for(var q=b.toElementsArray(this),
|
17 |
+
x=0;x<q.length;x++)e.addEvent(q[x],g,k,n)};this.unbindEvent=function(){var g=b.toElementsArray(this);e.removeEvent(function(k){for(var n=0;n<g.length;n++)if(this===t||k.target===g[n])return!0;return!1})};this.unbindEventWithSelectorOrCallback=function(g){var k=b.toElementsArray(this);e.removeEvent("function"===typeof g?function(n){for(var q=0;q<k.length;q++)if((this===t||n.target===k[q])&&n.callback===g)return!0;return!1}:function(n){for(var q=0;q<k.length;q++)if((this===t||n.target===k[q])&&n.selector===
|
18 |
+
g)return!0;return!1})};this.unbindEventWithSelectorAndCallback=function(g,k){var n=b.toElementsArray(this);e.removeEvent(function(q){for(var x=0;x<n.length;x++)if((this===t||q.target===n[x])&&q.selector===g&&q.callback===k)return!0;return!1})};return this},l=new function(){function r(f,a,g){return b.matchesSelector(f,a.selector)&&(f._id===t&&(f._id=y++),-1==a.firedElems.indexOf(f._id))?(a.firedElems.push(f._id),!0):!1}var d={fireOnAttributesModification:!1,onceOnly:!1,existing:!1};l=new m(function(f){var a=
|
19 |
+
{attributes:!1,childList:!0,subtree:!0};f.fireOnAttributesModification&&(a.attributes=!0);return a},function(f,a){f.forEach(function(g){var k=g.addedNodes,n=g.target,q=[];null!==k&&0<k.length?b.checkChildNodesRecursively(k,a,r,q):"attributes"===g.type&&r(n,a,q)&&q.push({callback:a.callback,elem:n});b.callCallbacks(q,a)})});var e=l.bindEvent;l.bindEvent=function(f,a,g){"undefined"===typeof g?(g=a,a=d):a=b.mergeArrays(d,a);var k=b.toElementsArray(this);if(a.existing){for(var n=[],q=0;q<k.length;q++)for(var x=
|
20 |
+
k[q].querySelectorAll(f),z=0;z<x.length;z++)n.push({callback:g,elem:x[z]});if(a.onceOnly&&n.length)return g.call(n[0].elem,n[0].elem);setTimeout(b.callCallbacks,1,n)}e.call(this,f,a,g)};return l},w=new function(){function r(f,a){return b.matchesSelector(f,a.selector)}var d={};w=new m(function(){return{childList:!0,subtree:!0}},function(f,a){f.forEach(function(g){g=g.removedNodes;var k=[];null!==g&&0<g.length&&b.checkChildNodesRecursively(g,a,r,k);b.callCallbacks(k,a)})});var e=w.bindEvent;w.bindEvent=
|
21 |
+
function(f,a,g){"undefined"===typeof g?(g=a,a=d):a=b.mergeArrays(d,a);e.call(this,f,a,g)};return w};h&&u(h.fn);u(HTMLElement.prototype);u(NodeList.prototype);u(HTMLCollection.prototype);u(HTMLDocument.prototype);u(Window.prototype);h={};p(l,h,"unbindAllArrive");p(w,h,"unbindAllLeave");return h}}(window,"undefined"===typeof jQuery?null:jQuery,void 0);
|
includes/js/ai-lists.js
CHANGED
@@ -357,57 +357,94 @@ jQuery (function ($) {
|
|
357 |
if (ai_debug) console.log ("AI LISTS client: ", window.navigator.userAgent);
|
358 |
if (ai_debug) console.log ("AI LISTS client list:", b64d (client_list), clients_list_type);
|
359 |
|
360 |
-
|
361 |
-
$.each (client_list_array, function (index,
|
362 |
-
if (
|
363 |
-
|
364 |
-
if (list_client.charAt (0) == "*") {
|
365 |
-
if (list_client.charAt (list_client.length - 1) == "*") {
|
366 |
-
list_client = list_client.substr (1, list_client.length - 2).toLowerCase ();
|
367 |
-
if (user_agent_lc.indexOf (list_client) != - 1) {
|
368 |
-
if (ai_debug) console.log ("AI LISTS FOUND:", list_client);
|
369 |
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
376 |
if (ai_debug) console.log ("AI LISTS FOUND:", list_client);
|
377 |
|
378 |
-
|
379 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
380 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
381 |
}
|
382 |
-
|
383 |
-
|
384 |
-
list_client = list_client.substr (0, list_client.length - 1).toLowerCase ();
|
385 |
-
if (user_agent_lc.indexOf (list_client) == 0) {
|
386 |
if (ai_debug) console.log ("AI LISTS FOUND:", list_client);
|
387 |
|
388 |
-
|
389 |
-
return false;
|
390 |
}
|
391 |
-
}
|
392 |
-
else if (md.is (list_client)) {
|
393 |
-
if (ai_debug) console.log ("AI LISTS FOUND:", list_client);
|
394 |
|
395 |
-
|
396 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
397 |
}
|
398 |
});
|
399 |
|
400 |
switch (clients_list_type) {
|
401 |
case "B":
|
402 |
-
if (
|
403 |
break;
|
404 |
case "W":
|
405 |
-
if (!
|
406 |
break;
|
407 |
}
|
408 |
|
409 |
-
if (ai_debug) console.log ("
|
410 |
-
if (ai_debug) console.log ("AI LISTS list
|
|
|
|
|
411 |
}
|
412 |
}
|
413 |
|
@@ -580,7 +617,7 @@ jQuery (function ($) {
|
|
580 |
}
|
581 |
|
582 |
if (!list_passed) {
|
583 |
-
if (ai_debug) console.log ("AI LISTS
|
584 |
|
585 |
return false; // End && check
|
586 |
}
|
357 |
if (ai_debug) console.log ("AI LISTS client: ", window.navigator.userAgent);
|
358 |
if (ai_debug) console.log ("AI LISTS client list:", b64d (client_list), clients_list_type);
|
359 |
|
360 |
+
list_passed = false;
|
361 |
+
$.each (client_list_array, function (index, list_client_term) {
|
362 |
+
if (list_client_term.trim () == '') return true;
|
|
|
|
|
|
|
|
|
|
|
|
|
363 |
|
364 |
+
var client_list_array_term = list_client_term.split ("&&");
|
365 |
+
$.each (client_list_array_term, function (index, list_client) {
|
366 |
+
|
367 |
+
var result = true;
|
368 |
+
|
369 |
+
list_client = list_client.trim ();
|
370 |
+
|
371 |
+
var list_client_org = list_client;
|
372 |
+
|
373 |
+
if (list_client.substring (0, 2) == '!!') {
|
374 |
+
result = false;
|
375 |
+
list_client = list_client.substring (2);
|
376 |
+
}
|
377 |
+
|
378 |
+
if (ai_debug) console.log ("");
|
379 |
+
if (ai_debug) console.log ("AI LISTS item check", list_client_org);
|
380 |
+
|
381 |
+
var client_found = false;
|
382 |
+
|
383 |
+
if (list_client.charAt (0) == "*") {
|
384 |
+
if (list_client.charAt (list_client.length - 1) == "*") {
|
385 |
+
list_client = list_client.substr (1, list_client.length - 2).toLowerCase ();
|
386 |
+
if (user_agent_lc.indexOf (list_client) != - 1) {
|
387 |
if (ai_debug) console.log ("AI LISTS FOUND:", list_client);
|
388 |
|
389 |
+
client_found = true;
|
390 |
+
}
|
391 |
+
} else {
|
392 |
+
list_client = list_client.substr (1).toLowerCase ();
|
393 |
+
if (user_agent_lc.substr (- list_client.length) == list_client) {
|
394 |
+
if (ai_debug) console.log ("AI LISTS FOUND:", list_client);
|
395 |
+
|
396 |
+
client_found = true;
|
397 |
+
}
|
398 |
}
|
399 |
+
}
|
400 |
+
else if (list_client.charAt (list_client.length - 1) == "*") {
|
401 |
+
list_client = list_client.substr (0, list_client.length - 1).toLowerCase ();
|
402 |
+
if (user_agent_lc.indexOf (list_client) == 0) {
|
403 |
+
if (ai_debug) console.log ("AI LISTS FOUND:", list_client);
|
404 |
+
|
405 |
+
client_found = true;
|
406 |
}
|
407 |
+
}
|
408 |
+
else if (md.is (list_client)) {
|
|
|
|
|
409 |
if (ai_debug) console.log ("AI LISTS FOUND:", list_client);
|
410 |
|
411 |
+
client_found = true;
|
|
|
412 |
}
|
|
|
|
|
|
|
413 |
|
414 |
+
|
415 |
+
if (ai_debug) console.log ("AI LISTS CLIENT", list_client, 'found: ', client_found);
|
416 |
+
|
417 |
+
if (client_found) {
|
418 |
+
list_passed = result;
|
419 |
+
} else list_passed = !result;
|
420 |
+
|
421 |
+
if (!list_passed) {
|
422 |
+
if (ai_debug) console.log ("");
|
423 |
+
if (ai_debug) console.log ("AI LISTS term FAILED:", list_client_term);
|
424 |
+
|
425 |
+
return false; // End && check
|
426 |
+
}
|
427 |
+
|
428 |
+
}); // &&
|
429 |
+
|
430 |
+
if (list_passed) {
|
431 |
+
return false; // End list check
|
432 |
}
|
433 |
});
|
434 |
|
435 |
switch (clients_list_type) {
|
436 |
case "B":
|
437 |
+
if (list_passed) enable_block = false;
|
438 |
break;
|
439 |
case "W":
|
440 |
+
if (!list_passed) enable_block = false;
|
441 |
break;
|
442 |
}
|
443 |
|
444 |
+
if (ai_debug) console.log ("");
|
445 |
+
if (ai_debug) console.log ("AI LISTS list passed", list_passed);
|
446 |
+
if (ai_debug) console.log ("AI LISTS block enabled", enable_block);
|
447 |
+
if (ai_debug) console.log ("");
|
448 |
}
|
449 |
}
|
450 |
|
617 |
}
|
618 |
|
619 |
if (!list_passed) {
|
620 |
+
if (ai_debug) console.log ("AI LISTS term FAILED", list_parameter_term);
|
621 |
|
622 |
return false; // End && check
|
623 |
}
|
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,
|
2 |
-
jQuery(function(a){function
|
3 |
-
"function"==typeof __tcfapi&&"function"==typeof ai_load_blocks&&"undefined"==typeof ai_iab_tcf_callback_installed&&(__tcfapi("addEventListener",2,function(
|
4 |
-
ai_process_lists=function(
|
5 |
-
b=b.replace(/]| /gi,"").split("[");return
|
6 |
-
10)):"cmpuishown"==
|
7 |
-
|
8 |
-
if("undefined"!==typeof MobileDetect)var
|
9 |
-
1)){if(
|
10 |
-
!1
|
11 |
-
decodeURIComponent(
|
12 |
-
(a("#ai-iab-tcf-bar").addClass("status-ok"),
|
13 |
-
|
14 |
-
|
15 |
-
0==E?E=6:E--;
|
16 |
-
ai_front.hidden);b||0==
|
17 |
-
ai_process_element(this))):f&&!
|
18 |
-
b))):(a(this).hide(),
|
19 |
-
function(
|
20 |
-
"__lxG__consent__v2_gdaisybit=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";document.cookie="complianz_consent_status=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";document.cookie="cmplz_marketing=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";document.cookie="cmplz_stats=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";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
|
1 |
+
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(a){return a.raw=a};$jscomp.createTemplateTagFirstArgWithRaw=function(a,m){a.raw=m;return a};$jscomp.arrayIteratorImpl=function(a){var m=0;return function(){return m<a.length?{done:!1,value:a[m++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.makeIterator=function(a){var m="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return m?m.call(a):$jscomp.arrayIterator(a)};
|
2 |
+
jQuery(function(a){function m(d){d=d.match(F);return null!=d&&1<d.length&&"string"===typeof d[1]&&0<d[1].length?d[1].toLowerCase():null}function A(d){try{var k=Date.parse(d);isNaN(k)&&(k=null)}catch(L){k=null}if(null==k&&d.includes(" ")){d=d.split(" ");try{k=Date.parse(d[0]);if(d[1].includes(":")){var u=d[1].split(":");k+=1E3*(3600*parseInt(u[0])+60*parseInt(u[1])+parseInt(u[2]))}isNaN(k)&&(k=null)}catch(L){k=null}}return k}function p(){(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(d,k){k&&"useractioncomplete"===d.eventStatus&&(ai_tcData=d,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(d){return!!~this.indexOf(d)});var F=/:\/\/(.[^/:]+)/i;
|
4 |
+
ai_process_lists=function(d){function k(c,b,h){if(0==c.length){if("!@!"==h)return!0;b!=h&&("true"==h.toLowerCase()?h=!0:"false"==h.toLowerCase()&&(h=!1));return b==h}if("object"!=typeof b&&"array"!=typeof b)return!1;var f=c[0];c=c.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,k(c,f,h))return!0}else if(f in b)return k(c,b[f],h);return!1}function u(c,b,h){if("object"!=typeof c||-1==b.indexOf("["))return!1;
|
5 |
+
b=b.replace(/]| /gi,"").split("[");return k(b,c,h)}function L(){"function"==typeof __tcfapi&&(a("#ai-iab-tcf-status").text("DETECTED"),__tcfapi("getTCData",2,function(c,b){b?(a("#ai-iab-tcf-bar").addClass("status-ok"),"tcloaded"==c.eventStatus||"useractioncomplete"==c.eventStatus?(ai_tcData=c,c.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"==c.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(c){"function"==typeof __tcfapi?("undefined"==typeof ai_iab_tcf_callback_installed&&p(),"undefined"==typeof ai_tcData_requested&&(ai_tcData_requested=!0,L(),url_parameters_need_tcData=!0)):
|
7 |
+
c&&(a("#ai-iab-tcf-bar").addClass("status-error").removeClass("status-ok"),a("#ai-iab-tcf-status").text("MISSING: __tcfapi function not found"))}d=null==d?a("div.ai-list-data, meta.ai-list-data"):d.filter(".ai-list-data");if(d.length){d.removeClass("ai-list-data");var G=document.cookie.split(";");G.forEach(function(c,b){G[b]=c.trim()});var R=getAllUrlParams(window.location.search);if(null!=R.referrer)var r=R.referrer;else r=document.referrer,""!=r&&(r=m(r));var M=window.navigator.userAgent,N=M.toLowerCase();
|
8 |
+
if("undefined"!==typeof MobileDetect)var S=new MobileDetect(M);d.each(function(){var c=a(this).closest("div.AI_FUNCT_GET_BLOCK_CLASS_NAME"),b=!0,h=a(this).attr("referer-list");if("undefined"!=typeof h){h=b64d(h).split(",");var f=a(this).attr("referer-list-type"),y=!1;a.each(h,function(v,g){if(""==g)return!0;if("*"==g.charAt(0))if("*"==g.charAt(g.length-1)){if(g=g.substr(1,g.length-2),-1!=r.indexOf(g))return y=!0,!1}else{if(g=g.substr(1),r.substr(-g.length)==g)return y=!0,!1}else if("*"==g.charAt(g.length-
|
9 |
+
1)){if(g=g.substr(0,g.length-1),0==r.indexOf(g))return y=!0,!1}else if("#"==g){if(""==r)return y=!0,!1}else if(g==r)return y=!0,!1});switch(f){case "B":y&&(b=!1);break;case "W":y||(b=!1)}}if(b&&(h=a(this).attr("client-list"),"undefined"!=typeof h&&"undefined"!==typeof S))switch(h=b64d(h).split(","),f=a(this).attr("client-list-type"),n=!1,a.each(h,function(v,g){if(""==g.trim())return!0;var I=g.split("&&");a.each(I,function(W,e){var t=!0;e=e.trim();"!!"==e.substring(0,2)&&(t=!1,e=e.substring(2));var l=
|
10 |
+
!1;"*"==e.charAt(0)?"*"==e.charAt(e.length-1)?(e=e.substr(1,e.length-2).toLowerCase(),-1!=N.indexOf(e)&&(l=!0)):(e=e.substr(1).toLowerCase(),N.substr(-e.length)==e&&(l=!0)):"*"==e.charAt(e.length-1)?(e=e.substr(0,e.length-1).toLowerCase(),0==N.indexOf(e)&&(l=!0)):S.is(e)&&(l=!0);n=l?t:!t;if(!n)return!1});if(n)return!1}),f){case "B":n&&(b=!1);break;case "W":n||(b=!1)}var O=h=!1;if(b&&(f=a(this).attr("parameter-list"),"undefined"!=typeof f)){f=b64d(f).split(",");var w=a(this).attr("parameter-list-type"),
|
11 |
+
T=[];G.forEach(function(v){v=v.split("=");try{var g=JSON.parse(decodeURIComponent(v[1]))}catch(I){g=decodeURIComponent(v[1])}T[v[0]]=g});var n=!1,J=a(this);a.each(f,function(v,g){var I=g.split("&&");a.each(I,function(W,e){var t=!0;e=e.trim();"!!"==e.substring(0,2)&&(t=!1,e=e.substring(2));var l=e,z="!@!",U=-1!=e.indexOf("["),V=(0==e.indexOf("tcf-v2")||0==e.indexOf("euconsent-v2"))&&-1!=e.indexOf("[");-1!=e.indexOf("=")&&(z=e.split("="),l=z[0],z=z[1],U=-1!=l.indexOf("["),V=(0==l.indexOf("tcf-v2")||
|
12 |
+
0==l.indexOf("euconsent-v2"))&&-1!=l.indexOf("["));if(V)a("#ai-iab-tcf-bar").show(),"object"==typeof ai_tcData?(a("#ai-iab-tcf-bar").addClass("status-ok"),l=l.replace(/]| /gi,"").split("["),l.shift(),n=(l=k(l,ai_tcData,z))?t:!t):(J.addClass("ai-list-data"),O=!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)},
|
13 |
+
1E3)},600)));else if(U)n=(l=u(T,l,z))?t:!t;else{var P=!1;"!@!"==z?G.every(function(X){return X.split("=")[0]==e?(P=!0,!1):!0}):P=-1!=G.indexOf(e);n=P?t:!t}if(!n)return!1});if(n)return!1});switch(w){case "B":n&&(b=!1);break;case "W":n||(b=!1)}a(this).hasClass("ai-list-manual")&&(b?(J.removeClass("ai-list-data"),J.removeClass("ai-list-manual")):(h=!0,J.addClass("ai-list-data")));if(!h&&!O&&(f=a(this).data("debug-info"),"undefined"!=typeof f&&(f=a("."+f),0!=f.length))){var q=f.parent();q.hasClass("ai-debug-info")&&
|
14 |
+
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",M);q.find(".ai-debug-name.ai-list-status").text(b?ai_front.visible:ai_front.hidden);f=!1;if(b){w=a(this).attr("scheduling-start");var B=a(this).attr("scheduling-end"),C=a(this).attr("scheduling-days");if("undefined"!=typeof w&&"undefined"!=typeof B&&"undefined"!=typeof C){f=!0;var Q=parseInt(a(this).attr("scheduling-fallback")),x=parseInt(a(this).attr("gmt"));w=A(b64d(w))+
|
15 |
+
x;B=A(b64d(B))+x;C=b64d(C).split(",");q=a(this).attr("scheduling-type");var D=(new Date).getTime()+x,K=new Date(D),E=K.getDay();0==E?E=6:E--;x=D>=w&&D<B&&C.includes(E.toString());switch(q){case "B":x=!x}x||(b=!1);K=K.toISOString().split(".")[0].replace("T"," ");q=a(this).prevAll(".ai-debug-bar.ai-debug-scheduling");q.find(".ai-debug-name.ai-scheduling-info").text(K+" "+E+" current_time:"+D.toString()+" start_date:"+w.toString()+" ="+(D>=w).toString()+" end_date:"+B.toString()+" =:"+(D<B).toString()+
|
16 |
+
" days:"+C.toString()+" =:"+C.includes(E.toString()).toString());q.find(".ai-debug-name.ai-scheduling-status").text(b?ai_front.visible:ai_front.hidden);b||0==Q||(q.removeClass("ai-debug-scheduling").addClass("ai-debug-fallback"),q.find(".ai-debug-name.ai-scheduling-status").text(ai_front.fallback+"="+Q))}}if(h||O)return!0;a(this).css({visibility:"",position:"",width:"",height:"","z-index":""});b?(c.css({visibility:""}),c.hasClass("ai-remove-position")&&c.css({position:""}),"undefined"!=typeof a(this).data("code")&&
|
17 |
+
(b=b64d(a(this).data("code")),0!=a(this).closest("head").length?(a(this).after(b),a(this).remove()):a(this).append(b),ai_process_element(this))):f&&!x&&0!=Q?(c.css({visibility:""}),c.hasClass("ai-remove-position")&&c.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(),c.find(".ai-debug-block").length||c.hide()),b=c.attr("data-ai"),
|
18 |
+
"undefined"!==typeof b&&!1!==b&&(b=a(this).attr("fallback-tracking"),"undefined"!==typeof b&&!1!==b&&c.attr("data-ai",b))):(a(this).hide(),c.find(".ai-debug-block").length||c.hide(),c.removeAttr("data-ai").removeClass("ai-track"),c.find(".ai-debug-block").length?(c.css({visibility:""}).removeClass("ai-close"),c.hasClass("ai-remove-position")&&c.css({position:""})):c.hide());a(this).attr("data-code","");a(this).attr("data-fallback-code","");c.removeClass("ai-list-block")})}};a(document).ready(function(d){setTimeout(function(){ai_process_lists();
|
19 |
+
setTimeout(function(){p();if("function"==typeof ai_load_blocks){var k=function(u){"cmplzEnableScripts"!=u.type&&"all"!==u.consentLevel||ai_load_blocks()};jQuery(document).on("cmplzEnableScripts",k);jQuery(document).on("cmplz_event_marketing",k)}},50);jQuery("#ai-iab-tcf-bar").click(function(){document.cookie="euconsent-v2=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";document.cookie="__lxG__consent__v2=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";document.cookie="__lxG__consent__v2_daisybit=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
|
20 |
+
document.cookie="__lxG__consent__v2_gdaisybit=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";document.cookie="complianz_consent_status=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";document.cookie="cmplz_marketing=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";document.cookie="cmplz_stats=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";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 m=a?a.split("?")[1]:window.location.search.slice(1);a={};if(m){m=m.split("#")[0];m=m.split("&");for(var A=0;A<m.length;A++){var p=m[A].split("="),F=void 0,d=p[0].replace(/\[\d*\]/,function(k){F=k.slice(1,-1);return""});p="undefined"===typeof p[1]?"":p[1];d=d.toLowerCase();p=p.toLowerCase();a[d]?("string"===typeof a[d]&&(a[d]=[a[d]]),"undefined"===typeof F?a[d].push(p):a[d][F]=p):a[d]=p}}return a};
|
includes/js/ai-sidebar.js
CHANGED
@@ -62,7 +62,7 @@ jQuery(document).ready(function($) {
|
|
62 |
};
|
63 |
|
64 |
if (typeof ai_sticky_sidebar_delay == 'undefined') {
|
65 |
-
ai_sticky_sidebar_delay =
|
66 |
}
|
67 |
|
68 |
setTimeout (function() {
|
62 |
};
|
63 |
|
64 |
if (typeof ai_sticky_sidebar_delay == 'undefined') {
|
65 |
+
ai_sticky_sidebar_delay = 200;
|
66 |
}
|
67 |
|
68 |
setTimeout (function() {
|
includes/js/ai-sidebar.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
jQuery(document).ready(function(
|
2 |
-
"sticky").css("position","-webkit-sticky").css("top",b):a.theiaStickySidebar({additionalMarginTop:b,sidebarBehavior:"stick-to-top"}))})};"undefined"==typeof ai_sticky_sidebar_delay&&(ai_sticky_sidebar_delay=
|
1 |
+
jQuery(document).ready(function(n){var m=function(c){var g=AI_FUNC_GET_STICKY_WIDGET_MODE,h=AI_FUNC_GET_STICKY_WIDGET_MARGIN,k=c(document).width();c(".ai-sticky-widget").each(function(){for(var b=c(this),l=b.width(),d=!1,a=b.parent();"BODY"!=a.prop("tagName");){if(a.hasClass("theiaStickySidebar")){d=!0;break}var e=a.parent(),f=e.width();if(f>1.2*l||f>k/2)break;a=e}d||(b=a.offset().top-b.offset().top+h,0==g?("sticky"!=a.css("position")||isNaN(parseInt(a.css("top")))||a.css("top")<b)&&a.css("position",
|
2 |
+
"sticky").css("position","-webkit-sticky").css("top",b):a.theiaStickySidebar({additionalMarginTop:b,sidebarBehavior:"stick-to-top"}))})};"undefined"==typeof ai_sticky_sidebar_delay&&(ai_sticky_sidebar_delay=200);setTimeout(function(){m(jQuery)},ai_sticky_sidebar_delay)});
|
includes/preview-adb.php
CHANGED
@@ -117,9 +117,9 @@ function generate_code_preview_adb ($client_code, $process_php) {
|
|
117 |
if (typeof textarea_id == 'undefined' ) textarea_id = editor_id;
|
118 |
|
119 |
if (jQuery('#wp-' + editor_id + '-wrap').hasClass ('tmce-active') && tinyMCE.get (editor_id)) {
|
120 |
-
return tinyMCE.get(editor_id).getContent();
|
121 |
} else {
|
122 |
-
return jQuery('#'+textarea_id).val();
|
123 |
}
|
124 |
}
|
125 |
|
@@ -236,7 +236,7 @@ function generate_code_preview_adb ($client_code, $process_php) {
|
|
236 |
}
|
237 |
});
|
238 |
|
239 |
-
load_from_settings
|
240 |
}
|
241 |
|
242 |
initialize_preview ();
|
117 |
if (typeof textarea_id == 'undefined' ) textarea_id = editor_id;
|
118 |
|
119 |
if (jQuery('#wp-' + editor_id + '-wrap').hasClass ('tmce-active') && tinyMCE.get (editor_id)) {
|
120 |
+
return tinyMCE.get (editor_id).getContent ();
|
121 |
} else {
|
122 |
+
return jQuery ('#'+textarea_id).val();
|
123 |
}
|
124 |
}
|
125 |
|
236 |
}
|
237 |
});
|
238 |
|
239 |
+
setTimeout (load_from_settings, 350);
|
240 |
}
|
241 |
|
242 |
initialize_preview ();
|
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;
|
@@ -3357,6 +3357,8 @@ jQuery(document).ready (function($) {
|
|
3357 |
|
3358 |
$("#adsense-amp-" + block).val (code_data ['adsense-amp']);
|
3359 |
|
|
|
|
|
3360 |
$("#adsense-layout-" + block).val (code_data ['adsense-layout']);
|
3361 |
$("#adsense-layout-key-" + block).val (decodeURIComponent (code_data ['adsense-layout-key']));
|
3362 |
|
@@ -3389,6 +3391,8 @@ jQuery(document).ready (function($) {
|
|
3389 |
$("#amazon-width-" + block).val (code_data ['amazon-width']);
|
3390 |
$("#amazon-height-" + block).val (code_data ['amazon-height']);
|
3391 |
|
|
|
|
|
3392 |
process_amazon_elements (block);
|
3393 |
break;
|
3394 |
case AI_CODE_UNKNOWN:
|
@@ -3441,6 +3445,7 @@ jQuery(document).ready (function($) {
|
|
3441 |
}
|
3442 |
|
3443 |
code_data ['adsense-amp'] = parseInt ($("select#adsense-amp-" + block +" option:selected").attr ('value'));
|
|
|
3444 |
code_data ['adsense-layout'] = $("#adsense-layout-" + block).val ();
|
3445 |
code_data ['adsense-layout-key'] = $("#adsense-layout-key-" + block).val ();
|
3446 |
|
@@ -3468,6 +3473,7 @@ jQuery(document).ready (function($) {
|
|
3468 |
code_data ['amazon-amp'] = $("select#amazon-amp-" + block +" option:selected").attr ('value');
|
3469 |
code_data ['amazon-width'] = $("#amazon-width-" + block).val ();
|
3470 |
code_data ['amazon-height'] = $("#amazon-height-" + block).val ();
|
|
|
3471 |
break;
|
3472 |
case AI_CODE_UNKNOWN:
|
3473 |
// if (debug) console.log ("AI GENERATE CODE:", code_type);
|
@@ -4906,6 +4912,7 @@ jQuery(document).ready (function($) {
|
|
4906 |
}
|
4907 |
}
|
4908 |
}
|
|
|
4909 |
function configure_list () {
|
4910 |
var data_container = $("#ai-list-data");
|
4911 |
|
@@ -4971,6 +4978,14 @@ jQuery(document).ready (function($) {
|
|
4971 |
highlight_active_block ();
|
4972 |
|
4973 |
data_container.disableSelection();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4974 |
}
|
4975 |
|
4976 |
function reload_list (settings) {
|
1 |
+
var javascript_version = "2.6.24";
|
2 |
var ignore_key = true;
|
3 |
var start = 1;
|
4 |
var end = 16;
|
3357 |
|
3358 |
$("#adsense-amp-" + block).val (code_data ['adsense-amp']);
|
3359 |
|
3360 |
+
$("#adsense-amp-block-on-consent-" + block).prop ('checked', code_data ['adsense-amp-block-on-consent'] != '#');
|
3361 |
+
|
3362 |
$("#adsense-layout-" + block).val (code_data ['adsense-layout']);
|
3363 |
$("#adsense-layout-key-" + block).val (decodeURIComponent (code_data ['adsense-layout-key']));
|
3364 |
|
3391 |
$("#amazon-width-" + block).val (code_data ['amazon-width']);
|
3392 |
$("#amazon-height-" + block).val (code_data ['amazon-height']);
|
3393 |
|
3394 |
+
$("#amazon-amp-block-on-consent-" + block).prop ('checked', code_data ['amazon-amp-block-on-consent'] != '#');
|
3395 |
+
|
3396 |
process_amazon_elements (block);
|
3397 |
break;
|
3398 |
case AI_CODE_UNKNOWN:
|
3445 |
}
|
3446 |
|
3447 |
code_data ['adsense-amp'] = parseInt ($("select#adsense-amp-" + block +" option:selected").attr ('value'));
|
3448 |
+
code_data ['adsense-amp-block-on-consent'] = $("#adsense-amp-block-on-consent-" + block).is(":checked") ? '' : '#';
|
3449 |
code_data ['adsense-layout'] = $("#adsense-layout-" + block).val ();
|
3450 |
code_data ['adsense-layout-key'] = $("#adsense-layout-key-" + block).val ();
|
3451 |
|
3473 |
code_data ['amazon-amp'] = $("select#amazon-amp-" + block +" option:selected").attr ('value');
|
3474 |
code_data ['amazon-width'] = $("#amazon-width-" + block).val ();
|
3475 |
code_data ['amazon-height'] = $("#amazon-height-" + block).val ();
|
3476 |
+
code_data ['amazon-amp-block-on-consent'] = $("#amazon-amp-block-on-consent-" + block).is(":checked") ? '' : '#';
|
3477 |
break;
|
3478 |
case AI_CODE_UNKNOWN:
|
3479 |
// if (debug) console.log ("AI GENERATE CODE:", code_type);
|
4912 |
}
|
4913 |
}
|
4914 |
}
|
4915 |
+
|
4916 |
function configure_list () {
|
4917 |
var data_container = $("#ai-list-data");
|
4918 |
|
4978 |
highlight_active_block ();
|
4979 |
|
4980 |
data_container.disableSelection();
|
4981 |
+
|
4982 |
+
$("#ai-list-data td[title]").tooltip ({
|
4983 |
+
track: true,
|
4984 |
+
delay: 700,
|
4985 |
+
showURL: false,
|
4986 |
+
showBody: " | ",
|
4987 |
+
fade: 250
|
4988 |
+
});
|
4989 |
}
|
4990 |
|
4991 |
function reload_list (settings) {
|
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.7
|
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
|
@@ -352,6 +352,14 @@ If you are not happy to reveal this information and you have opted in, simply di
|
|
352 |
|
353 |
== Changelog ==
|
354 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
355 |
= 2.6.23 =
|
356 |
- Reduced layout shift when using lists and client-side dynamic blocks
|
357 |
- Few minor bug fixes, cosmetic changes and code improvements
|
@@ -522,6 +530,14 @@ For the changelog of earlier versions, please refer to the separate changelog.tx
|
|
522 |
|
523 |
== Upgrade Notice ==
|
524 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
525 |
= 2.6.23 =
|
526 |
Reduced layout shift when using lists and client-side dynamic blocks;
|
527 |
Few minor bug fixes, cosmetic changes and code improvements
|
6 |
Requires at least: 4.6
|
7 |
Tested up to: 5.7
|
8 |
Requires PHP: 5.6
|
9 |
+
Stable tag: 2.6.24
|
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
|
352 |
|
353 |
== Changelog ==
|
354 |
|
355 |
+
= 2.6.24 =
|
356 |
+
- Added support for consent attribute for code generator for AdSense and Amazon AMP ads
|
357 |
+
- Added support for random number shortcode
|
358 |
+
- Added support for && and !! operators in client-side client list checks
|
359 |
+
- Added scheduling time on blocks list (Pro only)
|
360 |
+
- Improved undismissible message when ad blocking is detected
|
361 |
+
- Few minor bug fixes, cosmetic changes and code improvements
|
362 |
+
|
363 |
= 2.6.23 =
|
364 |
- Reduced layout shift when using lists and client-side dynamic blocks
|
365 |
- Few minor bug fixes, cosmetic changes and code improvements
|
530 |
|
531 |
== Upgrade Notice ==
|
532 |
|
533 |
+
= 2.6.24 =
|
534 |
+
Added support for consent attribute for code generator for AdSense and Amazon AMP ads;
|
535 |
+
Added support for random number shortcode;
|
536 |
+
Added support for && and !! operators in client-side client list checks;
|
537 |
+
Added scheduling time on blocks list (Pro only);
|
538 |
+
Improved undismissible message when ad blocking is detected;
|
539 |
+
Few minor bug fixes, cosmetic changes and code improvements;
|
540 |
+
|
541 |
= 2.6.23 =
|
542 |
Reduced layout shift when using lists and client-side dynamic blocks;
|
543 |
Few minor bug fixes, cosmetic changes and code improvements
|
settings.php
CHANGED
@@ -995,7 +995,7 @@ function generate_settings_form (){
|
|
995 |
<td style="padding-left: 7px;">
|
996 |
<select id="adsense-type-<?php echo $block; ?>">
|
997 |
<option value="<?php echo AI_ADSENSE_STANDARD; ?>" selected><?php echo AI_TEXT_ADSENSE_STANDARD; ?></option>
|
998 |
-
<option value="<?php echo AI_ADSENSE_LINK; ?>"><?php echo AI_TEXT_LINK; ?></option
|
999 |
<option value="<?php echo AI_ADSENSE_IN_ARTICLE; ?>"><?php echo AI_TEXT_IN_ARTICLE; ?></option>
|
1000 |
<option value="<?php echo AI_ADSENSE_IN_FEED; ?>"><?php echo AI_TEXT_IN_FEED; ?></option>
|
1001 |
<option value="<?php echo AI_ADSENSE_MATCHED_CONTENT; ?>"><?php echo AI_TEXT_MATCHED_CONTENT; ?></option>
|
@@ -1023,7 +1023,13 @@ function generate_settings_form (){
|
|
1023 |
<option value="<?php echo AI_ADSENSE_AMP_ABOVE_THE_FOLD; ?>"><?php echo AI_TEXT_ABOVE_THE_FOLD; ?></option>
|
1024 |
<option value="<?php echo AI_ADSENSE_AMP_BELOW_THE_FOLD; ?>"><?php echo AI_TEXT_BELOW_THE_FOLD; ?></option>
|
1025 |
<option value="<?php echo AI_ADSENSE_AMP_STICKY; ?>"><?php echo AI_TEXT_STICKY_AMP; ?></option>
|
|
|
1026 |
</select>
|
|
|
|
|
|
|
|
|
|
|
1027 |
</td>
|
1028 |
</tr>
|
1029 |
|
@@ -1170,7 +1176,11 @@ function generate_settings_form (){
|
|
1170 |
<td class="amazon-amp-data" style="width: 10%;">
|
1171 |
<input id="amazon-height-<?php echo $block; ?>" style="width: 100%;" type="text" size="8" maxlength="8" title="Amazon AMP ad height" />
|
1172 |
</td>
|
1173 |
-
<td style="width:
|
|
|
|
|
|
|
|
|
1174 |
|
1175 |
</td>
|
1176 |
</tr>
|
@@ -3433,11 +3443,12 @@ function generate_settings_form (){
|
|
3433 |
replace_blocked_image ('ai-info-3', 'info-3.jpg', 'block');
|
3434 |
replace_blocked_image ('ai-ez-1', 'ez-1.jpg', 'block');
|
3435 |
replace_blocked_image ('ai-ez-2', 'ez-2.jpg', 'block');
|
3436 |
-
replace_blocked_image ('ai-ez-2', 'ez-2.png', 'block');
|
3437 |
replace_blocked_image ('ai-ez-3', 'ez-3.png', 'block');
|
3438 |
replace_blocked_image ('ai-ez-4', 'ez-4.png', 'block');
|
3439 |
replace_blocked_image ('ai-ez-5', 'ez-5.png', 'block');
|
3440 |
replace_blocked_image ('ai-ez-6', 'ez-6.png', 'block');
|
|
|
|
|
3441 |
replace_blocked_image ('ai-pro-1', 'icon-256x256.jpg', 'block');
|
3442 |
replace_blocked_image ('ai-pro-2', 'ai-charts-250.png', 'block');
|
3443 |
replace_blocked_image ('ai-pro-3', 'ai-countries-250.png', 'block');
|
@@ -4269,6 +4280,7 @@ function code_block_list ($start, $end, $search_text, $show_all_blocks, $active_
|
|
4269 |
$devices = $obj->get_detection_server_side () || $obj->get_detection_client_side ();
|
4270 |
|
4271 |
$scheduling = $obj->get_scheduling() != AI_SCHEDULING_OFF;
|
|
|
4272 |
|
4273 |
switch ($obj->get_scheduling ()) {
|
4274 |
case AI_SCHEDULING_BETWEEN_DATES:
|
@@ -4279,6 +4291,7 @@ function code_block_list ($start, $end, $search_text, $show_all_blocks, $active_
|
|
4279 |
$obj->get_schedule_weekdays (),
|
4280 |
$obj->get_scheduling () == AI_SCHEDULING_BETWEEN_DATES
|
4281 |
);
|
|
|
4282 |
break;
|
4283 |
default:
|
4284 |
$scheduling_period_inactive = false;
|
@@ -4369,7 +4382,7 @@ function code_block_list ($start, $end, $search_text, $show_all_blocks, $active_
|
|
4369 |
<td style="min-width: 15px; text-align: center; padding-left: 5px; vertical-align: top;"><span class="<?php echo $process_php ? 'checkbox-icon size-img16 icon-php on' : ''; ?>" style="margin-top: 1px;"></span></td>
|
4370 |
<td style="min-width: 15px; text-align: center; padding-left: 5px; vertical-align: top; color: #66f;"><span class="<?php echo $exceptions ? 'dashicons dashicons-forms' : ''; ?>" style="font-size: 16px; width: 16px; height: 16px; margin-top: 1px;"></span></td>
|
4371 |
<td style="min-width: 15px; text-align: center; padding-left: 5px; vertical-align: top; color: #0df;"><span class="<?php echo $devices ? 'dashicons dashicons-desktop' : ''; ?>" style="font-size: 16px; width: 16px; height: 16px; margin-top: 1px;"></span></td>
|
4372 |
-
<td style="min-width: 15px; text-align: center; padding-left: 5px; vertical-align: top; color: <?php echo $scheduling_period_inactive ? '#e44' : '#00f'; ?>;"><?php echo $scheduling ? '⏰' : ''; ?></td>
|
4373 |
<?php
|
4374 |
if (function_exists ('get_global_tracking')) {
|
4375 |
?>
|
@@ -5062,7 +5075,7 @@ function sidebar_addense_alternative () { ?>
|
|
5062 |
<div style="clear: both;"></div>
|
5063 |
</div>
|
5064 |
<div class="ai-form rounded" style="height: 90px; padding: 8px 4px 8px 12px;">
|
5065 |
-
<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-
|
5066 |
</div>
|
5067 |
<?php
|
5068 |
break;
|
@@ -5276,7 +5289,7 @@ function sidebar_pro () {
|
|
5276 |
<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>
|
5277 |
<!-- <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>-->
|
5278 |
<?php break; case 3: ?>
|
5279 |
-
<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-
|
5280 |
<?php break;
|
5281 |
} ?>
|
5282 |
</div>
|
@@ -5308,7 +5321,7 @@ function sidebar_pro () {
|
|
5308 |
<?php switch ($version) {
|
5309 |
case 0: ?>
|
5310 |
<!-- <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>-->
|
5311 |
-
<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-
|
5312 |
<?php break; case 1: ?>
|
5313 |
<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>
|
5314 |
<!-- <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>-->
|
995 |
<td style="padding-left: 7px;">
|
996 |
<select id="adsense-type-<?php echo $block; ?>">
|
997 |
<option value="<?php echo AI_ADSENSE_STANDARD; ?>" selected><?php echo AI_TEXT_ADSENSE_STANDARD; ?></option>
|
998 |
+
<!-- <option value="<?php echo AI_ADSENSE_LINK; ?>"><?php echo AI_TEXT_LINK; ?></option>-->
|
999 |
<option value="<?php echo AI_ADSENSE_IN_ARTICLE; ?>"><?php echo AI_TEXT_IN_ARTICLE; ?></option>
|
1000 |
<option value="<?php echo AI_ADSENSE_IN_FEED; ?>"><?php echo AI_TEXT_IN_FEED; ?></option>
|
1001 |
<option value="<?php echo AI_ADSENSE_MATCHED_CONTENT; ?>"><?php echo AI_TEXT_MATCHED_CONTENT; ?></option>
|
1023 |
<option value="<?php echo AI_ADSENSE_AMP_ABOVE_THE_FOLD; ?>"><?php echo AI_TEXT_ABOVE_THE_FOLD; ?></option>
|
1024 |
<option value="<?php echo AI_ADSENSE_AMP_BELOW_THE_FOLD; ?>"><?php echo AI_TEXT_BELOW_THE_FOLD; ?></option>
|
1025 |
<option value="<?php echo AI_ADSENSE_AMP_STICKY; ?>"><?php echo AI_TEXT_STICKY_AMP; ?></option>
|
1026 |
+
<option value="<?php echo AI_ADSENSE_AMP_AUTO; ?>"><?php echo AI_TEXT_ADSENSE_AUTO; ?></option>
|
1027 |
</select>
|
1028 |
+
|
1029 |
+
<span style="width: 10%; padding-left: 10px;">
|
1030 |
+
<input type="checkbox" id="adsense-amp-block-on-consent-<?php echo $block; ?>" />
|
1031 |
+
<label for="adsense-amp-block-on-consent-<?php echo $block; ?>" style="display: inline-block;"><?php _e ('Block on consent', 'ad-inserter'); ?></label>
|
1032 |
+
</span>
|
1033 |
</td>
|
1034 |
</tr>
|
1035 |
|
1176 |
<td class="amazon-amp-data" style="width: 10%;">
|
1177 |
<input id="amazon-height-<?php echo $block; ?>" style="width: 100%;" type="text" size="8" maxlength="8" title="Amazon AMP ad height" />
|
1178 |
</td>
|
1179 |
+
<td class="amazon-amp-data" style="width: 10%; padding-left: 10px;">
|
1180 |
+
<input type="checkbox" id="amazon-amp-block-on-consent-<?php echo $block; ?>" />
|
1181 |
+
<label for="amazon-amp-block-on-consent-<?php echo $block; ?>" style="display: inline-block;"><?php _e ('Block on consent', 'ad-inserter'); ?></label>
|
1182 |
+
</td>
|
1183 |
+
<td style="width: 50%;">
|
1184 |
|
1185 |
</td>
|
1186 |
</tr>
|
3443 |
replace_blocked_image ('ai-info-3', 'info-3.jpg', 'block');
|
3444 |
replace_blocked_image ('ai-ez-1', 'ez-1.jpg', 'block');
|
3445 |
replace_blocked_image ('ai-ez-2', 'ez-2.jpg', 'block');
|
|
|
3446 |
replace_blocked_image ('ai-ez-3', 'ez-3.png', 'block');
|
3447 |
replace_blocked_image ('ai-ez-4', 'ez-4.png', 'block');
|
3448 |
replace_blocked_image ('ai-ez-5', 'ez-5.png', 'block');
|
3449 |
replace_blocked_image ('ai-ez-6', 'ez-6.png', 'block');
|
3450 |
+
replace_blocked_image ('ai-ez-7', 'ez-7.jpg', 'block');
|
3451 |
+
replace_blocked_image ('ai-ez-8', 'ez-8.jpg', 'block');
|
3452 |
replace_blocked_image ('ai-pro-1', 'icon-256x256.jpg', 'block');
|
3453 |
replace_blocked_image ('ai-pro-2', 'ai-charts-250.png', 'block');
|
3454 |
replace_blocked_image ('ai-pro-3', 'ai-countries-250.png', 'block');
|
4280 |
$devices = $obj->get_detection_server_side () || $obj->get_detection_client_side ();
|
4281 |
|
4282 |
$scheduling = $obj->get_scheduling() != AI_SCHEDULING_OFF;
|
4283 |
+
$scheduling_period = '';
|
4284 |
|
4285 |
switch ($obj->get_scheduling ()) {
|
4286 |
case AI_SCHEDULING_BETWEEN_DATES:
|
4291 |
$obj->get_schedule_weekdays (),
|
4292 |
$obj->get_scheduling () == AI_SCHEDULING_BETWEEN_DATES
|
4293 |
);
|
4294 |
+
$scheduling_period = $obj->get_schedule_start_date () . ($obj->get_schedule_start_time () != '' ? ' ' . $obj->get_schedule_start_time () : ''). '[BR]' . $obj->get_schedule_end_date () . ($obj->get_schedule_end_time () != '' ? ' ' . $obj->get_schedule_end_time () : '');
|
4295 |
break;
|
4296 |
default:
|
4297 |
$scheduling_period_inactive = false;
|
4382 |
<td style="min-width: 15px; text-align: center; padding-left: 5px; vertical-align: top;"><span class="<?php echo $process_php ? 'checkbox-icon size-img16 icon-php on' : ''; ?>" style="margin-top: 1px;"></span></td>
|
4383 |
<td style="min-width: 15px; text-align: center; padding-left: 5px; vertical-align: top; color: #66f;"><span class="<?php echo $exceptions ? 'dashicons dashicons-forms' : ''; ?>" style="font-size: 16px; width: 16px; height: 16px; margin-top: 1px;"></span></td>
|
4384 |
<td style="min-width: 15px; text-align: center; padding-left: 5px; vertical-align: top; color: #0df;"><span class="<?php echo $devices ? 'dashicons dashicons-desktop' : ''; ?>" style="font-size: 16px; width: 16px; height: 16px; margin-top: 1px;"></span></td>
|
4385 |
+
<td style="min-width: 15px; text-align: center; padding-left: 5px; vertical-align: top; color: <?php echo $scheduling_period_inactive ? '#e44' : '#00f'; ?>;" title="<?php echo $scheduling_period != '' ? $scheduling_period : ''; ?>"><?php echo $scheduling ? '⏰' : ''; ?></td>
|
4386 |
<?php
|
4387 |
if (function_exists ('get_global_tracking')) {
|
4388 |
?>
|
5075 |
<div style="clear: both;"></div>
|
5076 |
</div>
|
5077 |
<div class="ai-form rounded" style="height: 90px; padding: 8px 4px 8px 12px;">
|
5078 |
+
<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-8" src="<?php echo AD_INSERTER_PLUGIN_IMAGES_URL; ?>ez-8.jpg" /></a>
|
5079 |
</div>
|
5080 |
<?php
|
5081 |
break;
|
5289 |
<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>
|
5290 |
<!-- <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>-->
|
5291 |
<?php break; case 3: ?>
|
5292 |
+
<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>
|
5293 |
<?php break;
|
5294 |
} ?>
|
5295 |
</div>
|
5321 |
<?php switch ($version) {
|
5322 |
case 0: ?>
|
5323 |
<!-- <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>-->
|
5324 |
+
<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>
|
5325 |
<?php break; case 1: ?>
|
5326 |
<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>
|
5327 |
<!-- <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>-->
|