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

Version Description

  • Fixed bug for disabled settings page on multisite blogs
Download this release

Release Info

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

Code changes from version 2.1.1 to 2.1.2

Files changed (5) hide show
  1. ad-inserter.php +11 -6
  2. constants.php +1 -1
  3. css/ad-inserter.css +1 -1
  4. js/ad-inserter.js +1 -1
  5. readme.txt +7 -1
ad-inserter.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: Ad Inserter
4
- Version: 2.1.1
5
  Description: Insert any ad or code into Wordpress. Perfect for all kinds of ads. Simply enter any ad or HTML/Javascript/PHP code and select where and how you want to display it.
6
  Author: Igor Funa
7
  Author URI: http://igorfuna.com/
@@ -11,6 +11,9 @@ Plugin URI: http://adinserter.pro/documentation
11
  /*
12
  Change Log
13
 
 
 
 
14
  Ad Inserter 2.1.1 - 26 February 2017
15
  - Changes for compatibility with PHP 7.1
16
  - Automatic rename of old pro plugin slug (Pro only)
@@ -1942,6 +1945,7 @@ function multisite_settings_page_enabled () {
1942
 
1943
  if (is_multisite()) {
1944
  if (!isset ($ai_db_options_multisite ['MULTISITE_SETTINGS_PAGE'])) $ai_db_options_multisite ['MULTISITE_SETTINGS_PAGE'] = DEFAULT_MULTISITE_SETTINGS_PAGE;
 
1945
 
1946
  if (multisite_main_for_all_blogs ()) $ai_db_options_multisite ['MULTISITE_SETTINGS_PAGE'] = AD_SETTINGS_NOT_CHECKED;
1947
 
@@ -1956,6 +1960,7 @@ function multisite_widgets_enabled () {
1956
 
1957
  if (is_multisite()) {
1958
  if (!isset ($ai_db_options_multisite ['MULTISITE_WIDGETS'])) $ai_db_options_multisite ['MULTISITE_WIDGETS'] = DEFAULT_MULTISITE_WIDGETS;
 
1959
 
1960
  return ($ai_db_options_multisite ['MULTISITE_WIDGETS']);
1961
  }
@@ -1968,6 +1973,7 @@ function multisite_php_processing () {
1968
 
1969
  if (is_multisite()) {
1970
  if (!isset ($ai_db_options_multisite ['MULTISITE_PHP_PROCESSING'])) $ai_db_options_multisite ['MULTISITE_PHP_PROCESSING'] = DEFAULT_MULTISITE_PHP_PROCESSING;
 
1971
 
1972
  return ($ai_db_options_multisite ['MULTISITE_PHP_PROCESSING']);
1973
  }
@@ -1980,6 +1986,7 @@ function multisite_exceptions_enabled () {
1980
 
1981
  if (is_multisite()) {
1982
  if (!isset ($ai_db_options_multisite ['MULTISITE_EXCEPTIONS'])) $ai_db_options_multisite ['MULTISITE_EXCEPTIONS'] = DEFAULT_MULTISITE_EXCEPTIONS;
 
1983
 
1984
  return ($ai_db_options_multisite ['MULTISITE_EXCEPTIONS']);
1985
  }
@@ -1992,6 +1999,7 @@ function multisite_main_for_all_blogs () {
1992
 
1993
  if (is_multisite()) {
1994
  if (!isset ($ai_db_options_multisite ['MULTISITE_MAIN_FOR_ALL_BLOGS'])) $ai_db_options_multisite ['MULTISITE_MAIN_FOR_ALL_BLOGS'] = DEFAULT_MULTISITE_MAIN_FOR_ALL_BLOGS;
 
1995
 
1996
  return ($ai_db_options_multisite ['MULTISITE_MAIN_FOR_ALL_BLOGS']);
1997
  }
@@ -2419,11 +2427,8 @@ function ai_settings () {
2419
  // Multisite
2420
  if (is_multisite () && is_main_site ()) {
2421
  $options = array ();
2422
- $options ['MULTISITE_SETTINGS_PAGE'] = filter_option ('multisite_settings_page', $_POST ['multisite_settings_page']);
2423
- $options ['MULTISITE_WIDGETS'] = filter_option ('multisite_widgets', $_POST ['multisite_widgets']);
2424
- $options ['MULTISITE_PHP_PROCESSING'] = filter_option ('multisite_php_processing', $_POST ['multisite_php_processing']);
2425
- $options ['MULTISITE_EXCEPTIONS'] = filter_option ('multisite_exceptions', $_POST ['multisite_exceptions']);
2426
- $options ['MULTISITE_MAIN_FOR_ALL_BLOGS'] = filter_option ('multisite_main_for_all_blogs', $_POST ['multisite_main_for_all_blogs']);
2427
 
2428
  ai_check_multisite_options ($options);
2429
  update_site_option (WP_OPTION_NAME, $options);
1
  <?php
2
  /*
3
  Plugin Name: Ad Inserter
4
+ Version: 2.1.2
5
  Description: Insert any ad or code into Wordpress. Perfect for all kinds of ads. Simply enter any ad or HTML/Javascript/PHP code and select where and how you want to display it.
6
  Author: Igor Funa
7
  Author URI: http://igorfuna.com/
11
  /*
12
  Change Log
13
 
14
+ Ad Inserter 2.1.2 - 1 March 2017
15
+ - Fixed bug for disabled settings page on multisite blogs
16
+
17
  Ad Inserter 2.1.1 - 26 February 2017
18
  - Changes for compatibility with PHP 7.1
19
  - Automatic rename of old pro plugin slug (Pro only)
1945
 
1946
  if (is_multisite()) {
1947
  if (!isset ($ai_db_options_multisite ['MULTISITE_SETTINGS_PAGE'])) $ai_db_options_multisite ['MULTISITE_SETTINGS_PAGE'] = DEFAULT_MULTISITE_SETTINGS_PAGE;
1948
+ if ($ai_db_options_multisite ['MULTISITE_SETTINGS_PAGE'] == '') $ai_db_options_multisite ['MULTISITE_SETTINGS_PAGE'] = DEFAULT_MULTISITE_SETTINGS_PAGE;
1949
 
1950
  if (multisite_main_for_all_blogs ()) $ai_db_options_multisite ['MULTISITE_SETTINGS_PAGE'] = AD_SETTINGS_NOT_CHECKED;
1951
 
1960
 
1961
  if (is_multisite()) {
1962
  if (!isset ($ai_db_options_multisite ['MULTISITE_WIDGETS'])) $ai_db_options_multisite ['MULTISITE_WIDGETS'] = DEFAULT_MULTISITE_WIDGETS;
1963
+ if ($ai_db_options_multisite ['MULTISITE_WIDGETS'] == '') $ai_db_options_multisite ['MULTISITE_WIDGETS'] = DEFAULT_MULTISITE_WIDGETS;
1964
 
1965
  return ($ai_db_options_multisite ['MULTISITE_WIDGETS']);
1966
  }
1973
 
1974
  if (is_multisite()) {
1975
  if (!isset ($ai_db_options_multisite ['MULTISITE_PHP_PROCESSING'])) $ai_db_options_multisite ['MULTISITE_PHP_PROCESSING'] = DEFAULT_MULTISITE_PHP_PROCESSING;
1976
+ if ($ai_db_options_multisite ['MULTISITE_PHP_PROCESSING'] == '') $ai_db_options_multisite ['MULTISITE_PHP_PROCESSING'] = DEFAULT_MULTISITE_PHP_PROCESSING;
1977
 
1978
  return ($ai_db_options_multisite ['MULTISITE_PHP_PROCESSING']);
1979
  }
1986
 
1987
  if (is_multisite()) {
1988
  if (!isset ($ai_db_options_multisite ['MULTISITE_EXCEPTIONS'])) $ai_db_options_multisite ['MULTISITE_EXCEPTIONS'] = DEFAULT_MULTISITE_EXCEPTIONS;
1989
+ if ($ai_db_options_multisite ['MULTISITE_EXCEPTIONS'] == '') $ai_db_options_multisite ['MULTISITE_EXCEPTIONS'] = DEFAULT_MULTISITE_EXCEPTIONS;
1990
 
1991
  return ($ai_db_options_multisite ['MULTISITE_EXCEPTIONS']);
1992
  }
1999
 
2000
  if (is_multisite()) {
2001
  if (!isset ($ai_db_options_multisite ['MULTISITE_MAIN_FOR_ALL_BLOGS'])) $ai_db_options_multisite ['MULTISITE_MAIN_FOR_ALL_BLOGS'] = DEFAULT_MULTISITE_MAIN_FOR_ALL_BLOGS;
2002
+ if ($ai_db_options_multisite ['MULTISITE_MAIN_FOR_ALL_BLOGS'] == '') $ai_db_options_multisite ['MULTISITE_MAIN_FOR_ALL_BLOGS'] = DEFAULT_MULTISITE_MAIN_FOR_ALL_BLOGS;
2003
 
2004
  return ($ai_db_options_multisite ['MULTISITE_MAIN_FOR_ALL_BLOGS']);
2005
  }
2427
  // Multisite
2428
  if (is_multisite () && is_main_site ()) {
2429
  $options = array ();
2430
+
2431
+ if (function_exists ('ai_filter_multisite_settings')) ai_filter_multisite_settings ($options);
 
 
 
2432
 
2433
  ai_check_multisite_options ($options);
2434
  update_site_option (WP_OPTION_NAME, $options);
constants.php CHANGED
@@ -14,7 +14,7 @@ if (!defined( 'AD_INSERTER_NAME'))
14
  define ('AD_INSERTER_NAME', 'Ad Inserter');
15
 
16
  if (!defined( 'AD_INSERTER_VERSION'))
17
- define ('AD_INSERTER_VERSION', '2.1.1');
18
 
19
  if (!defined ('AD_INSERTER_PLUGIN_BASENAME'))
20
  define ('AD_INSERTER_PLUGIN_BASENAME', plugin_basename (__FILE__));
14
  define ('AD_INSERTER_NAME', 'Ad Inserter');
15
 
16
  if (!defined( 'AD_INSERTER_VERSION'))
17
+ define ('AD_INSERTER_VERSION', '2.1.2');
18
 
19
  if (!defined ('AD_INSERTER_PLUGIN_BASENAME'))
20
  define ('AD_INSERTER_PLUGIN_BASENAME', plugin_basename (__FILE__));
css/ad-inserter.css CHANGED
@@ -1,5 +1,5 @@
1
  #data {
2
- font-family: "2.1.1"; /* Used for version number of the file */
3
  }
