AdRotate Banner Manager - Version 5.1.2

Version Description

FREE = * [fix] Group CSS not always rendered when saving groups

Download this release

Release Info

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

Code changes from version 5.1.1 to 5.1.2

Files changed (3) hide show
  1. adrotate-manage-publisher.php +60 -60
  2. adrotate.php +2 -2
  3. readme.txt +4 -1
adrotate-manage-publisher.php CHANGED
@@ -221,67 +221,7 @@ function adrotate_insert_input() {
221
  // Verify all ads
222
  adrotate_prepare_evaluate_ads(false);
223
  }
224
-
225
- // Generate CSS for group
226
- if($align == 0) { // None
227
- $group_align = '';
228
- } else if($align == 1) { // Left
229
- $group_align = ' float:left; clear:left;';
230
- } else if($align == 2) { // Right
231
- $group_align = ' float:right; clear:right;';
232
- } else if($align == 3) { // Center
233
- $group_align = ' margin: 0 auto;';
234
- }
235
-
236
- $output_css = "";
237
- if($modus == 0 AND ($admargin_top > 0 OR $admargin_right > 0 OR $admargin_bottom > 0 OR $admargin_left > 0 OR $align > 0)) { // Single ad group
238
- if($align < 3) {
239
- $output_css .= "\t.g".$adrotate_config['adblock_disguise']."-".$id." { margin:".$admargin_top."px ".$admargin_right."px ".$admargin_bottom."px ".$admargin_left."px;".$group_align." }\n";
240
- } else {
241
- $output_css .= "\t.g".$adrotate_config['adblock_disguise']."-".$id." { ".$group_align." }\n";
242
- }
243
- }
244
-
245
- if($modus == 1) { // Dynamic group
246
- if($adwidth != 'auto') {
247
- $width = "width:100%; max-width:".$adwidth."px;";
248
- } else {
249
- $width = "width:auto;";
250
- }
251
-
252
- if($adheight != 'auto') {
253
- $height = "height:100%; max-height:".$adheight."px;";
254
- } else {
255
- $height = "height:auto;";
256
- }
257
-
258
- if($align < 3) {
259
- $output_css .= "\t.g".$adrotate_config['adblock_disguise']."-".$id." { margin:".$admargin_top."px ".$admargin_right."px ".$admargin_bottom."px ".$admargin_left."px;".$width." ".$height.$group_align." }\n";
260
- } else {
261
- $output_css .= "\t.g".$adrotate_config['adblock_disguise']."-".$id." { ".$width." ".$height.$group_align." }\n";
262
- }
263
-
264
- unset($width_sum, $width, $height_sum, $height);
265
- }
266
-
267
- if($modus == 2) { // Block group
268
- if($adwidth != 'auto') {
269
- $width_sum = $columns * ($admargin_left + $adwidth + $admargin_right);
270
- $grid_width = "min-width:".$admargin_left."px; max-width:".$width_sum."px;";
271
- } else {
272
- $grid_width = "width:auto;";
273
- }
274
-
275
- $output_css .= "\t.g".$adrotate_config['adblock_disguise']."-".$id." { ".$grid_width.$group_align." }\n";
276
- $output_css .= "\t.b".$adrotate_config['adblock_disguise']."-".$id." { margin:".$admargin_top."px ".$admargin_right."px ".$admargin_bottom."px ".$admargin_left."px; }\n";
277
- unset($width_sum, $grid_width, $height_sum, $grid_height);
278
- }
279
 
280
- $group_css = get_option('adrotate_group_css');
281
- $group_css[$id] = $output_css;
282
- update_option('adrotate_group_css', $group_css);
283
- // end CSS
284
-
285
  adrotate_return('adrotate-ads', 200);
286
  exit;
