AdRotate Banner Manager - Version 4.15.1

Version Description

FREE = * [fix] Post injection not always working with Caching plugins

Download this release

Release Info

Developer adegans
Plugin Icon 128x128 AdRotate Banner Manager
Version 4.15.1
Comparing to
See all releases

Code changes from version 4.15 to 4.15.1

adrotate-functions.php CHANGED
@@ -9,57 +9,6 @@
9
  * liability that might arise from it's use.
10
  ------------------------------------------------------------------------------------ */
11
 
12
- /*-------------------------------------------------------------
13
- Name: adrotate_shortcode
14
- Purpose: Prepare function requests for calls on shortcodes
15
- Since: 0.7
16
- -------------------------------------------------------------*/
17
- function adrotate_shortcode($atts, $content = null) {
18
- global $adrotate_config;
19
-
20
- $banner_id = $group_ids = 0;
21
- if(!empty($atts['banner'])) $banner_id = trim($atts['banner'], "\r\t ");
22
- if(!empty($atts['group'])) $group_ids = trim($atts['group'], "\r\t ");
23
- if(!empty($atts['fallback'])) $fallback = 0; // Not supported in free version
24
- if(!empty($atts['weight'])) $weight = 0; // Not supported in free version
25
- if(!empty($atts['site'])) $site = 0; // Not supported in free version
26
-
27
- $output = '';
28
- if($adrotate_config['w3caching'] == "Y") {
29
- $output .= '<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
30
- if($banner_id > 0 AND ($group_ids == 0 OR $group_ids > 0)) { // Show one Ad
31
- $output .= 'echo adrotate_ad('.$banner_id.', true, 0, 0);';
32
- }
33
- if($banner_id == 0 AND $group_ids > 0) { // Show group
34
- $output .= 'echo adrotate_group('.$group_ids.', 0, 0, 0);';
35
- }
36
- $output .= '<!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
37
- } else if($adrotate_config['borlabscache'] == "Y" AND function_exists('BorlabsCacheHelper') AND BorlabsCacheHelper()->willFragmentCachingPerform()) {
38
- $borlabsphrase = BorlabsCacheHelper()->getFragmentCachingPhrase();
39
-
40
- $output .= '<!--[borlabs cache start: '.$borlabsphrase.']--> ';
41
- if($banner_id > 0 AND ($group_ids == 0 OR $group_ids > 0)) { // Show one Ad
42
- $output .= 'echo adrotate_ad('.$banner_id.', true, 0, 0);';
43
- }
44
- if($banner_id == 0 AND $group_ids > 0) { // Show group
45
- $output .= 'echo adrotate_group('.$group_ids.', 0, 0, 0);';
46
- }
47
- $output .= ' <!--[borlabs cache end: '.$borlabsphrase.']-->';
48
-
49
- unset($borlabsphrase);
50
- } else {
51
- if($banner_id > 0 AND ($group_ids == 0 OR $group_ids > 0)) { // Show one Ad
52
- $output .= adrotate_ad($banner_id, true, 0, 0);
53
- }
54
-
55
- if($banner_id == 0 AND $group_ids > 0) { // Show group
56
- $output .= adrotate_group($group_ids, 0, 0, 0);
57
- }
58
- }
59
-
60
- return $output;
61
- }
62
-
63
  /*-------------------------------------------------------------
64
  Name: adrotate_is_networked
65
  Purpose: Determine if AdRotate is network activated
9
  * liability that might arise from it's use.
10
  ------------------------------------------------------------------------------------ */
