AdRotate Banner Manager - Version 5.1.3

Version Description

FREE = * [fix] Outputting generated CSS code more efficient

Download this release

Release Info

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

Code changes from version 5.1.2 to 5.1.3

adrotate-output.php CHANGED
@@ -466,9 +466,57 @@ function adrotate_ad_output($id, $group = 0, $name, $bannercode, $tracker, $imag
466
  return $banner_output;
467
  }
468
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
469
  /*-------------------------------------------------------------
470
  Name: adrotate_scripts
471
- Purpose: Add required scripts to site head
472
  Since: 3.6
473
  -------------------------------------------------------------*/
474
  function adrotate_scripts() {
@@ -498,7 +546,7 @@ function adrotate_scripts() {
498
 
499
  /*-------------------------------------------------------------
500
  Name: adrotate_custom_javascript
501
- Purpose: Add required JavaScript to site
502
  Since: 3.10.5
503
  -------------------------------------------------------------*/
504
  function adrotate_custom_javascript() {
@@ -522,42 +570,6 @@ function adrotate_custom_javascript() {
522
  }
523
  }
524
 
525
- /*-------------------------------------------------------------
526
- Name: adrotate_header
527
- Purpose: Add required CSS to site head
528
- Since: 3.8
529
- -------------------------------------------------------------*/
530
- function adrotate_header() {
531
- global $wpdb, $adrotate_config;
532
-
533
- $generated_css = get_option( 'adrotate_group_css', array() );
534
-
535
- $output = "\n<!-- This site is using AdRotate v".ADROTATE_DISPLAY." to display their advertisements - https://ajdg.solutions/products/adrotate-for-wordpress/ -->\n";
536
- $output .= "<!-- AdRotate CSS -->\n";
537
- $output .= "<style type=\"text/css\" media=\"screen\">\n";
538
- $output .= "\t.g".$adrotate_config['adblock_disguise']." { margin:0px; padding:0px; overflow:hidden; line-height:1; zoom:1; }\n";
539
- $output .= "\t.g".$adrotate_config['adblock_disguise']." img { height:auto; }\n";
540
- $output .= "\t.g".$adrotate_config['adblock_disguise']."-col { position:relative; float:left; }\n";
541
- $output .= "\t.g".$adrotate_config['adblock_disguise']."-col:first-child { margin-left: 0; }\n";
542
- $output .= "\t.g".$adrotate_config['adblock_disguise']."-col:last-child { margin-right: 0; }\n";
543
- foreach($generated_css as $group_id => $css) {
544
- if(strlen($css) > 0) {
545
- $output .= $css;
546
- }
547
- }
548
- unset($generated_css);
549
- $output .= "\t@media only screen and (max-width: 480px) {\n";
550
- $output .= "\t\t.g".$adrotate_config['adblock_disguise']."-col, .g".$adrotate_config['adblock_disguise']."-dyn, .g".$adrotate_config['adblock_disguise']."-single { width:100%; margin-left:0; margin-right:0; }\n";
551
- $output .= "\t}\n";
552
- if($adrotate_config['widgetpadding'] == "Y") {
553
- $output .= ".adrotate_widgets, .ajdg_bnnrwidgets, .ajdg_grpwidgets { overflow:hidden; padding:0; }\n";
554
- }
555
- $output .= "</style>\n";
556
- $output .= "<!-- /AdRotate CSS -->\n\n";
557
-
558
- echo $output;
559
- }
560
-
561
  /*-------------------------------------------------------------
562
  Name: adrotate_nonce_error
563
  Purpose: Display a formatted error if Nonce fails
@@ -717,7 +729,7 @@ function adrotate_notifications_dashboard() {
717
  echo '<div class="updated" style="padding: 0; margin: 0;">';
718
  echo ' <div class="ajdg_notification">';
719
  echo ' <div class="button_div"><a class="button button_large" target="_blank" href="https://ajdg.solutions/products/adrotate-for-wordpress/?add-to-cart=1126">'.__('Get AdRotate Pro', 'adrotate').'</a></div>';
720
- echo ' <div class="text">'.__("Upgrade to <strong>AdRotate Professional</strong> and get Geo Targeting, Schedules and more...", 'adrotate').'<br /><span>'.__('Use discount code <b>getadrotatepro</b> for 10% off on any AdRotate license!', 'adrotate' ).' '.__('Thank you for your support!', 'adrotate' ).'</span></div>';
721
 
722
  echo ' <div class="icon"><img title="" src="'.plugins_url('/images/logo-60x60.png', __FILE__).'" alt=""/></div>';
723
  echo ' </div>';
466
  return $banner_output;
467
  }
468
 
469
+ /*-------------------------------------------------------------
470
+ Name: adrotate_header
471
+ Purpose: Add required CSS to wp_head (action)
472
+ Since: 3.8
473
+ -------------------------------------------------------------*/
474
+ function adrotate_header() {
475
+
476
+ $output = "\n<!-- This site is using AdRotate v".ADROTATE_DISPLAY." to display their advertisements - https://ajdg.solutions/products/adrotate-for-wordpress/ -->\n";
477
+ echo $output;
478
+
479
+ adrotate_custom_css();
480
+ }
481
+
482
+ /*-------------------------------------------------------------
483
+ Name: adrotate_custom_css
484
+ Purpose: Add group CSS to adrotate_header()
485
+ Since: 5.1.2
486
+ -------------------------------------------------------------*/
487
+ function adrotate_custom_css() {
488
+ global $adrotate_config;
489
+
490
+ $generated_css = get_option('adrotate_group_css', array());
491
+
492
+ $output = "<!-- AdRotate CSS -->\n";
493
+ $output .= "<style type=\"text/css\" media=\"screen\">\n";
494
+ $output .= "\t.g { margin:0px; padding:0px; overflow:hidden; line-height:1; zoom:1; }\n";
495
+ $output .= "\t.g img { height:auto; }\n";
496
+ $output .= "\t.g-col { position:relative; float:left; }\n";
497
+ $output .= "\t.g-col:first-child { margin-left: 0; }\n";
498
+ $output .= "\t.g-col:last-child { margin-right: 0; }\n";
499
+ foreach($generated_css as $group_id => $css) {
500
+ if(strlen($css) > 0) {
501
+ $output .= $css;
502
+ }
503
+ }
504
+ unset($generated_css);
505
+ $output .= "\t@media only screen and (max-width: 480px) {\n";
506
+ $output .= "\t\t.g-col, .g-dyn, .g-single { width:100%; margin-left:0; margin-right:0; }\n";
507
+ $output .= "\t}\n";
508
+ if($adrotate_config['widgetpadding'] == "Y") {
509
+ $output .= ".adrotate_widgets, .ajdg_bnnrwidgets, .ajdg_grpwidgets { overflow:hidden; padding:0; }\n";
510
+ }
511
+ $output .= "</style>\n";
512
+ $output .= "<!-- /AdRotate CSS -->\n\n";
513
+
514
+ echo $output;
515
+ }
516
+
517
  /*-------------------------------------------------------------
518
  Name: adrotate_scripts
519
+ Purpose: Add required scripts to wp_enqueue_scripts (action)
520
  Since: 3.6
521
  -------------------------------------------------------------*/
522
  function adrotate_scripts() {
546
 
547
  /*-------------------------------------------------------------
548
  Name: adrotate_custom_javascript
549
+ Purpose: Add required JavaScript to adrotate_scripts()
550
  Since: 3.10.5
551
  -------------------------------------------------------------*/
552
  function adrotate_custom_javascript() {
570
  }
571
  }
572
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
573
  /*-------------------------------------------------------------
574
  Name: adrotate_nonce_error
575
  Purpose: Display a formatted error if Nonce fails
729
  echo '<div class="updated" style="padding: 0; margin: 0;">';
730
  echo ' <div class="ajdg_notification">';
731
  echo ' <div class="button_div"><a class="button button_large" target="_blank" href="https://ajdg.solutions/products/adrotate-for-wordpress/?add-to-cart=1126">'.__('Get AdRotate Pro', 'adrotate').'</a></div>';
732
+ echo ' <div class="text">'.__("Upgrade to <strong>AdRotate Professional</strong> and get features like Geo Targeting, Scheduling and more...", 'adrotate').'<br /><span>'.__('Use discount code <b>iwantadrotatepro</b> for 15% off on any AdRotate license!', 'adrotate' ).' '.__('Thank you for your support!', 'adrotate' ).'</span></div>';
733
 
734
  echo ' <div class="icon"><img title="" src="'.plugins_url('/images/logo-60x60.png', __FILE__).'" alt=""/></div>';
735
  echo ' </div>';
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.2
11
  License: GPLv3
12
  */
13
 
@@ -22,7 +22,7 @@ License: GPLv3
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__);
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.3
11
  License: GPLv3
12
  */
13
 
22
  ------------------------------------------------------------------------------------ */
23
 
24
  /*--- AdRotate values ---------------------------------------*/
25
+ define("ADROTATE_DISPLAY", '5.1.3');
26
  define("ADROTATE_VERSION", 393);
27
  define("ADROTATE_DB_VERSION", 64);
28
  $plugin_folder = plugin_dir_path(__FILE__);
dashboard/adrotatepro.php CHANGED
@@ -80,9 +80,9 @@
80
  <div id="get-pro" class="ajdg-postbox-content">
81
  <p><a href="https://ajdg.solutions/products/adrotate-for-wordpress/" target="_blank"><img src="<?php echo plugins_url('/images/logo-60x60.png', dirname(__FILE__)); ?>" class="alignleft pro-image" /></a><?php _e('AdRotate Pro has a whole lote more functions for even better advertising management. Check out the feature comparison page to see what AdRotate Pro has to offer for you!', 'adrotate'); ?></p>
82
  <a href="https://ajdg.solutions/products/adrotate-for-wordpress/"><img src="<?php echo plugins_url('/images/adrotate-product.png', dirname(__FILE__)); ?>" alt="adrotate-product" width="150" height="150" align="right" style="padding: 0 0 10px 10px;" /></a>
83
- <p><a href="https://ajdg.solutions/product/adrotate-pro-single/" target="_blank"><strong><?php _e('Single License', 'adrotate'); ?> (&euro; 29.00)</strong></a><br /><em><?php _e('One WordPress installation.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1124" target="_blank"><?php _e('Buy now', 'adrotate'); ?> &raquo;</a></em></p>
84
- <p><a href="https://ajdg.solutions/product/adrotate-pro-duo/" target="_blank"><strong><?php _e('Duo License', 'adrotate'); ?> (&euro; 39.00)</strong></a><br /><em><?php _e('Two WordPress installations.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1126" target="_blank"><?php _e('Buy now', 'adrotate'); ?> &raquo;</a></em></p>
85
- <p><a href="https://ajdg.solutions/product/adrotate-pro-multi/" target="_blank"><strong><?php _e('Multi License', 'adrotate'); ?> (&euro; 89.00)</strong></a><br /><em><?php _e('Five WordPress installations.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1128" target="_blank"><?php _e('Buy now', 'adrotate'); ?> &raquo;</a></em></p>
86
  <p><a href="https://ajdg.solutions/product/adrotate-pro-developer/" target="_blank"><strong><?php _e('Developer License', 'adrotate'); ?> (&euro; 199.00)</strong></a><br /><em><?php _e('Unlimited WordPress installations and/or networks.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1130" target="_blank"><?php _e('Buy now', 'adrotate'); ?> &raquo;</a></em></p>
87
  <p><a href="https://ajdg.solutions/products/adrotate-for-wordpress/" target="_blank"><strong><?php _e('Compare licenses', 'adrotate'); ?></strong></a><br /><em><?php _e('Not sure which license is for you? Compare them...', 'adrotate'); ?> <a href="https://ajdg.solutions/products/adrotate-for-wordpress/" target="_blank"><?php _e('All Licenses', 'adrotate'); ?> &raquo;</a></em></p>
88
  </div>
80
  <div id="get-pro" class="ajdg-postbox-content">
81
  <p><a href="https://ajdg.solutions/products/adrotate-for-wordpress/" target="_blank"><img src="<?php echo plugins_url('/images/logo-60x60.png', dirname(__FILE__)); ?>" class="alignleft pro-image" /></a><?php _e('AdRotate Pro has a whole lote more functions for even better advertising management. Check out the feature comparison page to see what AdRotate Pro has to offer for you!', 'adrotate'); ?></p>
82
  <a href="https://ajdg.solutions/products/adrotate-for-wordpress/"><img src="<?php echo plugins_url('/images/adrotate-product.png', dirname(__FILE__)); ?>" alt="adrotate-product" width="150" height="150" align="right" style="padding: 0 0 10px 10px;" /></a>
83
+ <p><a href="https://ajdg.solutions/product/adrotate-pro-single/" target="_blank"><strong><?php _e('Single License', 'adrotate'); ?> (&euro; 39.00)</strong></a><br /><em><?php _e('One WordPress installation.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1124" target="_blank"><?php _e('Buy now', 'adrotate'); ?> &raquo;</a></em></p>
84
+ <p><a href="https://ajdg.solutions/product/adrotate-pro-duo/" target="_blank"><strong><?php _e('Duo License', 'adrotate'); ?> (&euro; 49.00)</strong></a><br /><em><?php _e('Two WordPress installations.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1126" target="_blank"><?php _e('Buy now', 'adrotate'); ?> &raquo;</a></em></p>
85
+ <p><a href="https://ajdg.solutions/product/adrotate-pro-multi/" target="_blank"><strong><?php _e('Multi License', 'adrotate'); ?> (&euro; 99.00)</strong></a><br /><em><?php _e('Five WordPress installations.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1128" target="_blank"><?php _e('Buy now', 'adrotate'); ?> &raquo;</a></em></p>
86
  <p><a href="https://ajdg.solutions/product/adrotate-pro-developer/" target="_blank"><strong><?php _e('Developer License', 'adrotate'); ?> (&euro; 199.00)</strong></a><br /><em><?php _e('Unlimited WordPress installations and/or networks.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1130" target="_blank"><?php _e('Buy now', 'adrotate'); ?> &raquo;</a></em></p>
87
  <p><a href="https://ajdg.solutions/products/adrotate-for-wordpress/" target="_blank"><strong><?php _e('Compare licenses', 'adrotate'); ?></strong></a><br /><em><?php _e('Not sure which license is for you? Compare them...', 'adrotate'); ?> <a href="https://ajdg.solutions/products/adrotate-for-wordpress/" target="_blank"><?php _e('All Licenses', 'adrotate'); ?> &raquo;</a></em></p>
88
  </div>
dashboard/info.php CHANGED
@@ -81,9 +81,9 @@ $partner = mt_rand(1,3);
81
  <div id="get-pro" class="ajdg-postbox-content">
82
  <p><a href="https://ajdg.solutions/products/adrotate-for-wordpress/" target="_blank"><img src="<?php echo plugins_url('/images/logo-60x60.png', dirname(__FILE__)); ?>" class="alignleft pro-image" /></a><?php _e('AdRotate Pro has a whole lote more functions for even better advertising management. Check out the feature comparison page to see what AdRotate Pro has to offer for you!', 'adrotate'); ?></p>
83
  <a href="https://ajdg.solutions/products/adrotate-for-wordpress/"><img src="<?php echo plugins_url('/images/adrotate-product.png', dirname(__FILE__)); ?>" alt="adrotate-product" width="150" height="150" align="right" style="padding: 0 0 10px 10px;" /></a>
84
- <p><a href="https://ajdg.solutions/product/adrotate-pro-single/" target="_blank"><strong><?php _e('Single License', 'adrotate'); ?> (&euro; 29.00)</strong></a><br /><em><?php _e('One WordPress installation.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1124" target="_blank"><?php _e('Buy now', 'adrotate'); ?> &raquo;</a></em></p>
85
- <p><a href="https://ajdg.solutions/product/adrotate-pro-duo/" target="_blank"><strong><?php _e('Duo License', 'adrotate'); ?> (&euro; 39.00)</strong></a><br /><em><?php _e('Two WordPress installations.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1126" target="_blank"><?php _e('Buy now', 'adrotate'); ?> &raquo;</a></em></p>
86
- <p><a href="https://ajdg.solutions/product/adrotate-pro-multi/" target="_blank"><strong><?php _e('Multi License', 'adrotate'); ?> (&euro; 89.00)</strong></a><br /><em><?php _e('Five WordPress installations.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1128" target="_blank"><?php _e('Buy now', 'adrotate'); ?> &raquo;</a></em></p>
87
  <p><a href="https://ajdg.solutions/product/adrotate-pro-developer/" target="_blank"><strong><?php _e('Developer License', 'adrotate'); ?> (&euro; 199.00)</strong></a><br /><em><?php _e('Unlimited WordPress installations and/or networks.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1130" target="_blank"><?php _e('Buy now', 'adrotate'); ?> &raquo;</a></em></p>
88
  <p><a href="https://ajdg.solutions/products/adrotate-for-wordpress/" target="_blank"><strong><?php _e('Compare licenses', 'adrotate'); ?></strong></a><br /><em><?php _e('Not sure which license is for you? Compare them...', 'adrotate'); ?> <a href="https://ajdg.solutions/products/adrotate-for-wordpress/" target="_blank"><?php _e('All Licenses', 'adrotate'); ?> &raquo;</a></em></p>
89
  </div>
81
  <div id="get-pro" class="ajdg-postbox-content">
82
  <p><a href="https://ajdg.solutions/products/adrotate-for-wordpress/" target="_blank"><img src="<?php echo plugins_url('/images/logo-60x60.png', dirname(__FILE__)); ?>" class="alignleft pro-image" /></a><?php _e('AdRotate Pro has a whole lote more functions for even better advertising management. Check out the feature comparison page to see what AdRotate Pro has to offer for you!', 'adrotate'); ?></p>
83
  <a href="https://ajdg.solutions/products/adrotate-for-wordpress/"><img src="<?php echo plugins_url('/images/adrotate-product.png', dirname(__FILE__)); ?>" alt="adrotate-product" width="150" height="150" align="right" style="padding: 0 0 10px 10px;" /></a>
84
+ <p><a href="https://ajdg.solutions/product/adrotate-pro-single/" target="_blank"><strong><?php _e('Single License', 'adrotate'); ?> (&euro; 39.00)</strong></a><br /><em><?php _e('One WordPress installation.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1124" target="_blank"><?php _e('Buy now', 'adrotate'); ?> &raquo;</a></em></p>
85
+ <p><a href="https://ajdg.solutions/product/adrotate-pro-duo/" target="_blank"><strong><?php _e('Duo License', 'adrotate'); ?> (&euro; 49.00)</strong></a><br /><em><?php _e('Two WordPress installations.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1126" target="_blank"><?php _e('Buy now', 'adrotate'); ?> &raquo;</a></em></p>
86
+ <p><a href="https://ajdg.solutions/product/adrotate-pro-multi/" target="_blank"><strong><?php _e('Multi License', 'adrotate'); ?> (&euro; 99.00)</strong></a><br /><em><?php _e('Five WordPress installations.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1128" target="_blank"><?php _e('Buy now', 'adrotate'); ?> &raquo;</a></em></p>
87
  <p><a href="https://ajdg.solutions/product/adrotate-pro-developer/" target="_blank"><strong><?php _e('Developer License', 'adrotate'); ?> (&euro; 199.00)</strong></a><br /><em><?php _e('Unlimited WordPress installations and/or networks.', 'adrotate'); ?> <a href="https://ajdg.solutions/cart/?add-to-cart=1130" target="_blank"><?php _e('Buy now', 'adrotate'); ?> &raquo;</a></em></p>
88
  <p><a href="https://ajdg.solutions/products/adrotate-for-wordpress/" target="_blank"><strong><?php _e('Compare licenses', 'adrotate'); ?></strong></a><br /><em><?php _e('Not sure which license is for you? Compare them...', 'adrotate'); ?> <a href="https://ajdg.solutions/products/adrotate-for-wordpress/" target="_blank"><?php _e('All Licenses', 'adrotate'); ?> &raquo;</a></em></p>
89
  </div>
readme.txt CHANGED
@@ -1,11 +1,11 @@
1
  === AdRotate Banner Manager ===
2
  Contributors: adegans
3
  Donate link: https://www.arnan.me/donate.html
4
- Tags: ads, advert, banner, advertising, doubleclick, responsive adverts, ad manager, banner manager, advert manager, monetise, advertisement, adsense
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,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.2 FREE =
102
  * [fix] Group CSS not always rendered when saving groups
103
 
1
  === AdRotate Banner Manager ===
2
  Contributors: adegans
3
  Donate link: https://www.arnan.me/donate.html
4
+ Tags: banner manager, ads manager, banner, banners, ads, advertisement, html5, adsense, advertising, adsense, doubleclick, advert
5
+ Requires at least: 4.0
6
  Requires PHP: 5.6
7
+ Tested up to: 5.2.1
8
+ Stable tag: 5.1.3
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.3 FREE =
102
+ * [fix] Outputting generated CSS code more efficient
103
+
104
  = 5.1.2 FREE =
105
  * [fix] Group CSS not always rendered when saving groups
106