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

Version Description

  • Fix for urlencode error
  • Few other minor bug fixes
Download this release

Release Info

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

Code changes from version 2.3.11 to 2.3.12

ad-inserter.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  /*
4
  Plugin Name: Ad Inserter
5
- Version: 2.3.11
6
  Description: Ad management plugin with advanced advertising options to automatically insert ad codes on your website
7
  Author: Igor Funa
8
  Author URI: http://igorfuna.com/
@@ -13,6 +13,10 @@ Plugin URI: http://adinserter.pro/documentation
13
 
14
  Change Log
15
 
 
 
 
 
16
  Ad Inserter 2.3.11 - 2018-07-03
17
  - Added support for W3TC/client-side check for cookies (in url parameter list) to support showing ads based on visitor's cookie consent
18
  - Added support for W3TC/client-side check for referers
@@ -6524,7 +6528,9 @@ function check_url_parameter_list ($url_parameters, $white_list, $server_side_ch
6524
  } else $parameters = $_COOKIE;
6525
 
6526
  foreach ($parameters as $index => $parameter) {
6527
- $parameters [$index] = urlencode ($parameter);
 
 
6528
  }
6529
 
6530
  if ($parameter_list == AD_EMPTY_DATA || count ($parameters) == 0) {
2
 
3
  /*
4
  Plugin Name: Ad Inserter
5
+ Version: 2.3.12
6
  Description: Ad management plugin with advanced advertising options to automatically insert ad codes on your website
7
  Author: Igor Funa
8
  Author URI: http://igorfuna.com/
13
 
14
  Change Log
15
 
16
+ Ad Inserter 2.3.12 - 2018-07-04
17
+ - Fix for urlencode error
18
+ - Few other minor bug fixes
19
+
20
  Ad Inserter 2.3.11 - 2018-07-03
21
  - Added support for W3TC/client-side check for cookies (in url parameter list) to support showing ads based on visitor's cookie consent
22
  - Added support for W3TC/client-side check for referers
6528
  } else $parameters = $_COOKIE;
6529
 
6530
  foreach ($parameters as $index => $parameter) {
6531
+ if (is_string ($parameter)) {
6532
+ $parameters [$index] = urlencode ($parameter);
6533
+ }
6534
  }
6535
 
6536
  if ($parameter_list == AD_EMPTY_DATA || count ($parameters) == 0) {
constants.php CHANGED
@@ -24,7 +24,7 @@ if (!defined( 'AD_INSERTER_NAME'))
24
  define ('AD_INSERTER_NAME', 'Ad Inserter');
25
 
26
  if (!defined( 'AD_INSERTER_VERSION'))
27
- define ('AD_INSERTER_VERSION', '2.3.11');
28
 
29
  if (!defined ('AD_INSERTER_PLUGIN_BASENAME'))
30
  define ('AD_INSERTER_PLUGIN_BASENAME', plugin_basename (__FILE__));
24
  define ('AD_INSERTER_NAME', 'Ad Inserter');
25
 
26
  if (!defined( 'AD_INSERTER_VERSION'))
27
+ define ('AD_INSERTER_VERSION', '2.3.12');
28
 
29
  if (!defined ('AD_INSERTER_PLUGIN_BASENAME'))
30
  define ('AD_INSERTER_PLUGIN_BASENAME', plugin_basename (__FILE__));
css/ad-inserter.css CHANGED
@@ -1,5 +1,5 @@
1
  #ai-data {
2
- font-family: "2.3.11"; /* Used for version number of the file */
3
  }
4
 
5
  #blocked-warning {
1
  #ai-data {
2
+ font-family: "2.3.12"; /* Used for version number of the file */
3
  }
4
 
5
  #blocked-warning {
