Version Description
- Fix for issue with Ajax requests
Download this release
Release Info
Developer | spacetime |
Plugin | Ad Inserter – WordPress Ads Management with AdSense Header Integration |
Version | 2.2.5 |
Comparing to | |
See all releases |
Code changes from version 2.2.4 to 2.2.5
- ad-inserter.php +109 -41
- constants.php +1 -1
- css/ad-inserter.css +2 -1
- images/custom-css.png +0 -0
- js/ad-inserter.js +5 -1
- preview.php +10 -8
- readme.txt +7 -1
- settings.php +42 -33
ad-inserter.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Ad Inserter
|
4 |
-
Version: 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,6 +12,9 @@ Plugin URI: http://adinserter.pro/documentation
|
|
12 |
|
13 |
Change Log
|
14 |
|
|
|
|
|
|
|
15 |
Ad Inserter 2.2.4 - 2017-10-14
|
16 |
- Added support to insert raw HTTP response header lines
|
17 |
- Added support to check for individual exceptions for shortcodes
|
@@ -1037,9 +1040,73 @@ function ai_hook_function_footer () {
|
|
1037 |
ai_custom_hook ('wp_footer', AI_TEXT_FOOTER);
|
1038 |
}
|
1039 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1040 |
function ai_wp_hook () {
|
1041 |
global $ai_wp_data, $ai_db_options_extract, $ai_total_plugin_time, $ai_walker, $ai_custom_hooks;
|
1042 |
|
|
|
|
|
|
|
1043 |
if (($ai_wp_data [AI_WP_DEBUGGING] & AI_DEBUG_PROCESSING) != 0) {
|
1044 |
ai_log ("WP HOOK START");
|
1045 |
$start_time = microtime (true);
|
@@ -1150,55 +1217,55 @@ function ai_wp_hook () {
|
|
1150 |
// }
|
1151 |
|
1152 |
// Code for PHP VERSION < 5.3.0
|
1153 |
-
function ai_custom_hook_function_0 () {
|
1154 |
-
global $ai_custom_hooks;
|
1155 |
-
ai_custom_hook ($ai_custom_hooks [0]['action'], $ai_custom_hooks [0]['name']);
|
1156 |
-
}
|
1157 |
|
1158 |
-
function ai_custom_hook_function_1 () {
|
1159 |
-
global $ai_custom_hooks;
|
1160 |
-
ai_custom_hook ($ai_custom_hooks [1]['action'], $ai_custom_hooks [1]['name']);
|
1161 |
-
}
|
1162 |
|
1163 |
-
function ai_custom_hook_function_2 () {
|
1164 |
-
global $ai_custom_hooks;
|
1165 |
-
ai_custom_hook ($ai_custom_hooks [2]['action'], $ai_custom_hooks [2]['name']);
|
1166 |
-
}
|
1167 |
|
1168 |
-
function ai_custom_hook_function_3 () {
|
1169 |
-
global $ai_custom_hooks;
|
1170 |
-
ai_custom_hook ($ai_custom_hooks [3]['action'], $ai_custom_hooks [3]['name']);
|
1171 |
-
}
|
1172 |
|
1173 |
-
function ai_custom_hook_function_4 () {
|
1174 |
-
global $ai_custom_hooks;
|
1175 |
-
ai_custom_hook ($ai_custom_hooks [4]['action'], $ai_custom_hooks [4]['name']);
|
1176 |
-
}
|
1177 |
|
1178 |
-
function ai_custom_hook_function_5 () {
|
1179 |
-
global $ai_custom_hooks;
|
1180 |
-
ai_custom_hook ($ai_custom_hooks [5]['action'], $ai_custom_hooks [5]['name']);
|
1181 |
-
}
|
1182 |
|
1183 |
-
function ai_custom_hook_function_6 () {
|
1184 |
-
global $ai_custom_hooks;
|
1185 |
-
ai_custom_hook ($ai_custom_hooks [6]['action'], $ai_custom_hooks [6]['name']);
|
1186 |
-
}
|
1187 |
|
1188 |
-
function ai_custom_hook_function_7 () {
|
1189 |
-
global $ai_custom_hooks;
|
1190 |
-
ai_custom_hook ($ai_custom_hooks [7]['action'], $ai_custom_hooks [7]['name']);
|
1191 |
-
}
|
1192 |
|
1193 |
-
function ai_custom_hook_function_8 () {
|
1194 |
-
global $ai_custom_hooks;
|
1195 |
-
ai_custom_hook ($ai_custom_hooks [8]['action'], $ai_custom_hooks [8]['name']);
|
1196 |
-
}
|
1197 |
|
1198 |
-
function ai_custom_hook_function_9 () {
|
1199 |
-
global $ai_custom_hooks;
|
1200 |
-
ai_custom_hook ($ai_custom_hooks [9]['action'], $ai_custom_hooks [9]['name']);
|
1201 |
-
}
|
1202 |
|
1203 |
foreach ($ai_custom_hooks as $index => $custom_hook) {
|
1204 |
if ($index > 9) break;
|
@@ -1265,6 +1332,7 @@ function ai_init_hook() {
|
|
1265 |
|
1266 |
if (defined ('DOING_AJAX') && DOING_AJAX) {
|
1267 |
$ai_wp_data [AI_WP_PAGE_TYPE] = AI_PT_AJAX;
|
|
|
1268 |
ai_wp_hook ();
|
1269 |
}
|
1270 |
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Ad Inserter
|
4 |
+
Version: 2.2.5
|
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.5 - 2017-10-15
|
16 |
+
- Fix for issue with Ajax requests
|
17 |
+
|
18 |
Ad Inserter 2.2.4 - 2017-10-14
|
19 |
- Added support to insert raw HTTP response header lines
|
20 |
- Added support to check for individual exceptions for shortcodes
|
1040 |
ai_custom_hook ('wp_footer', AI_TEXT_FOOTER);
|
1041 |
}
|
1042 |
|
1043 |
+
|
1044 |
+
// Code for PHP VERSION >= 5.3.0
|
1045 |
+
//function ai_get_custom_hook_function ($action, $name) {
|
1046 |
+
// return function () use ($action, $name) {
|
1047 |
+
// ai_custom_hook ($action, $name);
|
1048 |
+
// };
|
1049 |
+
//}
|
1050 |
+
|
1051 |
+
|
1052 |
+
// Code for PHP VERSION < 5.3.0
|
1053 |
+
function ai_custom_hook_function_0 () {
|
1054 |
+
global $ai_custom_hooks;
|
1055 |
+
ai_custom_hook ($ai_custom_hooks [0]['action'], $ai_custom_hooks [0]['name']);
|
1056 |
+
}
|
1057 |
+
|
1058 |
+
function ai_custom_hook_function_1 () {
|
1059 |
+
global $ai_custom_hooks;
|
1060 |
+
ai_custom_hook ($ai_custom_hooks [1]['action'], $ai_custom_hooks [1]['name']);
|
1061 |
+
}
|
1062 |
+
|
1063 |
+
function ai_custom_hook_function_2 () {
|
1064 |
+
global $ai_custom_hooks;
|
1065 |
+
ai_custom_hook ($ai_custom_hooks [2]['action'], $ai_custom_hooks [2]['name']);
|
1066 |
+
}
|
1067 |
+
|
1068 |
+
function ai_custom_hook_function_3 () {
|
1069 |
+
global $ai_custom_hooks;
|
1070 |
+
ai_custom_hook ($ai_custom_hooks [3]['action'], $ai_custom_hooks [3]['name']);
|
1071 |
+
}
|
1072 |
+
|
1073 |
+
function ai_custom_hook_function_4 () {
|
1074 |
+
global $ai_custom_hooks;
|
1075 |
+
ai_custom_hook ($ai_custom_hooks [4]['action'], $ai_custom_hooks [4]['name']);
|
1076 |
+
}
|
1077 |
+
|
1078 |
+
function ai_custom_hook_function_5 () {
|
1079 |
+
global $ai_custom_hooks;
|
1080 |
+
ai_custom_hook ($ai_custom_hooks [5]['action'], $ai_custom_hooks [5]['name']);
|
1081 |
+
}
|
1082 |
+
|
1083 |
+
function ai_custom_hook_function_6 () {
|
1084 |
+
global $ai_custom_hooks;
|
1085 |
+
ai_custom_hook ($ai_custom_hooks [6]['action'], $ai_custom_hooks [6]['name']);
|
1086 |
+
}
|
1087 |
+
|
1088 |
+
function ai_custom_hook_function_7 () {
|
1089 |
+
global $ai_custom_hooks;
|
1090 |
+
ai_custom_hook ($ai_custom_hooks [7]['action'], $ai_custom_hooks [7]['name']);
|
1091 |
+
}
|
1092 |
+
|
1093 |
+
function ai_custom_hook_function_8 () {
|
1094 |
+
global $ai_custom_hooks;
|
1095 |
+
ai_custom_hook ($ai_custom_hooks [8]['action'], $ai_custom_hooks [8]['name']);
|
1096 |
+
}
|
1097 |
+
|
1098 |
+
function ai_custom_hook_function_9 () {
|
1099 |
+
global $ai_custom_hooks;
|
1100 |
+
ai_custom_hook ($ai_custom_hooks [9]['action'], $ai_custom_hooks [9]['name']);
|
1101 |
+
}
|
1102 |
+
|
1103 |
+
|
1104 |
function ai_wp_hook () {
|
1105 |
global $ai_wp_data, $ai_db_options_extract, $ai_total_plugin_time, $ai_walker, $ai_custom_hooks;
|
1106 |
|
1107 |
+
if (defined ('AI_WP_HOOK')) return;
|
1108 |
+
define ('AI_WP_HOOK', true);
|
1109 |
+
|
1110 |
if (($ai_wp_data [AI_WP_DEBUGGING] & AI_DEBUG_PROCESSING) != 0) {
|
1111 |
ai_log ("WP HOOK START");
|
1112 |
$start_time = microtime (true);
|
1217 |
// }
|
1218 |
|
1219 |
// Code for PHP VERSION < 5.3.0
|
1220 |
+
// function ai_custom_hook_function_0 () {
|
1221 |
+
// global $ai_custom_hooks;
|
1222 |
+
// ai_custom_hook ($ai_custom_hooks [0]['action'], $ai_custom_hooks [0]['name']);
|
1223 |
+
// }
|
1224 |
|
1225 |
+
// function ai_custom_hook_function_1 () {
|
1226 |
+
// global $ai_custom_hooks;
|
1227 |
+
// ai_custom_hook ($ai_custom_hooks [1]['action'], $ai_custom_hooks [1]['name']);
|
1228 |
+
// }
|
1229 |
|
1230 |
+
// function ai_custom_hook_function_2 () {
|
1231 |
+
// global $ai_custom_hooks;
|
1232 |
+
// ai_custom_hook ($ai_custom_hooks [2]['action'], $ai_custom_hooks [2]['name']);
|
1233 |
+
// }
|
1234 |
|
1235 |
+
// function ai_custom_hook_function_3 () {
|
1236 |
+
// global $ai_custom_hooks;
|
1237 |
+
// ai_custom_hook ($ai_custom_hooks [3]['action'], $ai_custom_hooks [3]['name']);
|
1238 |
+
// }
|
1239 |
|
1240 |
+
// function ai_custom_hook_function_4 () {
|
1241 |
+
// global $ai_custom_hooks;
|
1242 |
+
// ai_custom_hook ($ai_custom_hooks [4]['action'], $ai_custom_hooks [4]['name']);
|
1243 |
+
// }
|
1244 |
|
1245 |
+
// function ai_custom_hook_function_5 () {
|
1246 |
+
// global $ai_custom_hooks;
|
1247 |
+
// ai_custom_hook ($ai_custom_hooks [5]['action'], $ai_custom_hooks [5]['name']);
|
1248 |
+
// }
|
1249 |
|
1250 |
+
// function ai_custom_hook_function_6 () {
|
1251 |
+
// global $ai_custom_hooks;
|
1252 |
+
// ai_custom_hook ($ai_custom_hooks [6]['action'], $ai_custom_hooks [6]['name']);
|
1253 |
+
// }
|
1254 |
|
1255 |
+
// function ai_custom_hook_function_7 () {
|
1256 |
+
// global $ai_custom_hooks;
|
1257 |
+
// ai_custom_hook ($ai_custom_hooks [7]['action'], $ai_custom_hooks [7]['name']);
|
1258 |
+
// }
|
1259 |
|
1260 |
+
// function ai_custom_hook_function_8 () {
|
1261 |
+
// global $ai_custom_hooks;
|
1262 |
+
// ai_custom_hook ($ai_custom_hooks [8]['action'], $ai_custom_hooks [8]['name']);
|
1263 |
+
// }
|
1264 |
|
1265 |
+
// function ai_custom_hook_function_9 () {
|
1266 |
+
// global $ai_custom_hooks;
|
1267 |
+
// ai_custom_hook ($ai_custom_hooks [9]['action'], $ai_custom_hooks [9]['name']);
|
1268 |
+
// }
|
1269 |
|
1270 |
foreach ($ai_custom_hooks as $index => $custom_hook) {
|
1271 |
if ($index > 9) break;
|
1332 |
|
1333 |
if (defined ('DOING_AJAX') && DOING_AJAX) {
|
1334 |
$ai_wp_data [AI_WP_PAGE_TYPE] = AI_PT_AJAX;
|
1335 |
+
|
1336 |
ai_wp_hook ();
|
1337 |
}
|
1338 |
|
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.
|
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.5');
|
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.
|
3 |
}
|
4 |
|
5 |
#blocked-warning {
|
@@ -351,6 +351,7 @@ li.automatic-insertion p {
|
|
351 |
|
352 |
div.automatic-insertion img {
|
353 |
width: 56px;
|
|
|
354 |
}
|
355 |
|
356 |
.ai-toolbar-button {
|
1 |
#ai-data {
|
2 |
+
font-family: "2.2.5"; /* Used for version number of the file */
|
3 |
}
|
4 |
|
5 |
#blocked-warning {
|
351 |
|
352 |
div.automatic-insertion img {
|
353 |
width: 56px;
|
354 |
+
height: 56px;
|
355 |
}
|
356 |
|
357 |
.ai-toolbar-button {
|
images/custom-css.png
DELETED
Binary file
|
js/ad-inserter.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
var javascript_version = "2.2.
|
2 |
var ignore_key = true;
|
3 |
var start = 1;
|
4 |
var end = 16;
|
@@ -1760,6 +1760,7 @@ jQuery(document).ready(function($) {
|
|
1760 |
|
1761 |
var plugin_version = $('#ai-data').attr ('version').split ('-') [0];
|
1762 |
if (javascript_version != plugin_version) {
|
|
|
1763 |
|
1764 |
// Check page HTML
|
1765 |
var javascript_version_parameter = $("script[src*='ad-inserter.js']").attr('src');
|
@@ -1769,6 +1770,7 @@ jQuery(document).ready(function($) {
|
|
1769 |
$("#javascript-version-parameter-missing").show ();
|
1770 |
}
|
1771 |
else if (javascript_version_parameter_string != plugin_version) {
|
|
|
1772 |
$("#javascript-version-parameter").show ();
|
1773 |
}
|
1774 |
}
|
@@ -1780,6 +1782,7 @@ jQuery(document).ready(function($) {
|
|
1780 |
var css_version = $('#ai-data').css ('font-family').replace(/[\"\']/g, '');
|
1781 |
if (css_version.indexOf ('.') == - 1) $("#blocked-warning").show (); else
|
1782 |
if (css_version != plugin_version) {
|
|
|
1783 |
|
1784 |
// Check page HTML
|
1785 |
var css_version_parameter = $("link[href*='ad-inserter.css']").attr('href');
|
@@ -1789,6 +1792,7 @@ jQuery(document).ready(function($) {
|
|
1789 |
$("#css-version-parameter-missing").show ();
|
1790 |
}
|
1791 |
else if (css_version_parameter_string != plugin_version) {
|
|
|
1792 |
$("#css-version-parameter").show ();
|
1793 |
}
|
1794 |
}
|
1 |
+
var javascript_version = "2.2.5";
|
2 |
var ignore_key = true;
|
3 |
var start = 1;
|
4 |
var end = 16;
|
1760 |
|
1761 |
var plugin_version = $('#ai-data').attr ('version').split ('-') [0];
|
1762 |
if (javascript_version != plugin_version) {
|
1763 |
+
console.log ('AD INSERTER: plugin version: ' + plugin_version + ', loaded Javascript version: ' + javascript_version);
|
1764 |
|
1765 |
// Check page HTML
|
1766 |
var javascript_version_parameter = $("script[src*='ad-inserter.js']").attr('src');
|
1770 |
$("#javascript-version-parameter-missing").show ();
|
1771 |
}
|
1772 |
else if (javascript_version_parameter_string != plugin_version) {
|
1773 |
+
console.log ('AD INSERTER: plugin version: ' + plugin_version + '- Javascript file version: ' + javascript_version_parameter_string);
|
1774 |
$("#javascript-version-parameter").show ();
|
1775 |
}
|
1776 |
}
|
1782 |
var css_version = $('#ai-data').css ('font-family').replace(/[\"\']/g, '');
|
1783 |
if (css_version.indexOf ('.') == - 1) $("#blocked-warning").show (); else
|
1784 |
if (css_version != plugin_version) {
|
1785 |
+
console.log ('AD INSERTER: plugin version:', plugin_version, 'loaded CSS version:', css_version);
|
1786 |
|
1787 |
// Check page HTML
|
1788 |
var css_version_parameter = $("link[href*='ad-inserter.css']").attr('href');
|
1792 |
$("#css-version-parameter-missing").show ();
|
1793 |
}
|
1794 |
else if (css_version_parameter_string != plugin_version) {
|
1795 |
+
console.log ('AD INSERTER: plugin version:', plugin_version, '- CSS file version:', css_version_parameter_string);
|
1796 |
$("#css-version-parameter").show ();
|
1797 |
}
|
1798 |
}
|
preview.php
CHANGED
@@ -838,10 +838,12 @@ div.automatic-insertion {
|
|
838 |
|
839 |
li.automatic-insertion p {
|
840 |
width: 50px;
|
|
|
841 |
}
|
842 |
|
843 |
div.automatic-insertion img {
|
844 |
width: 50px;
|
|
|
845 |
}
|
846 |
</style>
|
847 |
<?php echo $head_code; ?>
|
@@ -972,15 +974,15 @@ div.automatic-insertion img {
|
|
972 |
<div style="margin: 20px 0 0 0;">
|
973 |
Alignment and Style:
|
974 |
<select id="block-alignment" style="border-radius: 5px; width:120px;">
|
975 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion preview default" <?php alt_styles_data ($obj->alignment_style (AI_ALIGNMENT_DEFAULT, true)); ?> value="<?php echo AI_ALIGNMENT_DEFAULT; ?>" <?php echo ($alignment_type == AI_ALIGNMENT_DEFAULT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_DEFAULT; ?></option>
|
976 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion preview align-left" <?php alt_styles_data ($obj->alignment_style (AI_ALIGNMENT_LEFT, true)); ?> value="<?php echo AI_ALIGNMENT_LEFT; ?>" <?php echo ($alignment_type == AI_ALIGNMENT_LEFT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_LEFT; ?></option>
|
977 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion preview center" <?php alt_styles_data ($obj->alignment_style (AI_ALIGNMENT_CENTER, true)); ?> value="<?php echo AI_ALIGNMENT_CENTER; ?>" <?php echo ($alignment_type == AI_ALIGNMENT_CENTER) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_CENTER; ?></option>
|
978 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion preview align-right" <?php alt_styles_data ($obj->alignment_style (AI_ALIGNMENT_RIGHT, true)); ?> value="<?php echo AI_ALIGNMENT_RIGHT; ?>" <?php echo ($alignment_type == AI_ALIGNMENT_RIGHT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_RIGHT; ?></option>
|
979 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion preview float-left" <?php alt_styles_data ($obj->alignment_style (AI_ALIGNMENT_FLOAT_LEFT, true)); ?> value="<?php echo AI_ALIGNMENT_FLOAT_LEFT; ?>" <?php echo ($alignment_type == AI_ALIGNMENT_FLOAT_LEFT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_FLOAT_LEFT; ?></option>
|
980 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion preview float-right" <?php alt_styles_data ($obj->alignment_style (AI_ALIGNMENT_FLOAT_RIGHT, true)); ?> value="<?php echo AI_ALIGNMENT_FLOAT_RIGHT; ?>" <?php echo ($alignment_type == AI_ALIGNMENT_FLOAT_RIGHT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_FLOAT_RIGHT; ?></option>
|
981 |
<?php if (function_exists ('ai_preview_style_options')) ai_preview_style_options ($obj, $alignment_type); ?>
|
982 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion preview custom-css" value="<?php echo AI_ALIGNMENT_CUSTOM_CSS; ?>" <?php echo ($alignment_type == AI_ALIGNMENT_CUSTOM_CSS) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_CUSTOM_CSS; ?></option>
|
983 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion preview no-wrapping" value="<?php echo AI_ALIGNMENT_NO_WRAPPING; ?>" <?php echo ($alignment_type == AI_ALIGNMENT_NO_WRAPPING) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_NO_WRAPPING; ?></option>
|
984 |
</select>
|
985 |
<span id="css-index" style="margin: 0 0 0 10px; font-size: 14px;" title="CSS code index"></span>
|
986 |
</div>
|
838 |
|
839 |
li.automatic-insertion p {
|
840 |
width: 50px;
|
841 |
+
height: 50px;
|
842 |
}
|
843 |
|
844 |
div.automatic-insertion img {
|
845 |
width: 50px;
|
846 |
+
height: 50px;
|
847 |
}
|
848 |
</style>
|
849 |
<?php echo $head_code; ?>
|
974 |
<div style="margin: 20px 0 0 0;">
|
975 |
Alignment and Style:
|
976 |
<select id="block-alignment" style="border-radius: 5px; width:120px;">
|
977 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion preview default" <?php alt_styles_data ($obj->alignment_style (AI_ALIGNMENT_DEFAULT, true)); ?> value="<?php echo AI_ALIGNMENT_DEFAULT; ?>" <?php echo ($alignment_type == AI_ALIGNMENT_DEFAULT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_DEFAULT; ?></option>
|
978 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion preview align-left" <?php alt_styles_data ($obj->alignment_style (AI_ALIGNMENT_LEFT, true)); ?> value="<?php echo AI_ALIGNMENT_LEFT; ?>" <?php echo ($alignment_type == AI_ALIGNMENT_LEFT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_LEFT; ?></option>
|
979 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion preview center" <?php alt_styles_data ($obj->alignment_style (AI_ALIGNMENT_CENTER, true)); ?> value="<?php echo AI_ALIGNMENT_CENTER; ?>" <?php echo ($alignment_type == AI_ALIGNMENT_CENTER) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_CENTER; ?></option>
|
980 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion preview align-right" <?php alt_styles_data ($obj->alignment_style (AI_ALIGNMENT_RIGHT, true)); ?> value="<?php echo AI_ALIGNMENT_RIGHT; ?>" <?php echo ($alignment_type == AI_ALIGNMENT_RIGHT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_RIGHT; ?></option>
|
981 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion preview float-left" <?php alt_styles_data ($obj->alignment_style (AI_ALIGNMENT_FLOAT_LEFT, true)); ?> value="<?php echo AI_ALIGNMENT_FLOAT_LEFT; ?>" <?php echo ($alignment_type == AI_ALIGNMENT_FLOAT_LEFT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_FLOAT_LEFT; ?></option>
|
982 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion preview float-right" <?php alt_styles_data ($obj->alignment_style (AI_ALIGNMENT_FLOAT_RIGHT, true)); ?> value="<?php echo AI_ALIGNMENT_FLOAT_RIGHT; ?>" <?php echo ($alignment_type == AI_ALIGNMENT_FLOAT_RIGHT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_FLOAT_RIGHT; ?></option>
|
983 |
<?php if (function_exists ('ai_preview_style_options')) ai_preview_style_options ($obj, $alignment_type); ?>
|
984 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion preview custom-css" value="<?php echo AI_ALIGNMENT_CUSTOM_CSS; ?>" <?php echo ($alignment_type == AI_ALIGNMENT_CUSTOM_CSS) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_CUSTOM_CSS; ?></option>
|
985 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion preview no-wrapping" value="<?php echo AI_ALIGNMENT_NO_WRAPPING; ?>" <?php echo ($alignment_type == AI_ALIGNMENT_NO_WRAPPING) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_NO_WRAPPING; ?></option>
|
986 |
</select>
|
987 |
<span id="css-index" style="margin: 0 0 0 10px; font-size: 14px;" title="CSS code index"></span>
|
988 |
</div>
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Tags: ads, adsense, ad management, advertising manager, advanced contextual ads,
|
|
6 |
Requires at least: 4.0
|
7 |
Tested up to: 4.8.2
|
8 |
Requires PHP: 5.2.4
|
9 |
-
Stable tag: 2.2.
|
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
|
@@ -741,6 +741,9 @@ AD CODE RIGHT
|
|
741 |
|
742 |
== Changelog ==
|
743 |
|
|
|
|
|
|
|
744 |
= 2.2.4 =
|
745 |
- Added support to insert raw HTTP response header lines
|
746 |
- Added support to check for individual exceptions for shortcodes
|
@@ -858,6 +861,9 @@ AD CODE RIGHT
|
|
858 |
|
859 |
== Upgrade Notice ==
|
860 |
|
|
|
|
|
|
|
861 |
= 2.2.4 =
|
862 |
Added support to insert raw HTTP response header lines;
|
863 |
Added support to check for individual exceptions for shortcodes;
|
6 |
Requires at least: 4.0
|
7 |
Tested up to: 4.8.2
|
8 |
Requires PHP: 5.2.4
|
9 |
+
Stable tag: 2.2.4
|
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
|
741 |
|
742 |
== Changelog ==
|
743 |
|
744 |
+
= 2.2.5 =
|
745 |
+
- Fix for issue with Ajax requests
|
746 |
+
|
747 |
= 2.2.4 =
|
748 |
- Added support to insert raw HTTP response header lines
|
749 |
- Added support to check for individual exceptions for shortcodes
|
861 |
|
862 |
== Upgrade Notice ==
|
863 |
|
864 |
+
= 2.2.5 =
|
865 |
+
Fix for issue with Ajax requests
|
866 |
+
|
867 |
= 2.2.4 =
|
868 |
Added support to insert raw HTTP response header lines;
|
869 |
Added support to check for individual exceptions for shortcodes;
|
settings.php
CHANGED
@@ -155,10 +155,10 @@ function generate_settings_form (){
|
|
155 |
</div>
|
156 |
|
157 |
<div id="blocked-warning" class="ai-form warning-enabled rounded">
|
158 |
-
<h2 class="blocked-warning-text" style="float: left; color: red;" title="Error loading page">
|
159 |
-
<div style="float: right; text-align: right; width:
|
160 |
-
|
161 |
-
Check
|
162 |
</div>
|
163 |
<div style="clear: both;"></div>
|
164 |
</div>
|
@@ -426,22 +426,22 @@ function generate_settings_form (){
|
|
426 |
<div style="float: left;">
|
427 |
Automatic Insertion:
|
428 |
<select style="margin-bottom: 3px;" id="display-type-<?php echo $ad_number; ?>" name="<?php echo AI_OPTION_AUTOMATIC_INSERTION, WP_FORM_FIELD_POSTFIX, $ad_number; ?>" default="<?php echo $default->get_automatic_insertion(); ?>" style="width:200px;">
|
429 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion disabled" value="<?php echo AI_AUTOMATIC_INSERTION_DISABLED; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_DISABLED) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_DISABLED; ?></option>
|
430 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion before-post" value="<?php echo AI_AUTOMATIC_INSERTION_BEFORE_POST; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_BEFORE_POST) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_BEFORE_POST; ?></option>
|
431 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion before-content" value="<?php echo AI_AUTOMATIC_INSERTION_BEFORE_CONTENT; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_BEFORE_CONTENT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_BEFORE_CONTENT; ?></option>
|
432 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion before-paragraph" value="<?php echo AI_AUTOMATIC_INSERTION_BEFORE_PARAGRAPH; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_BEFORE_PARAGRAPH) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_BEFORE_PARAGRAPH; ?></option>
|
433 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion after-paragraph" value="<?php echo AI_AUTOMATIC_INSERTION_AFTER_PARAGRAPH; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_AFTER_PARAGRAPH) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_AFTER_PARAGRAPH; ?></option>
|
434 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion after-content" value="<?php echo AI_AUTOMATIC_INSERTION_AFTER_CONTENT; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_AFTER_CONTENT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_AFTER_CONTENT; ?></option>
|
435 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion after-post" value="<?php echo AI_AUTOMATIC_INSERTION_AFTER_POST; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_AFTER_POST) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_AFTER_POST; ?></option>
|
436 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion before-excerpts" value="<?php echo AI_AUTOMATIC_INSERTION_BEFORE_EXCERPT; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_BEFORE_EXCERPT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_BEFORE_EXCERPT; ?></option>
|
437 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion after-excerpts" value="<?php echo AI_AUTOMATIC_INSERTION_AFTER_EXCERPT; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_AFTER_EXCERPT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_AFTER_EXCERPT; ?></option>
|
438 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion between-posts" value="<?php echo AI_AUTOMATIC_INSERTION_BETWEEN_POSTS; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_BETWEEN_POSTS) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_BETWEEN_POSTS; ?></option>
|
439 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion before-comments" value="<?php echo AI_AUTOMATIC_INSERTION_BEFORE_COMMENTS; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_BEFORE_COMMENTS) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_BEFORE_COMMENTS; ?></option>
|
440 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion between-comments" value="<?php echo AI_AUTOMATIC_INSERTION_BETWEEN_COMMENTS; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_BETWEEN_COMMENTS) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_BETWEEN_COMMENTS; ?></option>
|
441 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion after-comments" value="<?php echo AI_AUTOMATIC_INSERTION_AFTER_COMMENTS; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_AFTER_COMMENTS) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_AFTER_COMMENTS; ?></option>
|
442 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion footer" value="<?php echo AI_AUTOMATIC_INSERTION_FOOTER; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_FOOTER) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_FOOTER; ?></option>
|
443 |
<?php foreach ($ai_custom_hooks as $hook_index => $custom_hook) { ?>
|
444 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion custom-hook" value="<?php echo AI_AUTOMATIC_INSERTION_CUSTOM_HOOK + $custom_hook ['index'] - 1; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_CUSTOM_HOOK + $custom_hook ['index'] - 1) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo $custom_hook ['name']; ?></option>
|
445 |
<?php } ?>
|
446 |
</select>
|
447 |
</div>
|
@@ -449,15 +449,15 @@ function generate_settings_form (){
|
|
449 |
<div style="float: right;">
|
450 |
Alignment and Style:
|
451 |
<select style="width:120px;" id="block-alignment-<?php echo $ad_number; ?>" name="<?php echo AI_OPTION_ALIGNMENT_TYPE, WP_FORM_FIELD_POSTFIX, $ad_number; ?>" default="<?php echo $default->get_alignment_type(); ?>">
|
452 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion default" value="<?php echo AI_ALIGNMENT_DEFAULT; ?>" <?php echo ($obj->get_alignment_type() == AI_ALIGNMENT_DEFAULT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_DEFAULT; ?></option>
|
453 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion align-left" value="<?php echo AI_ALIGNMENT_LEFT; ?>" <?php echo ($obj->get_alignment_type() == AI_ALIGNMENT_LEFT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_LEFT; ?></option>
|
454 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion center" value="<?php echo AI_ALIGNMENT_CENTER; ?>" <?php echo ($obj->get_alignment_type() == AI_ALIGNMENT_CENTER) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_CENTER; ?></option>
|
455 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion align-right" value="<?php echo AI_ALIGNMENT_RIGHT; ?>" <?php echo ($obj->get_alignment_type() == AI_ALIGNMENT_RIGHT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_RIGHT; ?></option>
|
456 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion float-left" value="<?php echo AI_ALIGNMENT_FLOAT_LEFT; ?>" <?php echo ($obj->get_alignment_type() == AI_ALIGNMENT_FLOAT_LEFT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_FLOAT_LEFT; ?></option>
|
457 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion float-right" value="<?php echo AI_ALIGNMENT_FLOAT_RIGHT; ?>" <?php echo ($obj->get_alignment_type() == AI_ALIGNMENT_FLOAT_RIGHT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_FLOAT_RIGHT; ?></option>
|
458 |
<?php $css_code_height = 260; if (function_exists ('ai_style_options')) $css_code_height = ai_style_options ($obj); ?>
|
459 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion custom-css" value="<?php echo AI_ALIGNMENT_CUSTOM_CSS; ?>" <?php echo ($obj->get_alignment_type() == AI_ALIGNMENT_CUSTOM_CSS) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_CUSTOM_CSS; ?></option>
|
460 |
-
<option data-img-src="<?php echo plugins_url ('images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion no-wrapping" value="<?php echo AI_ALIGNMENT_NO_WRAPPING; ?>" <?php echo ($obj->get_alignment_type() == AI_ALIGNMENT_NO_WRAPPING) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_NO_WRAPPING; ?></option>
|
461 |
</select>
|
462 |
|
463 |
<button id="show-css-button-<?php echo $ad_number; ?>" type="button" style="min-width: 60px; margin-right: 0px;">Show</button>
|
@@ -1863,6 +1863,7 @@ function generate_settings_form (){
|
|
1863 |
function replace_blocked_image (image_id, image_src, css_display) {
|
1864 |
var image_selector = "#" + image_id;
|
1865 |
if (!jQuery(image_selector + ":visible").length) {
|
|
|
1866 |
var image = jQuery(image_selector);
|
1867 |
image.hide ().after (image.clone ().attr ('class', '').attr ("id", image_id + '-ajax').
|
1868 |
attr ('src', ajaxurl+'?action=ai_ajax_backend&image=' + image_src + '&ai_check=<?php echo wp_create_nonce ('adinserter_data'); ?>').
|
@@ -1872,12 +1873,11 @@ function generate_settings_form (){
|
|
1872 |
|
1873 |
jQuery("#blocked-warning.warning-enabled").show ();
|
1874 |
jQuery("#blocked-warning.warning-enabled .blocked-warning-text").css ('color', '#00f');
|
|
|
|
|
|
|
1875 |
|
1876 |
-
|
1877 |
-
jQuery("#blocked-warning").show ();
|
1878 |
-
jQuery("#blocked-warning .blocked-warning-text").css ('color', '#00f');
|
1879 |
-
}
|
1880 |
-
|
1881 |
replace_blocked_image ('ai-media-1', 'contextual-1.gif', 'block');
|
1882 |
replace_blocked_image ('ai-media-2', 'contextual-2.jpg', 'block');
|
1883 |
replace_blocked_image ('ai-pro-1', 'icon-256x256.jpg', 'block');
|
@@ -1885,6 +1885,15 @@ function generate_settings_form (){
|
|
1885 |
replace_blocked_image ('ai-stars-img', 'stars.png', 'inline');
|
1886 |
replace_blocked_image ('ai-tw', 'twitter.png', 'inline');
|
1887 |
replace_blocked_image ('ai-fb', 'facebook.png', 'inline');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1888 |
}
|
1889 |
</script>
|
1890 |
|
@@ -1996,7 +2005,7 @@ function sidebar_pro () { ?>
|
|
1996 |
<li><a href="http://adinserter.pro/documentation#automatic-insertion" class="simple-link" target="_blank">Automatic insertion</a> before or after post / content / <a href="http://adinserter.pro/documentation#paragraphs" class="simple-link" target="_blank">paragraph</a> / excerpt</li>
|
1997 |
<li><a href="http://adinserter.pro/documentation#automatic-insertion" class="simple-link" target="_blank">Automatic insertion</a> between posts on blog pages</li>
|
1998 |
<li><a href="http://adinserter.pro/documentation#automatic-insertion" class="simple-link" target="_blank">Automatic insertion</a> before, between and after comments</li>
|
1999 |
-
<li
|
2000 |
<li><a href="https://adinserter.pro/exceptions" class="simple-link" target="_blank">Insertion exceptions</a> for individual posts and pages</li>
|
2001 |
<li><a href="http://adinserter.pro/documentation#manual-insertion" class="simple-link" target="_blank">Manual insertion</a>: widgets, shortcodes, PHP function call</li>
|
2002 |
<li><a href="https://adinserter.pro/alignments-and-styles" class="simple-link" target="_blank">Sticky positions</a> (left, top, right, bottom - ads stay fixed when the page scrolls)</li>
|
155 |
</div>
|
156 |
|
157 |
<div id="blocked-warning" class="ai-form warning-enabled rounded">
|
158 |
+
<h2 class="blocked-warning-text" style="float: left; color: red; margin: 7px 0;" title="Error loading page">WARNING</h2>
|
159 |
+
<div style="float: right; text-align: right; width: 630px; margin: 8px 5px 0px 0;">
|
160 |
+
Page may <a href="https://adinserter.pro/documentation#page-blocked" class="simple-link" target="_blank">not be loaded properly</a>.
|
161 |
+
Check ad blocking software that may block CSS, Javascript or image files.
|
162 |
</div>
|
163 |
<div style="clear: both;"></div>
|
164 |
</div>
|
426 |
<div style="float: left;">
|
427 |
Automatic Insertion:
|
428 |
<select style="margin-bottom: 3px;" id="display-type-<?php echo $ad_number; ?>" name="<?php echo AI_OPTION_AUTOMATIC_INSERTION, WP_FORM_FIELD_POSTFIX, $ad_number; ?>" default="<?php echo $default->get_automatic_insertion(); ?>" style="width:200px;">
|
429 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion disabled" value="<?php echo AI_AUTOMATIC_INSERTION_DISABLED; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_DISABLED) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_DISABLED; ?></option>
|
430 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion before-post" value="<?php echo AI_AUTOMATIC_INSERTION_BEFORE_POST; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_BEFORE_POST) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_BEFORE_POST; ?></option>
|
431 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion before-content" value="<?php echo AI_AUTOMATIC_INSERTION_BEFORE_CONTENT; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_BEFORE_CONTENT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_BEFORE_CONTENT; ?></option>
|
432 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion before-paragraph" value="<?php echo AI_AUTOMATIC_INSERTION_BEFORE_PARAGRAPH; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_BEFORE_PARAGRAPH) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_BEFORE_PARAGRAPH; ?></option>
|
433 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion after-paragraph" value="<?php echo AI_AUTOMATIC_INSERTION_AFTER_PARAGRAPH; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_AFTER_PARAGRAPH) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_AFTER_PARAGRAPH; ?></option>
|
434 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion after-content" value="<?php echo AI_AUTOMATIC_INSERTION_AFTER_CONTENT; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_AFTER_CONTENT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_AFTER_CONTENT; ?></option>
|
435 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion after-post" value="<?php echo AI_AUTOMATIC_INSERTION_AFTER_POST; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_AFTER_POST) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_AFTER_POST; ?></option>
|
436 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion before-excerpts" value="<?php echo AI_AUTOMATIC_INSERTION_BEFORE_EXCERPT; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_BEFORE_EXCERPT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_BEFORE_EXCERPT; ?></option>
|
437 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion after-excerpts" value="<?php echo AI_AUTOMATIC_INSERTION_AFTER_EXCERPT; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_AFTER_EXCERPT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_AFTER_EXCERPT; ?></option>
|
438 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion between-posts" value="<?php echo AI_AUTOMATIC_INSERTION_BETWEEN_POSTS; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_BETWEEN_POSTS) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_BETWEEN_POSTS; ?></option>
|
439 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion before-comments" value="<?php echo AI_AUTOMATIC_INSERTION_BEFORE_COMMENTS; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_BEFORE_COMMENTS) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_BEFORE_COMMENTS; ?></option>
|
440 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion between-comments" value="<?php echo AI_AUTOMATIC_INSERTION_BETWEEN_COMMENTS; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_BETWEEN_COMMENTS) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_BETWEEN_COMMENTS; ?></option>
|
441 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion after-comments" value="<?php echo AI_AUTOMATIC_INSERTION_AFTER_COMMENTS; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_AFTER_COMMENTS) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_AFTER_COMMENTS; ?></option>
|
442 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion footer" value="<?php echo AI_AUTOMATIC_INSERTION_FOOTER; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_FOOTER) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_FOOTER; ?></option>
|
443 |
<?php foreach ($ai_custom_hooks as $hook_index => $custom_hook) { ?>
|
444 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion custom-hook" value="<?php echo AI_AUTOMATIC_INSERTION_CUSTOM_HOOK + $custom_hook ['index'] - 1; ?>" <?php echo ($automatic_insertion == AI_AUTOMATIC_INSERTION_CUSTOM_HOOK + $custom_hook ['index'] - 1) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo $custom_hook ['name']; ?></option>
|
445 |
<?php } ?>
|
446 |
</select>
|
447 |
</div>
|
449 |
<div style="float: right;">
|
450 |
Alignment and Style:
|
451 |
<select style="width:120px;" id="block-alignment-<?php echo $ad_number; ?>" name="<?php echo AI_OPTION_ALIGNMENT_TYPE, WP_FORM_FIELD_POSTFIX, $ad_number; ?>" default="<?php echo $default->get_alignment_type(); ?>">
|
452 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion default" value="<?php echo AI_ALIGNMENT_DEFAULT; ?>" <?php echo ($obj->get_alignment_type() == AI_ALIGNMENT_DEFAULT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_DEFAULT; ?></option>
|
453 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion align-left" value="<?php echo AI_ALIGNMENT_LEFT; ?>" <?php echo ($obj->get_alignment_type() == AI_ALIGNMENT_LEFT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_LEFT; ?></option>
|
454 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion center" value="<?php echo AI_ALIGNMENT_CENTER; ?>" <?php echo ($obj->get_alignment_type() == AI_ALIGNMENT_CENTER) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_CENTER; ?></option>
|
455 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion align-right" value="<?php echo AI_ALIGNMENT_RIGHT; ?>" <?php echo ($obj->get_alignment_type() == AI_ALIGNMENT_RIGHT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_RIGHT; ?></option>
|
456 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion float-left" value="<?php echo AI_ALIGNMENT_FLOAT_LEFT; ?>" <?php echo ($obj->get_alignment_type() == AI_ALIGNMENT_FLOAT_LEFT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_FLOAT_LEFT; ?></option>
|
457 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion float-right" value="<?php echo AI_ALIGNMENT_FLOAT_RIGHT; ?>" <?php echo ($obj->get_alignment_type() == AI_ALIGNMENT_FLOAT_RIGHT) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_FLOAT_RIGHT; ?></option>
|
458 |
<?php $css_code_height = 260; if (function_exists ('ai_style_options')) $css_code_height = ai_style_options ($obj); ?>
|
459 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion custom-css" value="<?php echo AI_ALIGNMENT_CUSTOM_CSS; ?>" <?php echo ($obj->get_alignment_type() == AI_ALIGNMENT_CUSTOM_CSS) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_CUSTOM_CSS; ?></option>
|
460 |
+
<option data-img-src="<?php echo plugins_url ('css/images/blank.png', __FILE__); ?>" data-img-class="automatic-insertion no-wrapping" value="<?php echo AI_ALIGNMENT_NO_WRAPPING; ?>" <?php echo ($obj->get_alignment_type() == AI_ALIGNMENT_NO_WRAPPING) ? AD_SELECT_SELECTED : AD_EMPTY_VALUE; ?>><?php echo AI_TEXT_NO_WRAPPING; ?></option>
|
461 |
</select>
|
462 |
|
463 |
<button id="show-css-button-<?php echo $ad_number; ?>" type="button" style="min-width: 60px; margin-right: 0px;">Show</button>
|
1863 |
function replace_blocked_image (image_id, image_src, css_display) {
|
1864 |
var image_selector = "#" + image_id;
|
1865 |
if (!jQuery(image_selector + ":visible").length) {
|
1866 |
+
blocking_counter ++;
|
1867 |
var image = jQuery(image_selector);
|
1868 |
image.hide ().after (image.clone ().attr ('class', '').attr ("id", image_id + '-ajax').
|
1869 |
attr ('src', ajaxurl+'?action=ai_ajax_backend&image=' + image_src + '&ai_check=<?php echo wp_create_nonce ('adinserter_data'); ?>').
|
1873 |
|
1874 |
jQuery("#blocked-warning.warning-enabled").show ();
|
1875 |
jQuery("#blocked-warning.warning-enabled .blocked-warning-text").css ('color', '#00f');
|
1876 |
+
<?php
|
1877 |
+
if (!function_exists ('ai_settings_side')) {
|
1878 |
+
?>
|
1879 |
|
1880 |
+
var blocking_counter = 0;
|
|
|
|
|
|
|
|
|
1881 |
replace_blocked_image ('ai-media-1', 'contextual-1.gif', 'block');
|
1882 |
replace_blocked_image ('ai-media-2', 'contextual-2.jpg', 'block');
|
1883 |
replace_blocked_image ('ai-pro-1', 'icon-256x256.jpg', 'block');
|
1885 |
replace_blocked_image ('ai-stars-img', 'stars.png', 'inline');
|
1886 |
replace_blocked_image ('ai-tw', 'twitter.png', 'inline');
|
1887 |
replace_blocked_image ('ai-fb', 'facebook.png', 'inline');
|
1888 |
+
if (blocking_counter > 5) {
|
1889 |
+
var message = 'Ad blocking test: ' + blocking_counter + ' images not loaded';
|
1890 |
+
console.log ('AD INSERTER:', message);
|
1891 |
+
jQuery("#blocked-warning").attr ('title', message).show ();
|
1892 |
+
jQuery("#blocked-warning .blocked-warning-text").css ('color', '#00f');
|
1893 |
+
}
|
1894 |
+
<?php
|
1895 |
+
}
|
1896 |
+
?>
|
1897 |
}
|
1898 |
</script>
|
1899 |
|
2005 |
<li><a href="http://adinserter.pro/documentation#automatic-insertion" class="simple-link" target="_blank">Automatic insertion</a> before or after post / content / <a href="http://adinserter.pro/documentation#paragraphs" class="simple-link" target="_blank">paragraph</a> / excerpt</li>
|
2006 |
<li><a href="http://adinserter.pro/documentation#automatic-insertion" class="simple-link" target="_blank">Automatic insertion</a> between posts on blog pages</li>
|
2007 |
<li><a href="http://adinserter.pro/documentation#automatic-insertion" class="simple-link" target="_blank">Automatic insertion</a> before, between and after comments</li>
|
2008 |
+
<li>Automatic insertion at <a href="https://adinserter.pro/documentation#custom-hooks" class="simple-link" target="_blank">custom hook positions</a></li>
|
2009 |
<li><a href="https://adinserter.pro/exceptions" class="simple-link" target="_blank">Insertion exceptions</a> for individual posts and pages</li>
|
2010 |
<li><a href="http://adinserter.pro/documentation#manual-insertion" class="simple-link" target="_blank">Manual insertion</a>: widgets, shortcodes, PHP function call</li>
|
2011 |
<li><a href="https://adinserter.pro/alignments-and-styles" class="simple-link" target="_blank">Sticky positions</a> (left, top, right, bottom - ads stay fixed when the page scrolls)</li>
|