4
 
5
  #blocked-warning {
1
  #data {
2
+ font-family: "2.1.2"; /* 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.1";
2
  var ignore_key = true;
3
  var start = 1;
4
  var end = 16;
1
+ var javascript_version = "2.1.2";
2
  var ignore_key = true;
3
  var start = 1;
4
  var end = 16;
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: adsense, amazon, advertising, ad, advert, html, javascript, php, code, widget, sidebar, responsive, viewport, rotating, banner, ad rotation, geo targeting, multisite, contextual, shortcodes, widgets, header, footer, mobile, desktop, phone, tablet, custom css, category, tag, filter, url, caching support
5
  Requires at least: 4.0
6
  Tested up to: 4.7.2
7
- Stable tag: 2.1.0
8
  License: GPLv3
9
 
10
  Insert any advert or code into Wordpress. Perfect for all kinds of banners and ads including AdSense and Amazon. Powerful features, simple use.
@@ -675,6 +675,9 @@ AD CODE RIGHT
675
 
676
  == Changelog ==
677
 
 
 
 
678
  = 2.1.1 =
679
  - Changes for compatibility with PHP 7.1
680
  - Automatic rename of old pro plugin slug (Pro only)
@@ -1004,6 +1007,9 @@ AD CODE RIGHT
1004
 
1005
  == Upgrade Notice ==
1006
 
 
 
 
1007
  = 2.1.1 =
1008
  Changes for compatibility with PHP 7.1;
1009
  Few bug fixes and cosmetic changes
4
  Tags: adsense, amazon, advertising, ad, advert, html, javascript, php, code, widget, sidebar, responsive, viewport, rotating, banner, ad rotation, geo targeting, multisite, contextual, shortcodes, widgets, header, footer, mobile, desktop, phone, tablet, custom css, category, tag, filter, url, caching support
5
  Requires at least: 4.0
6
  Tested up to: 4.7.2
7
+ Stable tag: 2.1.1
8
  License: GPLv3
9
 
10
  Insert any advert or code into Wordpress. Perfect for all kinds of banners and ads including AdSense and Amazon. Powerful features, simple use.
675
 
676
  == Changelog ==
677
 
678
+ = 2.1.2 =
679
+ - Fixed bug for disabled settings page on multisite blogs
680
+
681
  = 2.1.1 =
682
  - Changes for compatibility with PHP 7.1
683
  - Automatic rename of old pro plugin slug (Pro only)
1007
 
1008
  == Upgrade Notice ==
1009
 
1010
+ = 2.1.2 =
1011
+ Fixed bug for disabled settings page on multisite blogs
1012
+
1013
  = 2.1.1 =
1014
  Changes for compatibility with PHP 7.1;
1015
  Few bug fixes and cosmetic changes