11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  /*-------------------------------------------------------------
13
  Name: adrotate_is_networked
14
  Purpose: Determine if AdRotate is network activated
adrotate-output.php CHANGED
@@ -217,6 +217,57 @@ function adrotate_group($group_ids, $fallback = 0, $weight = 0, $site = 0) {
217
  return $output;
218
  }
219
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
220
  /*-------------------------------------------------------------
221
  Name: adrotate_inject_posts
222
  Purpose: Add an advert to a single post
@@ -271,6 +322,7 @@ function adrotate_inject_posts($post_content) {
271
 
272
  if($group_count > 0) {
273
  $before = $after = $inside = 0;
 
274
  foreach($group_array as $group_id => $group) {
275
  if(is_page($group['ids']) OR has_category($group['ids'])) {
276
  // Caching or not?
@@ -280,9 +332,11 @@ function adrotate_inject_posts($post_content) {
280
  $advert_output .= '<!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
281
  } else if($adrotate_config['borlabscache'] == "Y" AND function_exists('BorlabsCacheHelper') AND BorlabsCacheHelper()->willFragmentCachingPerform()) {
282
  $borlabsphrase = BorlabsCacheHelper()->getFragmentCachingPhrase();
 
283
  $advert_output = '<!--[borlabs cache start: '.$borlabsphrase.']-->';
284
  $advert_output .= 'echo adrotate_group('.$group_id.');';
285
  $advert_output .= '<!--[borlabs cache end: '.$borlabsphrase.']-->';
 
286
  unset($borlabsphrase);
287
  } else {
288
  $advert_output = adrotate_group($group_id);
@@ -326,7 +380,7 @@ function adrotate_inject_posts($post_content) {
326
  }
327
  }
328
  }
329
- unset($group_array, $before, $after, $inside);
330
  }
331
 
332
  return $post_content;
217
  return $output;
218
  }
219
 
220
+ /*-------------------------------------------------------------
221
+ Name: adrotate_shortcode
222
+ Purpose: Prepare function requests for calls on shortcodes
223
+ Since: 0.7
224
+ -------------------------------------------------------------*/
225
+ function adrotate_shortcode($atts, $content = null) {
226
+ global $adrotate_config;
227
+
228
+ $banner_id = $group_ids = 0;
229
+ if(!empty($atts['banner'])) $banner_id = trim($atts['banner'], "\r\t ");
230
+ if(!empty($atts['group'])) $group_ids = trim($atts['group'], "\r\t ");
231
+ if(!empty($atts['fallback'])) $fallback = 0; // Not supported in free version
232
+ if(!empty($atts['weight'])) $weight = 0; // Not supported in free version
233
+ if(!empty($atts['site'])) $site = 0; // Not supported in free version
234
+
235
+ $output = '';
236
+ if($adrotate_config['w3caching'] == "Y") {
237
+ $output .= '<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
238
+ if($banner_id > 0 AND ($group_ids == 0 OR $group_ids > 0)) { // Show one Ad
239
+ $output .= 'echo adrotate_ad('.$banner_id.', true);';
240
+ }
241
+ if($banner_id == 0 AND $group_ids > 0) { // Show group
242
+ $output .= 'echo adrotate_group('.$group_ids.');';
243
+ }
244
+ $output .= '<!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
245
+ } else if($adrotate_config['borlabscache'] == "Y" AND function_exists('BorlabsCacheHelper') AND BorlabsCacheHelper()->willFragmentCachingPerform()) {
246
+ $borlabsphrase = BorlabsCacheHelper()->getFragmentCachingPhrase();
247
+
248
+ $output .= '<!--[borlabs cache start: '.$borlabsphrase.']--> ';
249
+ if($banner_id > 0 AND ($group_ids == 0 OR $group_ids > 0)) { // Show one Ad
250
+ $output .= 'echo adrotate_ad('.$banner_id.', true);';
251
+ }
252
+ if($banner_id == 0 AND $group_ids > 0) { // Show group
253
+ $output .= 'echo adrotate_group('.$group_ids.');';
254
+ }
255
+ $output .= ' <!--[borlabs cache end: '.$borlabsphrase.']-->';
256
+
257
+ unset($borlabsphrase);
258
+ } else {
259
+ if($banner_id > 0 AND ($group_ids == 0 OR $group_ids > 0)) { // Show one Ad
260
+ $output .= adrotate_ad($banner_id, true);
261
+ }
262
+
263
+ if($banner_id == 0 AND $group_ids > 0) { // Show group
264
+ $output .= adrotate_group($group_ids);
265
+ }
266
+ }
267
+
268
+ return $output;
269
+ }
270
+
271
  /*-------------------------------------------------------------
272
  Name: adrotate_inject_posts
273
  Purpose: Add an advert to a single post
322
 
323
  if($group_count > 0) {
324
  $before = $after = $inside = 0;
325
+ $advert_output = '';
326
  foreach($group_array as $group_id => $group) {
327
  if(is_page($group['ids']) OR has_category($group['ids'])) {
328
  // Caching or not?
332
  $advert_output .= '<!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
333
  } else if($adrotate_config['borlabscache'] == "Y" AND function_exists('BorlabsCacheHelper') AND BorlabsCacheHelper()->willFragmentCachingPerform()) {
334
  $borlabsphrase = BorlabsCacheHelper()->getFragmentCachingPhrase();
335
+
336
  $advert_output = '<!--[borlabs cache start: '.$borlabsphrase.']-->';
337
  $advert_output .= 'echo adrotate_group('.$group_id.');';
338
  $advert_output .= '<!--[borlabs cache end: '.$borlabsphrase.']-->';
339
+
340
  unset($borlabsphrase);
341
  } else {
342
  $advert_output = adrotate_group($group_id);
380
  }
381
  }
382
  }
383
+ unset($group_array, $before, $after, $inside, $advert_output);
384
  }
385
 
386
  return $post_content;
adrotate-widget.php CHANGED
@@ -55,11 +55,11 @@ class adrotate_widgets extends WP_Widget {
55
  if($adrotate_config['w3caching'] == 'Y') {
56
  echo '<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
57
  if($instance['type'] == "single") {
58
- echo 'echo adrotate_ad('.$instance['adid'].', true, 0, 0, 0);';
59
  }
60
 
61
  if($instance['type'] == "group") {
62
- echo 'echo adrotate_group('.$instance['adid'].', 0, 0, 0);';
63
  }
64
  echo '<!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
65
  } else if($adrotate_config['borlabscache'] == "Y" AND function_exists('BorlabsCacheHelper') AND BorlabsCacheHelper()->willFragmentCachingPerform()) {
@@ -67,22 +67,22 @@ class adrotate_widgets extends WP_Widget {
67
 
68
  echo '<!--[borlabs cache start: '.$borlabsphrase.']-->';
69
  if($instance['type'] == "single") {
70
- echo adrotate_ad($instance['adid'], true, 0, 0, 0);
71
  }
72
 
73
  if($instance['type'] == "group") {
74
- echo adrotate_group($instance['adid'], 0, 0, 0);
75
  }
76
  echo '<!--[borlabs cache end: '.$borlabsphrase.']-->';
77
 
78
  unset($borlabsphrase);
79
  } else {
80
  if($instance['type'] == "single") {
81
- echo adrotate_ad($instance['adid'], true, 0, 0, 0);
82
  }
83
 
84
  if($instance['type'] == "group") {
85
- echo adrotate_group($instance['adid'], 0, 0, 0);
86
  }
87
  }
88
 
55
  if($adrotate_config['w3caching'] == 'Y') {
56
  echo '<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
57
  if($instance['type'] == "single") {
58
+ echo 'echo adrotate_ad('.$instance['adid'].', true);';
59
  }
60
 
61
  if($instance['type'] == "group") {
62
+ echo 'echo adrotate_group('.$instance['adid'].');';
63
  }
64
  echo '<!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
65
  } else if($adrotate_config['borlabscache'] == "Y" AND function_exists('BorlabsCacheHelper') AND BorlabsCacheHelper()->willFragmentCachingPerform()) {
67
 
68
  echo '<!--[borlabs cache start: '.$borlabsphrase.']-->';
69
  if($instance['type'] == "single") {
70
+ echo 'echo adrotate_ad('.$instance['adid'].', true);';
71
  }
72
 
73
  if($instance['type'] == "group") {
74
+ echo 'echo adrotate_group('.$instance['adid'].');';
75
  }
76
  echo '<!--[borlabs cache end: '.$borlabsphrase.']-->';
77
 
78
  unset($borlabsphrase);
79
  } else {
80
  if($instance['type'] == "single") {
81
+ echo adrotate_ad($instance['adid'], true);
82
  }
83
 
84
  if($instance['type'] == "group") {
85
+ echo adrotate_group($instance['adid']);
86
  }
87
  }
88
 
adrotate.php CHANGED
@@ -7,7 +7,7 @@ Author URI: https://www.arnan.me/
7
  Description: AdRotate Banner Manager - Monetise your website with adverts while keeping things simple. Start making money today!
8
  Text Domain: adrotate
9
  Domain Path: /languages/
10
- Version: 4.15
11
  License: GPLv3
12
  */
