Version Description
- Fix for error when using older PHP versions (prior to 5.5)
Download this release
Release Info
Developer | spacetime |
Plugin | Ad Inserter – WordPress Ads Management with AdSense Header Integration |
Version | 2.1.14 |
Comparing to | |
See all releases |
Code changes from version 2.1.13 to 2.1.14
- ad-inserter.php +34 -4
- class.php +1 -1
- constants.php +1 -1
- css/ad-inserter.css +1 -1
- js/ad-inserter.js +1 -1
- preview-adb.php +3 -3
- readme.txt +7 -1
- settings.php +1 -1
ad-inserter.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Ad Inserter
|
4 |
-
Version: 2.1.
|
5 |
Description: Ad management plugin with advanced advertising options to automatically insert ad codes into your website.
|
6 |
Author: Igor Funa
|
7 |
Author URI: http://igorfuna.com/
|
@@ -12,6 +12,9 @@ Plugin URI: http://adinserter.pro/documentation
|
|
12 |
|
13 |
Change Log
|
14 |
|
|
|
|
|
|
|
15 |
Ad Inserter 2.1.13 - 2017-08-07
|
16 |
- Fix for Fatal error: Can't use method return value in write context
|
17 |
|
@@ -586,9 +589,6 @@ add_filter ('plugin_row_meta', 'ai_set_plugin_meta', 10, 2);
|
|
586 |
add_action ('wp_ajax_ai_data', 'ai_data');
|
587 |
add_action ('wp_ajax_nopriv_ai_data', 'ai_data');
|
588 |
|
589 |
-
if ($ai_wp_data [AI_TRACKING]) {
|
590 |
-
add_filter ('nonce_life', function () {return 48 * 3600;});
|
591 |
-
}
|
592 |
|
593 |
if (($ai_wp_data [AI_WP_DEBUGGING] & AI_DEBUG_PROCESSING) != 0) {
|
594 |
$ai_total_plugin_time += microtime (true) - $start_time;
|
@@ -1255,6 +1255,11 @@ function ai_adb_code () {
|
|
1255 |
|
1256 |
$('div.ai-adb-hide').each (function () {
|
1257 |
$(this).css ({'display': 'none', 'visibility': 'hidden'});
|
|
|
|
|
|
|
|
|
|
|
1258 |
});
|
1259 |
});
|
1260 |
|
@@ -1265,6 +1270,7 @@ function ai_adb_code () {
|
|
1265 |
}
|
1266 |
}
|
1267 |
|
|
|
1268 |
var ai_adb_undetected = function(n) {
|
1269 |
ai_adb_counter ++;
|
1270 |
if (ai_adb_debugging) console.log ('AI ad blocking not detected', n, '- counter:', ai_adb_counter);
|
@@ -1288,6 +1294,30 @@ function ai_adb_code () {
|
|
1288 |
// }
|
1289 |
// }
|
1290 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1291 |
}
|
1292 |
}
|
1293 |
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Ad Inserter
|
4 |
+
Version: 2.1.14
|
5 |
Description: Ad management plugin with advanced advertising options to automatically insert ad codes into your website.
|
6 |
Author: Igor Funa
|
7 |
Author URI: http://igorfuna.com/
|
12 |
|
13 |
Change Log
|
14 |
|
15 |
+
Ad Inserter 2.1.14 - 2017-08-07
|
16 |
+
- Fix for error when using older PHP versions (prior to 5.5)
|
17 |
+
|
18 |
Ad Inserter 2.1.13 - 2017-08-07
|
19 |
- Fix for Fatal error: Can't use method return value in write context
|
20 |
|
589 |
add_action ('wp_ajax_ai_data', 'ai_data');
|
590 |
add_action ('wp_ajax_nopriv_ai_data', 'ai_data');
|
591 |
|
|
|
|
|
|
|
592 |
|
593 |
if (($ai_wp_data [AI_WP_DEBUGGING] & AI_DEBUG_PROCESSING) != 0) {
|
594 |
$ai_total_plugin_time += microtime (true) - $start_time;
|
1255 |
|
1256 |
$('div.ai-adb-hide').each (function () {
|
1257 |
$(this).css ({'display': 'none', 'visibility': 'hidden'});
|
1258 |
+
|
1259 |
+
if (ai_adb_debugging) {
|
1260 |
+
var debug_info = $(this).attr ('data');
|
1261 |
+
console.log ('AI ad blocking HIDE', typeof debug_info != 'undefined' ? debug_info : '');
|
1262 |
+
}
|
1263 |
});
|
1264 |
});
|
1265 |
|
1270 |
}
|
1271 |
}
|
1272 |
|
1273 |
+
|
1274 |
var ai_adb_undetected = function(n) {
|
1275 |
ai_adb_counter ++;
|
1276 |
if (ai_adb_debugging) console.log ('AI ad blocking not detected', n, '- counter:', ai_adb_counter);
|
1294 |
// }
|
1295 |
// }
|
1296 |
|
1297 |
+
(function ($) {
|
1298 |
+
$(window).ready(function () {
|
1299 |
+
if (ai_adb_debugging) console.log ('AI ad blocking NOT DETECTED block actions');
|
1300 |
+
|
1301 |
+
$('div.ai-adb-hide').each (function () {
|
1302 |
+
$(this).css ({'display': 'block', 'visibility': 'visible'});
|
1303 |
+
|
1304 |
+
if (ai_adb_debugging) {
|
1305 |
+
var debug_info = $(this).attr ('data');
|
1306 |
+
console.log ('AI ad blocking SHOW', typeof debug_info != 'undefined' ? debug_info : '');
|
1307 |
+
}
|
1308 |
+
});
|
1309 |
+
|
1310 |
+
$('div.ai-adb-show').each (function () {
|
1311 |
+
$(this).css ({'display': 'none', 'visibility': 'hidden'});
|
1312 |
+
|
1313 |
+
if (ai_adb_debugging) {
|
1314 |
+
var debug_info = $(this).attr ('data');
|
1315 |
+
console.log ('AI ad blocking HIDE', typeof debug_info != 'undefined' ? debug_info : '');
|
1316 |
+
}
|
1317 |
+
});
|
1318 |
+
});
|
1319 |
+
});
|
1320 |
+
|
1321 |
}
|
1322 |
}
|
1323 |
|
class.php
CHANGED
@@ -1172,7 +1172,7 @@ abstract class ai_CodeBlock extends ai_BaseCodeBlock {
|
|
1172 |
|
1173 |
if (defined ('AI_ADBLOCKING_DETECTION') && AI_ADBLOCKING_DETECTION) {
|
1174 |
|
1175 |
-
$adb_action =
|
1176 |
switch ($adb_action) {
|
1177 |
case 1: // Replacement ad
|
1178 |
|
1172 |
|
1173 |
if (defined ('AI_ADBLOCKING_DETECTION') && AI_ADBLOCKING_DETECTION) {
|
1174 |
|
1175 |
+
$adb_action = 2;
|
1176 |
switch ($adb_action) {
|
1177 |
case 1: // Replacement ad
|
1178 |
|
constants.php
CHANGED
@@ -17,7 +17,7 @@ if (!defined( 'AD_INSERTER_NAME'))
|
|
17 |
define ('AD_INSERTER_NAME', 'Ad Inserter');
|
18 |
|
19 |
if (!defined( 'AD_INSERTER_VERSION'))
|
20 |
-
define ('AD_INSERTER_VERSION', '2.1.
|
21 |
|
22 |
if (!defined ('AD_INSERTER_PLUGIN_BASENAME'))
|
23 |
define ('AD_INSERTER_PLUGIN_BASENAME', plugin_basename (__FILE__));
|
17 |
define ('AD_INSERTER_NAME', 'Ad Inserter');
|
18 |
|
19 |
if (!defined( 'AD_INSERTER_VERSION'))
|
20 |
+
define ('AD_INSERTER_VERSION', '2.1.14');
|
21 |
|
22 |
if (!defined ('AD_INSERTER_PLUGIN_BASENAME'))
|
23 |
define ('AD_INSERTER_PLUGIN_BASENAME', plugin_basename (__FILE__));
|
css/ad-inserter.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
#ai-data {
|
2 |
-
font-family: "2.1.
|
3 |
}
|
4 |
|
5 |
#blocked-warning {
|
1 |
#ai-data {
|
2 |
+
font-family: "2.1.14"; /* Used for version number of the file */
|
3 |
}
|
4 |
|
5 |
#blocked-warning {
|
js/ad-inserter.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
var javascript_version = "2.1.
|
2 |
var ignore_key = true;
|
3 |
var start = 1;
|
4 |
var end = 16;
|
1 |
+
var javascript_version = "2.1.14";
|
2 |
var ignore_key = true;
|
3 |
var start = 1;
|
4 |
var end = 16;
|
preview-adb.php
CHANGED
@@ -306,9 +306,9 @@ input[type="button"] {
|
|
306 |
$error_reporting = error_reporting ();
|
307 |
error_reporting ($error_reporting & ~E_NOTICE);
|
308 |
|
309 |
-
\_WP_Editors::enqueue_scripts();
|
310 |
-
print_footer_scripts ();
|
311 |
-
\_WP_Editors::editor_js();
|
312 |
|
313 |
error_reporting ($error_reporting);
|
314 |
|
306 |
$error_reporting = error_reporting ();
|
307 |
error_reporting ($error_reporting & ~E_NOTICE);
|
308 |
|
309 |
+
// \_WP_Editors::enqueue_scripts();
|
310 |
+
// print_footer_scripts ();
|
311 |
+
// \_WP_Editors::editor_js();
|
312 |
|
313 |
error_reporting ($error_reporting);
|
314 |
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
5 |
Tags: ads, adsense, ad management, advertising manager, advanced contextual ads, ad rotation, adverts, widgets, amazon, banners, automatic insertion, amp, geo targeting, multisite, shortcodes, PHP, Javascript, HTML, header, footer, tracking, sticky, taxonomy, term, custom post
|
6 |
Requires at least: 4.0
|
7 |
Tested up to: 4.8
|
8 |
-
Stable tag: 2.1.
|
9 |
License: GPLv3
|
10 |
|
11 |
Ad management plugin: AdSense, Amazon ads, banners, ad rotation, sticky widgets, shortcodes, AMP, PHP, HTML, CSS, form, tracking, header, footer code
|
@@ -720,6 +720,9 @@ AD CODE RIGHT
|
|
720 |
|
721 |
== Changelog ==
|
722 |
|
|
|
|
|
|
|
723 |
= 2.1.13 =
|
724 |
- Fix for Fatal error: Can't use method return value in write context
|
725 |
|
@@ -965,6 +968,9 @@ AD CODE RIGHT
|
|
965 |
|
966 |
== Upgrade Notice ==
|
967 |
|
|
|
|
|
|
|
968 |
= 2.1.13 =
|
969 |
Fix for Fatal error: Can't use method return value in write context
|
970 |
|
5 |
Tags: ads, adsense, ad management, advertising manager, advanced contextual ads, ad rotation, adverts, widgets, amazon, banners, automatic insertion, amp, geo targeting, multisite, shortcodes, PHP, Javascript, HTML, header, footer, tracking, sticky, taxonomy, term, custom post
|
6 |
Requires at least: 4.0
|
7 |
Tested up to: 4.8
|
8 |
+
Stable tag: 2.1.13
|
9 |
License: GPLv3
|
10 |
|
11 |
Ad management plugin: AdSense, Amazon ads, banners, ad rotation, sticky widgets, shortcodes, AMP, PHP, HTML, CSS, form, tracking, header, footer code
|
720 |
|
721 |
== Changelog ==
|
722 |
|
723 |
+
= 2.1.14 =
|
724 |
+
- Fix for error when using older PHP versions (prior to 5.5)
|
725 |
+
|
726 |
= 2.1.13 =
|
727 |
- Fix for Fatal error: Can't use method return value in write context
|
728 |
|
968 |
|
969 |
== Upgrade Notice ==
|
970 |
|
971 |
+
= 2.1.14 =
|
972 |
+
Fix for error when using older PHP versions (prior to 5.5)
|
973 |
+
|
974 |
= 2.1.13 =
|
975 |
Fix for Fatal error: Can't use method return value in write context
|
976 |
|
settings.php
CHANGED
@@ -929,7 +929,7 @@ function generate_settings_form (){
|
|
929 |
</span>
|
930 |
<span style="display: table-cell; width: 1px; white-space: nowrap;">
|
931 |
|
932 |
-
Max <input type="text" style="width:
|
933 |
</span>
|
934 |
<span style="display: table-cell; width: 1px; white-space: nowrap;">
|
935 |
<input type="hidden" name="<?php echo AI_OPTION_ENABLE_AJAX, WP_FORM_FIELD_POSTFIX, $ad_number; ?>" value="0" />
|
929 |
</span>
|
930 |
<span style="display: table-cell; width: 1px; white-space: nowrap;">
|
931 |
|
932 |
+
Max <input type="text" style="width: 32px;" name="<?php echo AI_OPTION_MAXIMUM_INSERTIONS, WP_FORM_FIELD_POSTFIX, $ad_number; ?>" default="<?php echo $default->get_maximum_insertions (); ?>" value="<?php echo $obj->get_maximum_insertions (); ?>" size="1" maxlength="3" title="Empty or 0 means no limit" /> insertions
|
933 |
</span>
|
934 |
<span style="display: table-cell; width: 1px; white-space: nowrap;">
|
935 |
<input type="hidden" name="<?php echo AI_OPTION_ENABLE_AJAX, WP_FORM_FIELD_POSTFIX, $ad_number; ?>" value="0" />
|