includes/js/ai-lists.js CHANGED
@@ -1,8 +1,8 @@
1
  jQuery (function ($) {
2
  function getHostName (url) {
3
- var match = url.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);
4
- if (match != null && match.length > 2 && typeof match[2] === 'string' && match[2].length > 0) {
5
- return match [2];
6
  } else {
7
  return null;
8
  }
1
  jQuery (function ($) {
2
  function getHostName (url) {
3
+ var match = url.match (/:\/\/(.[^/:]+)/i);
4
+ if (match != null && match.length > 1 && typeof match [1] === 'string' && match [1].length > 0) {
5
+ return match [1];
6
  } else {
7
  return null;
8
  }
includes/js/ai-lists.min.js CHANGED
@@ -1,7 +1,6 @@
1
- jQuery(function($){function getHostName(url){var match=url.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);if(match!=null&&match.length>2&&typeof match[2]==="string"&&match[2].length>0)return match[2];else return null}ai_process_lists=function(){var ai_debug=typeof ai_debugging!=="undefined";var cookies=document.cookie.split(";");var referrer=document.referrer;cookies.forEach(function(cookie,index){cookies[index]=cookie.trim()});if(referrer!="")referrer=getHostName(referrer);var ai_list_blocks=$("div.ai-list-data");
2
- if(ai_list_blocks.length)ai_list_blocks.each(function(){var enable_block=true;var referers_processed=false;var found=false;var referer_list=$(this).attr("referer-list");if(typeof referer_list!="undefined"){var referer_list_array=atob(referer_list).split(",");var referers_list_type=$(this).attr("referer-list-type");if(ai_debug)console.log("");if(ai_debug)console.log("AI LISTS referer: ",referrer);if(ai_debug)console.log("AI LISTS referer list:",atob(referer_list),referers_list_type);$.each(referer_list_array,
3
- function(index,list_referer){if(list_referer=="")return true;if(list_referer=="#"){if(referrer==""){found=true;return false}}else if(list_referer==referrer){found=true;return false}});switch(referers_list_type){case "B":if(found)enable_block=false;break;case "W":if(!found)enable_block=false;break}if(ai_debug)console.log("AI LISTS list found",found);if(ai_debug)console.log("AI LISTS list pass",enable_block);referers_processed=true}if(enable_block){var parameter_list=$(this).attr("parameter-list");
4
- if(typeof parameter_list!="undefined"){var parameter_list_array=atob(parameter_list).split(",");var parameter_list_type=$(this).attr("parameter-list-type");if(ai_debug&&referers_processed)console.log("");if(ai_debug)console.log("AI LISTS cookies: ",cookies);if(ai_debug)console.log("AI LISTS parameter list:",atob(parameter_list),parameter_list_type);var found=false;$.each(parameter_list_array,function(index,list_parameter){if(list_parameter.indexOf("=")!=-1){if(cookies.indexOf(list_parameter)!=
5
- -1){found=true;return false}}else cookies.forEach(function(cookie){var cookie_data=cookie.split("=");if(list_parameter==cookie_data[0]){found=true;return false}})});switch(parameter_list_type){case "B":if(found)enable_block=false;break;case "W":if(!found)enable_block=false;break}if(ai_debug)console.log("AI LISTS list found",found);if(ai_debug)console.log("AI LISTS list pass",enable_block)}}$(this).css({"visibility":"","position":"","width":"","height":"","z-index":""}).removeClass("ai-list-data");
6
- var block_wrapping_div=$(this).closest("div.ai-list-block");block_wrapping_div.css({"visibility":"","position":"","z-index":""}).removeClass("ai-list-block");block_wrapping_div.find(".ai-debug-name.ai-list-info").text(referrer);block_wrapping_div.find(".ai-debug-name.ai-list-status").text(enable_block?"VISIBLE":"HIDDEN");if(!enable_block)$(this).hide();else if(typeof $(this).data("code")!="undefined"){var block_code=atob($(this).data("code"));$(this).append(block_code);if(!ai_debug)$(this).attr("data-code",
7
- "")}})};$(document).ready(function($){setTimeout(function(){ai_process_lists()},5)})});
1
+ jQuery(function($){function getHostName(url){var match=url.match(/:\/\/(.[^/:]+)/i);if(match!=null&&match.length>1&&typeof match[1]==="string"&&match[1].length>0)return match[1];else return null}ai_process_lists=function(){var ai_debug=typeof ai_debugging!=="undefined";var cookies=document.cookie.split(";");var referrer=document.referrer;cookies.forEach(function(cookie,index){cookies[index]=cookie.trim()});if(referrer!="")referrer=getHostName(referrer);var ai_list_blocks=$("div.ai-list-data");if(ai_list_blocks.length)ai_list_blocks.each(function(){var enable_block=
2
+ true;var referers_processed=false;var found=false;var referer_list=$(this).attr("referer-list");if(typeof referer_list!="undefined"){var referer_list_array=atob(referer_list).split(",");var referers_list_type=$(this).attr("referer-list-type");if(ai_debug)console.log("");if(ai_debug)console.log("AI LISTS referer: ",referrer);if(ai_debug)console.log("AI LISTS referer list:",atob(referer_list),referers_list_type);$.each(referer_list_array,function(index,list_referer){if(list_referer=="")return true;
3
+ if(list_referer=="#"){if(referrer==""){found=true;return false}}else if(list_referer==referrer){found=true;return false}});switch(referers_list_type){case "B":if(found)enable_block=false;break;case "W":if(!found)enable_block=false;break}if(ai_debug)console.log("AI LISTS list found",found);if(ai_debug)console.log("AI LISTS list pass",enable_block);referers_processed=true}if(enable_block){var parameter_list=$(this).attr("parameter-list");if(typeof parameter_list!="undefined"){var parameter_list_array=
4
+ atob(parameter_list).split(",");var parameter_list_type=$(this).attr("parameter-list-type");if(ai_debug&&referers_processed)console.log("");if(ai_debug)console.log("AI LISTS cookies: ",cookies);if(ai_debug)console.log("AI LISTS parameter list:",atob(parameter_list),parameter_list_type);var found=false;$.each(parameter_list_array,function(index,list_parameter){if(list_parameter.indexOf("=")!=-1){if(cookies.indexOf(list_parameter)!=-1){found=true;return false}}else cookies.forEach(function(cookie){var cookie_data=
5
+ cookie.split("=");if(list_parameter==cookie_data[0]){found=true;return false}})});switch(parameter_list_type){case "B":if(found)enable_block=false;break;case "W":if(!found)enable_block=false;break}if(ai_debug)console.log("AI LISTS list found",found);if(ai_debug)console.log("AI LISTS list pass",enable_block)}}$(this).css({"visibility":"","position":"","width":"","height":"","z-index":""}).removeClass("ai-list-data");var block_wrapping_div=$(this).closest("div.ai-list-block");block_wrapping_div.css({"visibility":"",
6
+ "position":"","z-index":""}).removeClass("ai-list-block");block_wrapping_div.find(".ai-debug-name.ai-list-info").text(referrer);block_wrapping_div.find(".ai-debug-name.ai-list-status").text(enable_block?"VISIBLE":"HIDDEN");if(!enable_block)$(this).hide();else if(typeof $(this).data("code")!="undefined"){var block_code=atob($(this).data("code"));$(this).append(block_code);if(!ai_debug)$(this).attr("data-code","")}})};$(document).ready(function($){setTimeout(function(){ai_process_lists()},5)})});
 
js/ad-inserter.js CHANGED
@@ -1,4 +1,4 @@
1
- var javascript_version = "2.3.11";
2
  var ignore_key = true;
3
  var start = 1;
4
  var end = 16;
1
+ var javascript_version = "2.3.12";
2
  var ignore_key = true;
3
  var start = 1;
4
  var end = 16;
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: ads, adsense, header footer code, ad management, sticky fixed widgets, adv
6
  Requires at least: 4.0
7
  Tested up to: 4.9
8
  Requires PHP: 5.6
9
- Stable tag: 2.3.10
10
  License: GPLv3
11
 
12
  Insert and manage ads: Amazon, Google AdSense ads, banner rotation, sticky widget ads, AMP, PHP, HTML, CSS, Javascript, tracking, footer, header code
@@ -669,6 +669,10 @@ AD CODE RIGHT
669
 
670
  == Changelog ==
671
 
 
 
 
 
672
  = 2.3.11 =
673
  - Added support for W3TC/client-side check for cookies (in url parameter list) to support showing ads based on visitor's cookie consent
674
  - Added support for W3TC/client-side check for referers
@@ -746,6 +750,10 @@ For the changelog of earlier versions, please refer to the separate changelog.tx
746
 
747
  == Upgrade Notice ==
748
 
 
 
 
 
749
  = 2.3.11 =
750
  Added support for W3TC/client-side check for cookies (in url parameter list) to support showing ads based on visitor's cookie consent;
751
  Added support for W3TC/client-side check for referers;
6
  Requires at least: 4.0
7
  Tested up to: 4.9
8
  Requires PHP: 5.6
9
+ Stable tag: 2.3.11
10
  License: GPLv3
11
 
12
  Insert and manage ads: Amazon, Google AdSense ads, banner rotation, sticky widget ads, AMP, PHP, HTML, CSS, Javascript, tracking, footer, header code
669
 
670
  == Changelog ==
671
 
672
+ = 2.3.12 =
673
+ - Fix for urlencode error
674
+ - Few other minor bug fixes
675
+
676
  = 2.3.11 =
677
  - Added support for W3TC/client-side check for cookies (in url parameter list) to support showing ads based on visitor's cookie consent
678
  - Added support for W3TC/client-side check for referers
750
 
751
  == Upgrade Notice ==
752
 
753
+ = 2.3.12 =
754
+ Fix for urlencode error;
755
+ Few other minor bug fixes
756
+
757
  = 2.3.11 =
758
  Added support for W3TC/client-side check for cookies (in url parameter list) to support showing ads based on visitor's cookie consent;
759
  Added support for W3TC/client-side check for referers;