13
 
@@ -22,7 +22,7 @@ License: GPLv3
22
  ------------------------------------------------------------------------------------ */
23
 
24
  /*--- AdRotate values ---------------------------------------*/
25
- define("ADROTATE_DISPLAY", '4.15');
26
  define("ADROTATE_VERSION", 392);
27
  define("ADROTATE_DB_VERSION", 64);
28
  $plugin_folder = plugin_dir_path(__FILE__);
7
  Description: AdRotate Banner Manager - Monetise your website with adverts while keeping things simple. Start making money today!
8
  Text Domain: adrotate
9
  Domain Path: /languages/
10
+ Version: 4.15.1
11
  License: GPLv3
12
  */
13
 
22
  ------------------------------------------------------------------------------------ */
23
 
24
  /*--- AdRotate values ---------------------------------------*/
25
+ define("ADROTATE_DISPLAY", '4.15.1');
26
  define("ADROTATE_VERSION", 392);
27
  define("ADROTATE_DB_VERSION", 64);
28
  $plugin_folder = plugin_dir_path(__FILE__);
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.arnan.me/donate.html
4
  Tags: ads, advert, adsense, advertising, doubleclick, responsive adverts, ad manager, banner manager, advert manager, monetise, advertisement, banner
5
  Requires at least: 3.8
