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

Version Description

  • Fix for mobile admin layout
  • 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.2.2
Comparing to
See all releases

Code changes from version 2.2.1 to 2.2.2

ad-inserter.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: Ad Inserter
4
- Version: 2.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,10 @@ Plugin URI: http://adinserter.pro/documentation
12
 
13
  Change Log
14
 
 
 
 
 
15
  Ad Inserter 2.2.1 - 2017-08-27
16
  - Fix for header/footer scripts on AMP pages
17
 
@@ -1089,14 +1093,16 @@ function ai_admin_menu_hook () {
1089
 
1090
  $ai_settings_page = add_submenu_page ('options-general.php', AD_INSERTER_NAME.' Options', AD_INSERTER_NAME, 'manage_options', basename(__FILE__), 'ai_settings');
1091
  add_action ('admin_enqueue_scripts', 'ai_admin_enqueue_scripts');
1092
- add_action ('admin_head', 'ai_admin_head' );
1093
  add_filter ('clean_url', 'ai_clean_url', 999999, 2);
1094
  }
1095
 
1096
  function ai_admin_head () {
1097
- if (wp_is_mobile()) {
1098
- echo "<meta name='viewport' content='width=762'>\n";
1099
- }
 
 
1100
  }
1101
 
1102
  function ai_admin_enqueue_scripts ($hook_suffix) {
@@ -1396,7 +1402,7 @@ function ai_admin_notice_hook () {
1396
  // }
1397
 
1398
  if (function_exists ('ai_admin_notices')) ai_admin_notices (); else {
1399
- if (!wp_is_mobile () && is_super_admin ()) {
1400
 
1401
  if ((get_option ('ai-notice-review') === false && $ai_db_options_extract [AI_EXTRACT_USED_BLOCKS] >= 6 && $ai_wp_data [AI_DAYS_SINCE_INSTAL] > 10) ||
1402
 
1
  <?php
2
  /*
3
  Plugin Name: Ad Inserter
4
+ Version: 2.2.2
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.2.2 - 2017-08-28
16
+ - Fix for mobile admin layout
17
+ - Few other minor bug fixes
18
+
19
  Ad Inserter 2.2.1 - 2017-08-27
20
  - Fix for header/footer scripts on AMP pages
21
 
1093
 
1094
  $ai_settings_page = add_submenu_page ('options-general.php', AD_INSERTER_NAME.' Options', AD_INSERTER_NAME, 'manage_options', basename(__FILE__), 'ai_settings');
1095
  add_action ('admin_enqueue_scripts', 'ai_admin_enqueue_scripts');
1096
+ // add_action ('admin_head', 'ai_admin_head');
1097
  add_filter ('clean_url', 'ai_clean_url', 999999, 2);
1098
  }
1099
 
1100
  function ai_admin_head () {
1101
+ global $ai_settings_page, $hook_suffix;
1102
+
1103
+ // if ($hook_suffix == $ai_settings_page && wp_is_mobile()) {
1104
+ // echo "<meta name='viewport' content='width=762'>\n";
1105
+ // }
1106
  }
1107
 
1108
  function ai_admin_enqueue_scripts ($hook_suffix) {
1402
  // }
1403
 
1404
  if (function_exists ('ai_admin_notices')) ai_admin_notices (); else {
1405
+ if (is_super_admin () && !wp_is_mobile () && isset ($ai_wp_data [AI_DAYS_SINCE_INSTAL])) {
1406
 
1407
  if ((get_option ('ai-notice-review') === false && $ai_db_options_extract [AI_EXTRACT_USED_BLOCKS] >= 6 && $ai_wp_data [AI_DAYS_SINCE_INSTAL] > 10) ||
1408
 
constants.php CHANGED
@@ -18,7 +18,7 @@ if (!defined( 'AD_INSERTER_NAME'))
18
  define ('AD_INSERTER_NAME', 'Ad Inserter');
19
 
20
  if (!defined( 'AD_INSERTER_VERSION'))
21
- define ('AD_INSERTER_VERSION', '2.2.1');
22
 
23
  if (!defined ('AD_INSERTER_PLUGIN_BASENAME'))
24
  define ('AD_INSERTER_PLUGIN_BASENAME', plugin_basename (__FILE__));
18
  define ('AD_INSERTER_NAME', 'Ad Inserter');
19
 
20
  if (!defined( 'AD_INSERTER_VERSION'))
21
+ define ('AD_INSERTER_VERSION', '2.2.2');
22
 
23
  if (!defined ('AD_INSERTER_PLUGIN_BASENAME'))
24
  define ('AD_INSERTER_PLUGIN_BASENAME', plugin_basename (__FILE__));
css/ad-inserter.css CHANGED
@@ -1,5 +1,5 @@
1
  #ai-data {
2
- font-family: "2.2.1"; /* Used for version number of the file */
3
  }
4
 
5
  #blocked-warning {
1
  #ai-data {
2
+ font-family: "2.2.2"; /* Used for version number of the file */
3
  }
4
 
5
  #blocked-warning {
images/icon-50x50.jpg ADDED
Binary file
js/ad-inserter.js CHANGED
@@ -1,4 +1,4 @@
1
- var javascript_version = "2.2.1";
2
  var ignore_key = true;
3
  var start = 1;
4
  var end = 16;
1
+ var javascript_version = "2.2.2";
2
  var ignore_key = true;
3
  var start = 1;
4
  var end = 16;
readme.txt CHANGED
@@ -5,7 +5,8 @@ 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, ad injection, adverts, sticky widgets, amazon, banners, automatic insertion, amp, geo targeting, multisite, shortcodes, PHP, Javascript, HTML, header, footer, tracking
6
  Requires at least: 4.0
7
  Tested up to: 4.8
8
- Stable tag: 2.2.0
 
9
  License: GPLv3
10
 
11
  Insert and manage ads: AdSense, Amazon, banners, ad rotation, sticky ad widgets, shortcodes, AMP, PHP, HTML, CSS, form, tracking, header, footer code
@@ -97,6 +98,7 @@ Ad Inserter is not just another plugin for WordPress ads. Do you enjoy finding t
97
  * for sticky (fixed) widgets
98
  * for widget logic
99
  * to restrict widgets
 
100
  * to insert PHP or HTML code into posts
101
  * to insert header, footer or tracking code
102
  * to insert PHP, HTML, CSS, shortcodes
@@ -116,7 +118,7 @@ Few very important things you need to know in order to <a href="http://adinserte
116
  * **Enable insertion on at least one <a href="https://adinserter.pro/page-types">Wordpress page type</a>** (Posts, Static pages, Homepage, Category pages, Search Pages, Archive pages)
117
  * For Posts and Static pages **leave default BLANK selection value** after the checkbox unless you really know what are you doing (using individual exceptions)
118
  * If you don't see inserted code block turn on **debugging functions**: Label inserted blocks, Show available positions for automatic insertion (Ad Inserter menu item in the Wordpress toolbar on the top of every post/page)
119
- * If you are using AdSense you may get blank (empty) ad blocks. This might be because there is some error in the code (wrong IDs), your Google AdSense account is not fully approved yet, your website was not accepted or your Google AdSense account is banned. Try <a href="http://bit.ly/2oF81Oh" target="_blank">Media net ads</a> - they seem to be a good alternative for contextual ads.
120
 
121
  Few typical settings are described on the <a href="https://wordpress.org/plugins/ad-inserter/faq/">FAQ</a> page. Please make sure you have also read <a href="https://wordpress.org/plugins/ad-inserter/installation/">Installation</a> page.
122
  For more detailed instructions please read <a href="http://adinserter.pro/documentation" target="_blank">Ad Inserter documentation page</a>.
@@ -396,7 +398,6 @@ Support the advancement of this plugin:
396
  = I have installed code for AdSense ads but the ad blocks are blank. =
397
 
398
  If you get blank ads then this might be because there is some error in the code (wrong IDs), your AdSense account is not fully approved yet, your website was not accepted or your AdSense account is banned.
399
- You can also try <a href="http://bit.ly/2oF81Oh" target="_blank">Media net ads</a> as good AdSense alternative for contextual ads.
400
 
401
 
402
  = Settings for widget =
@@ -715,6 +716,9 @@ AD CODE RIGHT
715
 
716
  == Changelog ==
717
 
 
 
 
718
 
719
  = 2.2.1 =
720
  - Fix for header/footer scripts on AMP pages
@@ -808,119 +812,12 @@ AD CODE RIGHT
808
  - Bug fix for minimum user role not taken into account for exceptions list
809
  - Bug fix for IP database update cron event (Pro only)
810
 
811
- = 2.0.14 =
812
- - Fixed issue for responsive ads not displayed when using Left, Center or Right alignment
813
-
814
- = 2.0.13 =
815
- - Added icons for Automatic insertion and alignment
816
- - Automatic insertion None changed to Disabled
817
- - Alignment None changed to Default
818
- - Changed database option data for Automatic insertion and Alignment settings
819
- - Improved CSS 3 code for Left, Center and Right alignment
820
- - Click on CSS code starts editing
821
- - Page/Post exceptions listed in debug output
822
- - Different plugin slug for Pro version
823
- - Few minor bug fixes and cosmetic changes
824
-
825
- = 2.0.12 =
826
- - Bug fix for page/post exceptions list
827
-
828
- = 2.0.11 =
829
- - Bug fix for settings page not loading
830
-
831
- = 2.0.10 =
832
- - Added option to insert ads between posts on blog pages
833
- - Added option to check and manage post/page exceptions for each block
834
- - Added option to check and manage all post/page exceptions (Pro only)
835
- - Added option for multisite installations to disable PHP processing on sub-sites (Pro only)
836
- - Added license status notifications (Pro only)
837
-
838
- = 2.0.9 =
839
- - Added support for uppercase {country_ISO2} and lowercase {country_iso2} tag (Pro only)
840
- - Removed inclusion of dummy css and js file
841
- - Bug fix: Client-side dynamic blocks were not enabled if not using W3 Total Cache
842
-
843
- = 2.0.8 =
844
- - Added support for client-side rotation (works with caching)
845
- - Added support for server-side rotation with W3 Total Cache
846
- - Added support for client-side country detection (works with caching, Pro only)
847
- - Added support for server-side country detection with W3 Total Cache (Pro only)
848
- - Added debugging functions to measure plugin processing time
849
- - Added option to black/white-list IP addresses (Pro only)
850
- - Added option for fallback code when scheduling between dates expires (Pro only)
851
- - On multisite installations Ad Inserter debug menu item on sites is available only if settings page is enabled
852
- - Added option for multisite installations to use Ad Inserter settings of main site for all blogs
853
- - Added flags to country list (Pro only)
854
- - Bug fix: Code preview did not work if Wordpress was installed in a folder
855
- - Few minor bug fixes and cosmetic changes
856
-
857
- = 2.0.7 =
858
- - Delayed display moved to Misc group
859
- - Added option for scheduling to insert code only between specified dates (Pro only)
860
- - Added option for Geo targeting (Pro only)
861
- - Few minor bug fixes and cosmetic changes
862
-
863
- = 2.0.6 =
864
- - Added support to filter subpages created by the `<!--nextpage-->` tag
865
- - Added option to import block name (Pro only)
866
- - Cookie deleted only when it exists and debugging is disabled
867
- - Few minor bug fixes
868
-
869
- = 2.0.5 =
870
- - Cookie created only when debugging is enabled
871
- - Few minor bug fixes
872
-
873
- = 2.0.4 =
874
- - Bug fix: Cursor position always at the end of block name
875
- - State of debugging functions saved to cookie
876
- - Few minor bug fixes
877
-
878
- = 2.0.3 =
879
- - Debugging functions in admin toolbar available only for administrators
880
- - Added option to hide debugging functions in admin toolbar
881
- - Added shortcode for debugger
882
- - Few minor bug fixes
883
-
884
- = 2.0.2 =
885
- - Changed javascript version check to get plugin version from the HTML page
886
- - Added warning if old cached version of CSS file is loaded on the settings page
887
- - Added warning if version query parameter for js/css files is removed due to inappropriate caching
888
-
889
- = 2.0.1 =
890
- - Bug fix: Shortcodes called by name were not displayed
891
-
892
- = 2.0.0 =
893
- - Redesigned user interface
894
- - Added many debugging tools for easier troubleshooting
895
- - New feature: Code preview tool with visual CSS editor
896
- - New feature: Label inserted blocks
897
- - New feature: Show available positions for automatic insertion
898
- - New feature: Show HTML tags in posts/static pages
899
- - New feature: Log Ad Inserter processing
900
- - Improved loading speed of the settings page
901
- - Improved block insertion processing speed
902
- - Added support to avoid inserion near images, headers and other elements
903
- - Added option to avoid insertion in feeds
904
- - Added option to display code blocks only to administrators
905
- - Added option for publishig date check for display positions Before/After Content
906
- - Added option for server-side device check for header and footer code
907
- - Added option for maximum page/post words
908
- - Added option for maximum paragraph words
909
- - Added option to black/white-list post IDs
910
- - Added option to black/white-list url query parameters
911
- - Added warning if the settings page is blocked by ad blocker
912
- - Added warning if old cached version of javascript is loaded on the settings page
913
- - Added support for multisite installations to disable settings, widgets and exceptions on network sites (Pro only)
914
- - Block names can be edited by clicking on the name
915
- - Filters now work also on posts and single pages
916
- - CSS code for client-side detection moved to inline CSS
917
- - Bug fix: Minimum user roles for exception editing was not calculated properly
918
- - Bug fix: Server-side detection checkbox was not saved properly
919
- - Many other minor bug fixes, code improvements and cosmetic changes
920
-
921
-
922
  == Upgrade Notice ==
923
 
 
 
 
 
924
  = 2.2.1 =
925
  Fix for header/footer scripts on AMP pages
926
 
@@ -998,56 +895,3 @@ Few bug fixes and cosmetic changes
998
  = 2.1.0 =
999
  Support for ads in Ajax requests (e.g. in infinite scroll); Added sticky positions (Pro only);
1000
  Bug fix for minimum user role for exceptions list; Bug fix for IP database update cron event (Pro only)
1001
-
1002
- = 2.0.14 =
1003
- Fixed issue for responsive ads not displayed when using Left, Center or Right alignment
1004
-
1005
- = 2.0.13 =
1006
- Added icons for Automatic insertion and alignment; Changed database option data for Automatic insertion and Alignment settings;
1007
- Improved CSS 3 code for Left, Center and Right alignment; Few minor bug fixes and cosmetic changes;
1008
-
1009
- = 2.0.12 =
1010
- Bug fix for page/post exceptions list
1011
-
1012
- = 2.0.11 =
1013
- Bug fix for settings page not loading
1014
-
1015
- = 2.0.10 =
1016
- Option to insert ads between posts on blog pages;
1017
- Option to check and manage post/page exceptions for each block;
1018
-
1019
- = 2.0.9 =
1020
- Bug fix: Client-side dynamic blocks were not enabled if not using W3 Total Cache;
1021
- Added support for uppercase and lowercase {country_iso2} tag (Pro only); Removed inclusion of dummy css and js file
1022
-
1023
- = 2.0.8 =
1024
- Added support for client-side rotation (works with caching), added support for W3 Total Cache, client-side country detection (works with caching, Pro only),
1025
- bug fixed: Code preview did not work if Wordpress was installed in a folder, added flags to country list (Pro only)
1026
-
1027
- = 2.0.7 =
1028
- Delayed display moved to Misc group, added option for scheduling to insert code only between specified dates (Pro only),
1029
- added option for Geo targeting (Pro only), few minor bug fixes and cosmetic changes
1030
-
1031
- = 2.0.6 =
1032
- Added support to filter subpages created by the `<!--nextpage-->` tag, added option to import block name (Pro only),
1033
- cookie deleted only when it exists and debugging is disabled, few minor bug fixes
1034
-
1035
- = 2.0.5 =
1036
- cookie created only when debugging is enabled, few minor bug fixes
1037
-
1038
- = 2.0.4 =
1039
- Bug fix: Cursor position always at the end of block name, state of debugging functions saved to cookie, few minor bug fixes
1040
-
1041
- = 2.0.3 =
1042
- Debugging functions in admin toolbar available only for administrators, added option to hide debugging functions in admin toolbar,
1043
- Added shortcode for debugger, few minor bug fixes
1044
-
1045
- = 2.0.2 =
1046
- Changed javascript version check to get plugin version from the HTML page, added warning if old cached version of CSS file is loaded on the settings page,
1047
- added warning if version query parameter for js/css files is removed due to inappropriate caching,
1048
-
1049
- = 2.0.1 =
1050
- Bug fix: Shortcodes called by name were not displayed
1051
-
1052
- = 2.0.0 =
1053
- Redesigned user interface, added code preview and many debugging tools for easier troubleshooting and many new features
5
  Tags: ads, adsense, ad management, advertising manager, advanced contextual ads, ad rotation, ad injection, adverts, sticky widgets, amazon, banners, automatic insertion, amp, geo targeting, multisite, shortcodes, PHP, Javascript, HTML, header, footer, tracking
6
  Requires at least: 4.0
7
  Tested up to: 4.8
8
+ Requires PHP: 5.2
9
+ Stable tag: 2.2.1
10
  License: GPLv3
11
 
12
  Insert and manage ads: AdSense, Amazon, banners, ad rotation, sticky ad widgets, shortcodes, AMP, PHP, HTML, CSS, form, tracking, header, footer code
98
  * for sticky (fixed) widgets
99
  * for widget logic
100
  * to restrict widgets
101
+ * to detect ad blocking
102
  * to insert PHP or HTML code into posts
103
  * to insert header, footer or tracking code
104
  * to insert PHP, HTML, CSS, shortcodes
118
  * **Enable insertion on at least one <a href="https://adinserter.pro/page-types">Wordpress page type</a>** (Posts, Static pages, Homepage, Category pages, Search Pages, Archive pages)
119
  * For Posts and Static pages **leave default BLANK selection value** after the checkbox unless you really know what are you doing (using individual exceptions)
120
  * If you don't see inserted code block turn on **debugging functions**: Label inserted blocks, Show available positions for automatic insertion (Ad Inserter menu item in the Wordpress toolbar on the top of every post/page)
121
+ * If you are using AdSense you may get blank (empty) ad blocks. This might be because there is some error in the code (wrong IDs), your Google AdSense account is not fully approved yet, your website was not accepted or your Google AdSense account is banned.
122
 
123
  Few typical settings are described on the <a href="https://wordpress.org/plugins/ad-inserter/faq/">FAQ</a> page. Please make sure you have also read <a href="https://wordpress.org/plugins/ad-inserter/installation/">Installation</a> page.
124
  For more detailed instructions please read <a href="http://adinserter.pro/documentation" target="_blank">Ad Inserter documentation page</a>.
398
  = I have installed code for AdSense ads but the ad blocks are blank. =
399
 
400
  If you get blank ads then this might be because there is some error in the code (wrong IDs), your AdSense account is not fully approved yet, your website was not accepted or your AdSense account is banned.
 
401
 
402
 
403
  = Settings for widget =
716
 
717
  == Changelog ==
718
 
719
+ = 2.2.2 =
720
+ - Fix for mobile admin layout
721
+ - Few other minor bug fixes
722
 
723
  = 2.2.1 =
724
  - Fix for header/footer scripts on AMP pages
812
  - Bug fix for minimum user role not taken into account for exceptions list
813
  - Bug fix for IP database update cron event (Pro only)
814
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
815
  == Upgrade Notice ==
816
 
817
+ = 2.2.2 =
818
+ Fix for mobile admin layout;
819
+ Few other minor bug fixes
820
+
821
  = 2.2.1 =
822
  Fix for header/footer scripts on AMP pages
823
 
895
  = 2.1.0 =
896
  Support for ads in Ajax requests (e.g. in infinite scroll); Added sticky positions (Pro only);
897
  Bug fix for minimum user role for exceptions list; Bug fix for IP database update cron event (Pro only)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
settings.php CHANGED
@@ -228,7 +228,7 @@ function generate_settings_form (){
228
  elseif ($automatic) $style = "font-weight: bold; color: #e44;";
229
  elseif ($manual [$ad_number]) $style = "font-weight: bold; color: #66f;";
230
 
231
- if (!wp_is_mobile () && false) {
232
  $ad_name = $obj->get_ad_name();
233
 
234
  $ad_name_functions = false;
@@ -324,7 +324,7 @@ function generate_settings_form (){
324
 
325
  $scheduling_active = $obj->get_scheduling() != AI_SCHEDULING_OFF;
326
 
327
- $filter_active = $obj->get_call_filter() && $obj->get_inverted_filter() != 0;
328
 
329
  $adb_block_action_active = $obj->get_adb_block_action () != AI_ADB_BLOCK_ACTION_DO_NOTHING;
330
 
@@ -1028,7 +1028,7 @@ function generate_settings_form (){
1028
  <span style="display: table-cell; width: 1px; white-space: nowrap;">
1029
  <input type="hidden" name="<?php echo AI_OPTION_ENABLE_AMP, WP_FORM_FIELD_POSTFIX, $ad_number; ?>" value="0" />
1030
  <input style="margin-left: 10px;" id="enable-amp-<?php echo $ad_number; ?>" type="checkbox" name="<?php echo AI_OPTION_ENABLE_AMP, WP_FORM_FIELD_POSTFIX, $ad_number; ?>" value="1" default="<?php echo $default->get_enable_amp(true); ?>" <?php if ($obj->get_enable_amp (true) == AI_ENABLED) echo 'checked '; ?> />
1031
- <label for="enable-amp-<?php echo $ad_number; ?>" style="vertical-align: top;" title="Enable or disable insertion on AMP pages. To insert different codes on normal and AMP pages separate them with [ADINSERTER AMP] separator.">AMP pages</label>
1032
  </span>
1033
  <span style="display: table-cell; width: 1px; white-space: nowrap;">
1034
  <input type="hidden" name="<?php echo AI_OPTION_ENABLE_AJAX, WP_FORM_FIELD_POSTFIX, $ad_number; ?>" value="0" />
@@ -1663,7 +1663,9 @@ function generate_settings_form (){
1663
  if ($ai_db_options_extract [AI_EXTRACT_USED_BLOCKS] >= 8 && $ai_wp_data [AI_DAYS_SINCE_INSTAL] > 25 || $ai_wp_data [AI_DAYS_SINCE_INSTAL] > 35) $sidebar = 3;
1664
 
1665
  if ( $ai_wp_data [AI_DAYS_SINCE_INSTAL] > 40) $sidebar = 4;
1666
- }
 
 
1667
 
1668
  // $sidebar = 4;
1669
 
228
  elseif ($automatic) $style = "font-weight: bold; color: #e44;";
229
  elseif ($manual [$ad_number]) $style = "font-weight: bold; color: #66f;";
230
 
231
+ if (!wp_is_mobile ()) {
232
  $ad_name = $obj->get_ad_name();
233
 
234
  $ad_name_functions = false;
324
 
325
  $scheduling_active = $obj->get_scheduling() != AI_SCHEDULING_OFF;
326
 
327
+ $filter_active = $obj->get_call_filter() || $obj->get_inverted_filter() != 0;
328
 
329
  $adb_block_action_active = $obj->get_adb_block_action () != AI_ADB_BLOCK_ACTION_DO_NOTHING;
330
 
1028
  <span style="display: table-cell; width: 1px; white-space: nowrap;">
1029
  <input type="hidden" name="<?php echo AI_OPTION_ENABLE_AMP, WP_FORM_FIELD_POSTFIX, $ad_number; ?>" value="0" />
1030
  <input style="margin-left: 10px;" id="enable-amp-<?php echo $ad_number; ?>" type="checkbox" name="<?php echo AI_OPTION_ENABLE_AMP, WP_FORM_FIELD_POSTFIX, $ad_number; ?>" value="1" default="<?php echo $default->get_enable_amp(true); ?>" <?php if ($obj->get_enable_amp (true) == AI_ENABLED) echo 'checked '; ?> />
1031
+ <label for="enable-amp-<?php echo $ad_number; ?>" style="vertical-align: top;<?php if (!$obj->get_enable_amp (true) && $obj->get_enable_amp ()) echo ' color: red;' ?>" title="<?php if (!$obj->get_enable_amp (true) && $obj->get_enable_amp ()) echo "Old settings for AMP pages detected. " ?>To insert different codes on normal and AMP pages separate them with [ADINSERTER AMP] separator. Here you can enable insertion on AMP pages only when you need to insert THE SAME CODE also on AMP pages (no AMP separator).">AMP pages</label>
1032
  </span>
1033
  <span style="display: table-cell; width: 1px; white-space: nowrap;">
1034
  <input type="hidden" name="<?php echo AI_OPTION_ENABLE_AJAX, WP_FORM_FIELD_POSTFIX, $ad_number; ?>" value="0" />
1663
  if ($ai_db_options_extract [AI_EXTRACT_USED_BLOCKS] >= 8 && $ai_wp_data [AI_DAYS_SINCE_INSTAL] > 25 || $ai_wp_data [AI_DAYS_SINCE_INSTAL] > 35) $sidebar = 3;
1664
 
1665
  if ( $ai_wp_data [AI_DAYS_SINCE_INSTAL] > 40) $sidebar = 4;
1666
+ } else {
1667
+ if ($ai_db_options_extract [AI_EXTRACT_USED_BLOCKS] >= 4) $sidebar = 4;
1668
+ }
1669
 
1670
  // $sidebar = 4;
1671