287
  } else {
@@ -400,6 +340,66 @@ function adrotate_insert_group() {
400
  $dynamic_count = $wpdb->get_var("SELECT COUNT(*) as `total` FROM `{$wpdb->prefix}adrotate_groups` WHERE `name` != '' AND `modus` = 1;");
401
  update_option('adrotate_dynamic_required', $dynamic_count);
402
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
403
  adrotate_return('adrotate-groups', 201);
404
  exit;
405
  } else {
221
  // Verify all ads
222
  adrotate_prepare_evaluate_ads(false);
223
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
224
 
 
 
 
 
 
225
  adrotate_return('adrotate-ads', 200);
226
  exit;
227
  } else {
340
  $dynamic_count = $wpdb->get_var("SELECT COUNT(*) as `total` FROM `{$wpdb->prefix}adrotate_groups` WHERE `name` != '' AND `modus` = 1;");
341
  update_option('adrotate_dynamic_required', $dynamic_count);
342
 
343
+ // Generate CSS for group
344
+ if($align == 0) { // None
345
+ $group_align = "";
346
+ } else if($align == 1) { // Left
347
+ $group_align = " float:left; clear:left;";
348
+ } else if($align == 2) { // Right
349
+ $group_align = " float:right; clear:right;";
350
+ } else if($align == 3) { // Center
351
+ $group_align = " margin: 0 auto;";
352
+ }
353
+
354
+ $output_css = "";
355
+ if($modus == 0 AND ($admargin > 0 OR $align > 0)) { // Single ad group
356
+ if($align < 3) {
357
+ $output_css .= "\t.g".$adrotate_config['adblock_disguise']."-".$id." { margin:".$admargin."px ".$group_align." }\n";
358
+ } else {
359
+ $output_css .= "\t.g".$adrotate_config['adblock_disguise']."-".$id." { ".$group_align." }\n";
360
+ }
361
+ }
362
+
363
+ if($modus == 1) { // Dynamic group
364
+ if($adwidth != 'auto') {
365
+ $width = " width:100%; max-width:".$adwidth."px;";
366
+ } else {
367
+ $width = " width:auto;";
368
+ }
369
+
370
+ if($adheight != 'auto') {
371
+ $height = " height:100%; max-height:".$adheight."px;";
372
+ } else {
373
+ $height = " height:auto;";
374
+ }
375
+
376
+ if($align < 3) {
377
+ $output_css .= "\t.g".$adrotate_config['adblock_disguise']."-".$id." { margin:".$admargin."px".$width.$height.$group_align." }\n";
378
+ } else {
379
+ $output_css .= "\t.g".$adrotate_config['adblock_disguise']."-".$id." {".$width.$height.$group_align." }\n";
380
+ }
381
+
382
+ unset($width_sum, $width, $height_sum, $height);
383
+ }
384
+
385
+ if($modus == 2) { // Block group
386
+ if($adwidth != 'auto') {
387
+ $width_sum = $columns * ($adwidth + ($admargin * 2));
388
+ $grid_width = "min-width:".$admargin."px; max-width:".$width_sum."px;";
389
+ } else {
390
+ $grid_width = "width:auto;";
391
+ }
392
+
393
+ $output_css .= "\t.g".$adrotate_config['adblock_disguise']."-".$id." { ".$grid_width.$group_align." }\n";
394
+ $output_css .= "\t.b".$adrotate_config['adblock_disguise']."-".$id." { margin:".$admargin."px; }\n";
395
+ unset($width_sum, $grid_width, $height_sum, $grid_height);
396
+ }
397
+
398
+ $group_css = get_option('adrotate_group_css');
399
+ $group_css[$id] = $output_css;
400
+ update_option('adrotate_group_css', $group_css);
401
+ // end CSS
402
+
403
  adrotate_return('adrotate-groups', 201);
404
  exit;
405
  } else {
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: 5.1.1
11
  License: GPLv3
12
  */
13
 
@@ -22,7 +22,7 @@ License: GPLv3
22
  ------------------------------------------------------------------------------------ */
23
 
24
  /*--- AdRotate values ---------------------------------------*/
25
- define("ADROTATE_DISPLAY", '5.1.1');
26
  define("ADROTATE_VERSION", 393);
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: 5.1.2
11
  License: GPLv3
12
  */
13
 
22
  ------------------------------------------------------------------------------------ */
23
 
24
  /*--- AdRotate values ---------------------------------------*/
25
+ define("ADROTATE_DISPLAY", '5.1.2');
26
  define("ADROTATE_VERSION", 393);
27
  define("ADROTATE_DB_VERSION", 64);
28
  $plugin_folder = plugin_dir_path(__FILE__);
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: ads, advert, banner, advertising, doubleclick, responsive adverts, ad mana
5
  Requires at least: 3.8
6
  Requires PHP: 5.6
7
  Tested up to: 5.2
8
- Stable tag: 5.1.1
9
  License: GPLv3
10
 
11
  Monetise your website with adverts while keeping things simple. Start making money today!
@@ -98,6 +98,9 @@ You can also post your questions on the [forum](https://ajdg.solutions/forums/)!
98
 
99
  Be a Professional and go Pro. With [AdRotate Professional](https://ajdg.solutions/plugins/adrotate-for-wordpress/)!
100
 
 
 
 
101
  = 5.1.1 FREE =
102
  * [fix] Blinking adverts in Dynamic Groups
103
 
5
  Requires at least: 3.8
6
  Requires PHP: 5.6
7
  Tested up to: 5.2
8
+ Stable tag: 5.1.2
9
  License: GPLv3
10
 
11
  Monetise your website with adverts while keeping things simple. Start making money today!
98
 
99
  Be a Professional and go Pro. With [AdRotate Professional](https://ajdg.solutions/plugins/adrotate-for-wordpress/)!
100
 
101
+ = 5.1.2 FREE =
102
+ * [fix] Group CSS not always rendered when saving groups
103
+
104
  = 5.1.1 FREE =
105
  * [fix] Blinking adverts in Dynamic Groups
106