6
  Tested up to: 5.0
7
- Stable tag: 4.15
8
  License: GPLv3
9
 
10
  Monetise your website with adverts while keeping things simple. Start making money today!
@@ -97,10 +97,16 @@ You can also post your questions on the [forum](https://ajdg.solutions/forums/)!
97
 
98
  Be a Professional and go Pro. With [AdRotate Professional](https://ajdg.solutions/plugins/adrotate-for-wordpress/)!
99
 
 
 
 
100
  = 4.15 FREE =
101
  * [new] Post injection now compatible with Caching plugins
102
  * [i18n] Updated translations
103
 
 
 
 
104
  = 4.18 PRO =
105
  * [change] Now uses AdRotate Geo v5
106
  * [new] Post injection now compatible with Caching plugins
4
  Tags: ads, advert, adsense, advertising, doubleclick, responsive adverts, ad manager, banner manager, advert manager, monetise, advertisement, banner
5
  Requires at least: 3.8
6
  Tested up to: 5.0
7
+ Stable tag: 4.15.1
8
  License: GPLv3
9
 
10
  Monetise your website with adverts while keeping things simple. Start making money today!
97
 
98
  Be a Professional and go Pro. With [AdRotate Professional](https://ajdg.solutions/plugins/adrotate-for-wordpress/)!
99
 
100
+ = 4.15.1 FREE =
101
+ * [fix] Post injection not always working with Caching plugins
102
+
103
  = 4.15 FREE =
104
  * [new] Post injection now compatible with Caching plugins
105
  * [i18n] Updated translations
106
 
107
+ = 4.18.1 PRO =
108
+ * [fix] Post injection not always working with Caching plugins
109
+
110
  = 4.18 PRO =
111
  * [change] Now uses AdRotate Geo v5
112
  * [new] Post injection now compatible with Caching plugins