AdRotate Banner Manager - Version 5.7.1

Version Description

Enjoy this latest update with the latest tweaks and fixes to further improve AdRotate for WordPress!

Download this release

Release Info

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

Code changes from version 5.7 to 5.7.1

adrotate-export.php CHANGED
@@ -43,30 +43,19 @@ function adrotate_export_ads($ids) {
43
$starttime = $wpdb->get_var("SELECT `starttime` FROM `{$wpdb->prefix}adrotate_schedule`, `{$wpdb->prefix}adrotate_linkmeta` WHERE `ad` = '".$export['id']."' AND `schedule` = `{$wpdb->prefix}adrotate_schedule`.`id` ORDER BY `starttime` ASC LIMIT 1;");
44
$stoptime = $wpdb->get_var("SELECT `stoptime` FROM `{$wpdb->prefix}adrotate_schedule`, `{$wpdb->prefix}adrotate_linkmeta` WHERE `ad` = '".$export['id']."' AND `schedule` = `{$wpdb->prefix}adrotate_schedule`.`id` ORDER BY `stoptime` DESC LIMIT 1;");
45
46
- if(!is_array($export['cities'])) $export['cities'] = array();
47
- if(!is_array($export['countries'])) $export['countries'] = array();
48
49
$adverts[$export['id']] = array(
50
- 'id' => $export['id'],
51
- 'title' => $export['title'],
52
- 'bannercode' => stripslashes($export['bannercode']),
53
- 'imagetype' => (empty($export['imagetype'])) ? null : $export['imagetype'],
54
- 'image' => (empty($export['image'])) ? null : $export['image'],
55
- 'tracker' => $export['tracker'],
56
- 'desktop' => $export['desktop'],
57
- 'mobile' => $export['mobile'],
58
- 'tablet' => $export['tablet'],
59
- 'os_ios' => $export['os_ios'],
60
- 'os_android' => $export['os_android'],
61
- 'os_other' => $export['os_other'],
62
- 'weight' => $export['weight'],
63
- 'budget' => $export['budget'],
64
- 'crate' => $export['crate'],
65
- 'irate' => $export['irate'],
66
- 'cities' => (empty($export['cities'])) ? null : implode(',', maybe_unserialize($export['cities'])),
67
- 'countries' => (empty($export['countries'])) ? null : implode(',', maybe_unserialize($export['countries'])),
68
- 'schedule_start' => $starttime,
69
- 'schedule_end' => $stoptime,
70
);
71
}
72
@@ -77,9 +66,11 @@ function adrotate_export_ads($ids) {
77
78
if($fp) {
79
$generated = array('Generated', date_i18n("M d Y, H:i:s"));
80
$keys = array('id', 'name', 'bannercode', 'imagetype', 'image_url', 'enable_stats', 'show_desktop', 'show_mobile', 'show_tablet', 'show_ios', 'show_android', 'show_otheros', 'weight', 'budget', 'click_rate', 'impression_rate', 'geo_cities', 'geo_countries', 'schedule_start', 'schedule_end');
81
82
fputcsv($fp, $generated);
83
fputcsv($fp, $keys);
84
foreach($adverts as $advert) {
85
fputcsv($fp, $advert);
43
$starttime = $wpdb->get_var("SELECT `starttime` FROM `{$wpdb->prefix}adrotate_schedule`, `{$wpdb->prefix}adrotate_linkmeta` WHERE `ad` = '".$export['id']."' AND `schedule` = `{$wpdb->prefix}adrotate_schedule`.`id` ORDER BY `starttime` ASC LIMIT 1;");
44
$stoptime = $wpdb->get_var("SELECT `stoptime` FROM `{$wpdb->prefix}adrotate_schedule`, `{$wpdb->prefix}adrotate_linkmeta` WHERE `ad` = '".$export['id']."' AND `schedule` = `{$wpdb->prefix}adrotate_schedule`.`id` ORDER BY `stoptime` DESC LIMIT 1;");
45
46
+ $export['imagetype'] = (empty($export['imagetype'])) ? '' : $export['imagetype'];
47
+ $export['image'] = (empty($export['image'])) ? '' : $export['image'];
48
+ $export['cities'] = (empty($export['cities'])) ? serialize(array()) : $export['cities'];
49
+ $export['countries'] = (empty($export['countries'])) ? serialize(array()) : $export['countries'];
50
51
$adverts[$export['id']] = array(
52
+ 'id' => $export['id'], 'title' => $export['title'], 'bannercode' => stripslashes($export['bannercode']),
53
+ 'imagetype' => $export['imagetype'], 'image' => $export['image'],
54
+ 'tracker' => $export['tracker'], 'desktop' => $export['desktop'], 'mobile' => $export['mobile'], 'tablet' => $export['tablet'],
55
+ 'os_ios' => $export['os_ios'], 'os_android' => $export['os_android'], 'os_other' => $export['os_other'],
56
+ 'weight' => $export['weight'], 'budget' => $export['budget'], 'crate' => $export['crate'], 'irate' => $export['irate'],
57
+ 'cities' => $export['cities'], 'countries' => $export['countries'],
58
+ 'schedule_start' => $starttime, 'schedule_end' => $stoptime
59
);
60
}
61
66
67
if($fp) {
68
$generated = array('Generated', date_i18n("M d Y, H:i:s"));
69
+ $version = array('Version', 'AdRotate '.ADROTATE_DISPLAY);
70
$keys = array('id', 'name', 'bannercode', 'imagetype', 'image_url', 'enable_stats', 'show_desktop', 'show_mobile', 'show_tablet', 'show_ios', 'show_android', 'show_otheros', 'weight', 'budget', 'click_rate', 'impression_rate', 'geo_cities', 'geo_countries', 'schedule_start', 'schedule_end');
71
72
fputcsv($fp, $generated);
73
+ fputcsv($fp, $version);
74
fputcsv($fp, $keys);
75
foreach($adverts as $advert) {
76
fputcsv($fp, $advert);
adrotate-manage-publisher.php CHANGED
@@ -129,7 +129,6 @@ function adrotate_insert_input() {
129
// Sort out start dates
130
if(strlen($start_date) > 0) {
131
list($start_day, $start_month, $start_year) = explode('-', $start_date); // dd/mm/yyyy
132
- $start_month = (!is_numeric($start_month)) ? date("m", strtotime($start_month."-".$start_year)) : $start_month; // Convert month to number
133
} else {
134
$start_year = $start_month = $start_day = 0;
135
}
@@ -146,7 +145,6 @@ function adrotate_insert_input() {
146
// Sort out end dates
147
if(strlen($end_date) > 0) {
148
list($end_day, $end_month, $end_year) = explode('-', $end_date); // dd/mm/yyyy
149
- $end_month = (!is_numeric($end_month)) ? date("m", strtotime($end_month."-".$end_year)) : $end_month; // Convert month to number
150
} else {
151
$end_year = $end_month = $end_day = 0;
152
}
129
// Sort out start dates
130
if(strlen($start_date) > 0) {
131
list($start_day, $start_month, $start_year) = explode('-', $start_date); // dd/mm/yyyy
132
} else {
133
$start_year = $start_month = $start_day = 0;
134
}
145
// Sort out end dates
146
if(strlen($end_date) > 0) {
147
list($end_day, $end_month, $end_year) = explode('-', $end_date); // dd/mm/yyyy
148
} else {
149
$end_year = $end_month = $end_day = 0;
150
}
adrotate-output.php CHANGED
@@ -218,19 +218,21 @@ function adrotate_shortcode($atts, $content = null) {
218
$output .= 'echo adrotate_group('.$group_ids.');';
219
}
220
$output .= '<!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
221
- } else if($adrotate_config['borlabscache'] == "Y" AND function_exists('BorlabsCacheHelper') AND BorlabsCacheHelper()->willFragmentCachingPerform()) {
222
- $borlabsphrase = BorlabsCacheHelper()->getFragmentCachingPhrase();
223
-
224
- $output .= '<!--[borlabs cache start: '.$borlabsphrase.']--> ';
225
- if($banner_id > 0 AND ($group_ids == 0 OR $group_ids > 0)) { // Show one Ad
226
- $output .= 'echo adrotate_ad('.$banner_id.', true);';
227
- }
228
- if($banner_id == 0 AND $group_ids > 0) { // Show group
229
- $output .= 'echo adrotate_group('.$group_ids.');';
230
}
231
- $output .= ' <!--[borlabs cache end: '.$borlabsphrase.']-->';
232
-
233
- unset($borlabsphrase);
234
} else {
235
if($banner_id > 0 AND ($group_ids == 0 OR $group_ids > 0)) { // Show one Ad
236
$output .= adrotate_ad($banner_id, true);
@@ -299,14 +301,16 @@ function adrotate_inject_posts($post_content) {
299
$advert_output = '<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
300
$advert_output .= 'echo adrotate_group('.$group_id.');';
301
$advert_output .= '<!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
302
- } else if($adrotate_config['borlabscache'] == "Y" AND function_exists('BorlabsCacheHelper') AND BorlabsCacheHelper()->willFragmentCachingPerform()) {
303
- $borlabsphrase = BorlabsCacheHelper()->getFragmentCachingPhrase();
304
-
305
- $advert_output = '<!--[borlabs cache start: '.$borlabsphrase.']-->';
306
- $advert_output .= 'echo adrotate_group('.$group_id.');';
307
- $advert_output .= '<!--[borlabs cache end: '.$borlabsphrase.']-->';
308
-
309
- unset($borlabsphrase);
310
} else {
311
$advert_output = adrotate_group($group_id);
312
}
@@ -641,16 +645,15 @@ function adrotate_dashboard_error() {
641
$error['w3tc_no_hash'] = __('You have enable caching support but the W3TC_DYNAMIC_SECURITY definition is not set.', 'adrotate').' <a href="'.admin_url('/admin.php?page=adrotate-settings&tab=misc').'">'.__('How to configure W3 Total Cache', 'adrotate').'</a>.';
642
}
643
644
- if($adrotate_config['borlabscache'] == "Y" AND !class_exists('\Borlabs\Factory') AND \Borlabs\Factory::get('Cache\Config')->get('cacheActivated') != 'yes') {
645
- $error['borlabs_not_active'] = __('You have enable caching support but Borlabs Cache is not active on your site!', 'adrotate').' <a href="'.admin_url('/admin.php?page=adrotate-settings&tab=misc').'">'.__('Disable Borlabs Cache Support', 'adrotate').'</a>.';
646
}
647
- if(class_exists('\Borlabs\Factory') AND \Borlabs\Factory::get('Cache\Config')->get('cacheActivated') == 'yes') {
648
- $borlabscache = '';
649
- if(class_exists('\Borlabs\Factory')) {
650
$borlabscache = \Borlabs\Factory::get('Cache\Config')->get('fragmentCaching');
651
- }
652
- if($adrotate_config['borlabscache'] == "Y" AND $borlabscache == '') {
653
- $error['borlabs_fragment_error'] = __('You have enabled Borlabs Cache support but Fragment caching is not enabled!', 'adrotate').' <a href="'.admin_url('/admin.php?page=borlabs-cache-fragments').'">'.__('Enable Fragment Caching', 'adrotate').'</a>.';
654
}
655
}
656
@@ -721,26 +724,6 @@ function adrotate_notifications_dashboard() {
721
echo ' </div>';
722
echo '</div>';
723
}
724
-
725
- // AdRotate Switch
726
- $competition_banner = get_option('adrotate_hide_competition');
727
- if($competition_banner != 1) {
728
- $adrotate_has_competition = adrotate_check_competition();
729
- if($adrotate_has_competition) {
730
- echo '<div class="ajdg-notification notice" style="">';
731
- echo ' <div class="ajdg-notification-logo" style="background-image: url(\''.plugins_url('/images/notification.png', __FILE__).'\');"><span></span></div>';
732
- echo ' <div class="ajdg-notification-message"><strong>AdRotate Banner Manager</strong> found '._n('one plugin', 'several plugins', count($adrotate_has_competition), 'adrotate').' that can be imported:<br />';
733
- foreach($adrotate_has_competition as $plugin) {
734
- echo '&raquo; '.$plugin.'<br />';
735
- }
736
- echo ' Configured plugins can be imported into AdRotate! What is <a target="_blank" href="https://ajdg.solutions/product/adrotate-switch/">AdRotate Switch</a>?</div>';
737
- echo ' <div class="ajdg-notification-cta">';
738
- echo ' <a href="'.admin_url('plugin-install.php?tab=search&s=adrotate+switch+arnan').'" class="ajdg-notification-act button-primary">Install AdRotate Switch</a>';
739
- echo ' <a href="admin.php?page=adrotate&hide=2" class="ajdg-notification-dismiss">No thanks</a>';
740
- echo ' </div>';
741
- echo '</div>';
742
- }
743
- }
744
}
745
746
// Advert notifications, errors, important stuff
@@ -757,20 +740,19 @@ function adrotate_notifications_dashboard() {
757
}
758
}
759
760
- if(isset($_GET['upgrade']) AND $_GET['upgrade'] == 1) adrotate_check_upgrade();
761
$adrotate_db_version = get_option("adrotate_db_version");
762
$adrotate_version = get_option("adrotate_version");
763
if($adrotate_db_version['current'] < ADROTATE_DB_VERSION OR $adrotate_version['current'] < ADROTATE_VERSION) {
764
echo '<div class="ajdg-notification notice" style="">';
765
echo ' <div class="ajdg-notification-logo" style="background-image: url(\''.plugins_url('/images/notification.png', __FILE__).'\');"><span></span></div>';
766
- echo ' <div class="ajdg-notification-message">Thanks for updating <strong>'.$displayname.'</strong>! You have almost completed updating <strong>AdRotate Banner Manager</strong> to version <strong>'.ADROTATE_DISPLAY.'</strong>!<br />To complete the update <strong>click the button on the right</strong>. This may take a few seconds to complete!<br />For an overview of what has changed take a look at the <a href="https://ajdg.solutions/support/adrotate-development/" target="_blank">development page</a> and usually there is an article on <a href="https://ajdg.solutions/blog/" target="_blank">the blog</a> with more information as well.</div>';
767
echo ' <div class="ajdg-notification-cta">';
768
- echo ' <a href="admin.php?page=adrotate&upgrade=1" class="ajdg-notification-act button-primary update-button">Finish update</a>';
769
echo ' </div>';
770
echo '</div>';
771
}
772
-
773
- if(isset($_GET['tasks']) AND $_GET['tasks'] == 1) adrotate_check_schedules();
774
}
775
776
/*-------------------------------------------------------------
@@ -818,7 +800,7 @@ function adrotate_help_info() {
818
'<p>AdRotate is becoming one of the most popular WordPress plugins for Advertising and is a household name for many companies and websites around the world. AdRotate wouldn\'t be possible without your support and my life wouldn\'t be what it is today without your help.</p><p><em>- Arnan</em></p>'.
819
820
'<p><strong>Business:</strong> Visit <a href="https://ajdg.solutions/?pk_campaign=adrotatefree&pk_keyword=helptab" target="_blank">ajdg.solutions</a> website.<br />'.
821
- '<strong>Personal:</strong> Take a look at the <a href="https://www.arnan.me/?pk_campaign=adrotatefree&pk_keyword=helptab" target="_blank">arnan.me website</a>, also Arnan has <a href="https://arnandegans.tumblr.com" target="_blank">Tumblr</a>, <a href="https://www.twitter.com/arnandegans/" target="_blank">Twitter</a> and he is on <a href="https://linkedin.com/in/arnandegans/" target="_blank">LinkedIn</a>.</p>'
822
)
823
);
824
$screen->add_help_tab(array(
218
$output .= 'echo adrotate_group('.$group_ids.');';
219
}
220
$output .= '<!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
221
+ } else if($adrotate_config['borlabscache'] == "Y" AND function_exists('BorlabsCacheHelper')) {
222
+ if(BorlabsCacheHelper()->willFragmentCachingPerform()) {
223
+ $borlabsphrase = BorlabsCacheHelper()->getFragmentCachingPhrase();
224
+
225
+ $output .= '<!--[borlabs cache start: '.$borlabsphrase.']--> ';
226
+ if($banner_id > 0 AND ($group_ids == 0 OR $group_ids > 0)) { // Show one Ad
227
+ $output .= 'echo adrotate_ad('.$banner_id.', true);';
228
+ }
229
+ if($banner_id == 0 AND $group_ids > 0) { // Show group
230
+ $output .= 'echo adrotate_group('.$group_ids.');';
231
+ }
232
+ $output .= ' <!--[borlabs cache end: '.$borlabsphrase.']-->';
233
+
234
+ unset($borlabsphrase);
235
}
236
} else {
237
if($banner_id > 0 AND ($group_ids == 0 OR $group_ids > 0)) { // Show one Ad
238
$output .= adrotate_ad($banner_id, true);
301
$advert_output = '<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
302
$advert_output .= 'echo adrotate_group('.$group_id.');';
303
$advert_output .= '<!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
304
+ } else if($adrotate_config['borlabscache'] == "Y" AND function_exists('BorlabsCacheHelper')) {
305
+ if(BorlabsCacheHelper()->willFragmentCachingPerform()) {
306
+ $borlabsphrase = BorlabsCacheHelper()->getFragmentCachingPhrase();
307
+
308
+ $advert_output = '<!--[borlabs cache start: '.$borlabsphrase.']-->';
309
+ $advert_output .= 'echo adrotate_group('.$group_id.');';
310
+ $advert_output .= '<!--[borlabs cache end: '.$borlabsphrase.']-->';
311
+
312
+ unset($borlabsphrase);
313
+ }
314
} else {
315
$advert_output = adrotate_group($group_id);
316
}
645
$error['w3tc_no_hash'] = __('You have enable caching support but the W3TC_DYNAMIC_SECURITY definition is not set.', 'adrotate').' <a href="'.admin_url('/admin.php?page=adrotate-settings&tab=misc').'">'.__('How to configure W3 Total Cache', 'adrotate').'</a>.';
646
}
647
648
+ if($adrotate_config['borlabscache'] == "Y" AND !is_plugin_active('borlabs-cache/borlabs-cache.php')) {
649
+ $error['borlabs_not_active'] = __('You have enable caching support but Borlabs Cache is not active on your site!', 'adrotate-pro').' <a href="'.admin_url('/admin.php?page=adrotate-settings&tab=misc').'">'.__('Disable Borlabs Cache Support', 'adrotate-pro').'</a>.';
650
}
651
+ if($adrotate_config['borlabscache'] == "Y" AND is_plugin_active('borlabs-cache/borlabs-cache.php')) {
652
+ if(\Borlabs\Factory::get('Cache\Config')->get('cacheActivated') == 'yes') {
653
$borlabscache = \Borlabs\Factory::get('Cache\Config')->get('fragmentCaching');
654
+ if(strlen($borlabscache) < 1) {
655
+ $error['borlabs_fragment_error'] = __('You have enabled Borlabs Cache support but Fragment caching is not enabled!', 'adrotate-pro').' <a href="'.admin_url('/admin.php?page=borlabs-cache-fragments').'">'.__('Enable Fragment Caching', 'adrotate-pro').'</a>.';
656
+ }
657
}
658
}
659
724
echo ' </div>';
725
echo '</div>';
726
}
727
}
728
729
// Advert notifications, errors, important stuff
740
}
741
}
742
743
+ // Finish update
744
+ // Keep for manual updates
745
$adrotate_db_version = get_option("adrotate_db_version");
746
$adrotate_version = get_option("adrotate_version");
747
if($adrotate_db_version['current'] < ADROTATE_DB_VERSION OR $adrotate_version['current'] < ADROTATE_VERSION) {
748
echo '<div class="ajdg-notification notice" style="">';
749
echo ' <div class="ajdg-notification-logo" style="background-image: url(\''.plugins_url('/images/notification.png', __FILE__).'\');"><span></span></div>';
750
+ echo ' <div class="ajdg-notification-message">Thanks for updating <strong>'.$displayname.'</strong>! You have almost completed updating <strong>AdRotate</strong> to version <strong>'.ADROTATE_DISPLAY.'</strong>!<br />To complete the update <strong>click the button on the right</strong>. This may take a few seconds to complete!<br />For an overview of what has changed take a look at the <a href="https://ajdg.solutions/support/adrotate-development/?pk_campaign=adrotatepro&pk_keyword=finish_update_notification" target="_blank">development page</a> and usually there is an article on <a href="https://ajdg.solutions/blog/" target="_blank">the blog</a> with more information as well.</div>';
751
echo ' <div class="ajdg-notification-cta">';
752
+ echo ' <a href="admin.php?page=adrotate-settings&tab=maintenance&action=update-db" class="ajdg-notification-act button-primary update-button">Finish update</a>';
753
echo ' </div>';
754
echo '</div>';
755
}
756
}
757
758
/*-------------------------------------------------------------
800
'<p>AdRotate is becoming one of the most popular WordPress plugins for Advertising and is a household name for many companies and websites around the world. AdRotate wouldn\'t be possible without your support and my life wouldn\'t be what it is today without your help.</p><p><em>- Arnan</em></p>'.
801
802
'<p><strong>Business:</strong> Visit <a href="https://ajdg.solutions/?pk_campaign=adrotatefree&pk_keyword=helptab" target="_blank">ajdg.solutions</a> website.<br />'.
803
+ '<strong>Personal:</strong> Take a look at the <a href="https://www.arnan.me/?pk_campaign=adrotatefree&pk_keyword=helptab" target="_blank">arnan.me website</a>, also Arnan has <a href="https://www.twitter.com/arnandegans/" target="_blank">Twitter</a> and he is on <a href="https://linkedin.com/in/arnandegans/" target="_blank">LinkedIn</a>.</p>'
804
)
805
);
806
$screen->add_help_tab(array(
adrotate-setup.php CHANGED
@@ -50,6 +50,8 @@ function adrotate_activate_setup() {
50
wp_die('You do not have appropriate access to activate this plugin! Contact your administrator!<br /><a href="'. get_option('siteurl').'/wp-admin/plugins.php">Back to dashboard</a>.');
51
return;
52
} else {
53
// Set defaults for internal versions
54
add_option('adrotate_db_version', array('current' => ADROTATE_DB_VERSION, 'previous' => ''));
55
add_option('adrotate_version', array('current' => ADROTATE_VERSION, 'previous' => ''));
@@ -66,7 +68,6 @@ function adrotate_activate_setup() {
66
add_option('adrotate_dynamic_required', 0);
67
update_option('adrotate_hide_getpro', adrotate_now() + (14 * DAY_IN_SECONDS));
68
update_option('adrotate_hide_review', adrotate_now());
69
- update_option('adrotate_hide_competition', adrotate_now());
70
update_option('adrotate_hide_birthday', adrotate_now());
71
72
// Install new database
@@ -121,9 +122,10 @@ function adrotate_deactivate($network_wide) {
121
Since: 2.0
122
-------------------------------------------------------------*/
123
function adrotate_deactivate_setup() {
124
update_option('adrotate_hide_getpro', adrotate_now() + (14 * DAY_IN_SECONDS));
125
update_option('adrotate_hide_review', adrotate_now());
126
- update_option('adrotate_hide_competition', adrotate_now());
127
128
// Clean up capabilities from ALL users
129
$editable_roles = apply_filters('editable_roles', $wp_roles->roles);
@@ -223,48 +225,6 @@ function adrotate_check_config() {
223
update_option('adrotate_debug', $debug);
224
}
225
226
- /*-------------------------------------------------------------
227
- Name: adrotate_check_competition
228
- Purpose: Checks if WP has other advertising plugins installed
229
- Since: 3.21
230
- -------------------------------------------------------------*/
231
- function adrotate_check_competition() {
232
-
233
- $compatible_plugins = array(
234
- 'ad-injection/ad-injection.php',
235
- 'adkingpro/adkingpro.php',
236
- // 'advanced-advertising-system/advanced_advertising_system.php',
237
- // 'advert/advert.php',
238
- 'advertising-manager/advertising-manager.php',
239
- 'bannerman/bannerman.php',
240
- // 'easy-ads-manager/easy-ads-manager.php',
241
- // 'easy-adsense-injection/easy-adsense-injection.php',
242
- // 'max-adsense/adsense.php',
243
- // 'random-banners/random-banners.php',
244
- 'simple-ads-manager/simple-ads-manager.php',
245
- 'useful-banner-manager/useful-banner-manager.php',
246
- 'wp-advertize-it/bootstrap.php',
247
- 'wp-bannerize/main.php',
248
- 'wp-ad-manager/ad-minister.php',
249
- 'wp125/wp125.php',
250
- );
251
-
252
- if(!function_exists('get_plugins')) {
253
- require_once ABSPATH . 'wp-admin/includes/plugin.php';
254
- }
255
- $installed_plugins = get_plugins();
256
-
257
- $compatible = array();
258
- foreach($installed_plugins as $slug => $plugin) {
259
- if(in_array($slug, $compatible_plugins)) {
260
- $compatible[$slug] = $plugin['Title'].' v'.$plugin['Version'];
261
- }
262
- }
263
- unset($installed_plugins, $compatible_plugins, $status);
264
-
265
- return $compatible;
266
- }
267
-
268
/*-------------------------------------------------------------
269
Name: adrotate_dummy_data
270
Purpose: Install dummy data in empty tables
50
wp_die('You do not have appropriate access to activate this plugin! Contact your administrator!<br /><a href="'. get_option('siteurl').'/wp-admin/plugins.php">Back to dashboard</a>.');
51
return;
52
} else {
53
+ deactivate_plugins(plugin_basename('adrotate-pro/adrotate-pro.php'));
54
+
55
// Set defaults for internal versions
56
add_option('adrotate_db_version', array('current' => ADROTATE_DB_VERSION, 'previous' => ''));
57
add_option('adrotate_version', array('current' => ADROTATE_VERSION, 'previous' => ''));
68
add_option('adrotate_dynamic_required', 0);
69
update_option('adrotate_hide_getpro', adrotate_now() + (14 * DAY_IN_SECONDS));
70
update_option('adrotate_hide_review', adrotate_now());
71
update_option('adrotate_hide_birthday', adrotate_now());
72
73
// Install new database
122
Since: 2.0
123
-------------------------------------------------------------*/
124
function adrotate_deactivate_setup() {
125
+ global $wp_roles;
126
+
127
update_option('adrotate_hide_getpro', adrotate_now() + (14 * DAY_IN_SECONDS));
128
update_option('adrotate_hide_review', adrotate_now());
129
130
// Clean up capabilities from ALL users
131
$editable_roles = apply_filters('editable_roles', $wp_roles->roles);
225
update_option('adrotate_debug', $debug);
226
}
227
228
/*-------------------------------------------------------------
229
Name: adrotate_dummy_data
230
Purpose: Install dummy data in empty tables
adrotate.php CHANGED
@@ -4,9 +4,9 @@ Plugin Name: AdRotate
4
Plugin URI: https://ajdg.solutions/product/adrotate-banner-manager/?pk_campaign=adrotatefree&pk_keyword=plugin_info
5
Author: Arnan de Gans
6
Author URI: https://www.arnan.me/?pk_campaign=adrotatefree&pk_keyword=plugin_info
7
- Description: AdRotate - Monetise your website with adverts while keeping things simple. Start making money today!
8
Text Domain: adrotate
9
- Version: 5.7
10
License: GPLv3
11
*/
12
@@ -21,7 +21,7 @@ License: GPLv3
21
------------------------------------------------------------------------------------ */
22
23
/*--- AdRotate values ---------------------------------------*/
24
- define("ADROTATE_DISPLAY", '5.7');
25
define("ADROTATE_VERSION", 395);
26
define("ADROTATE_DB_VERSION", 65);
27
$plugin_folder = plugin_dir_path(__FILE__);
@@ -489,6 +489,11 @@ function adrotate_options() {
489
$active_tab = (isset($_GET['tab'])) ? esc_attr($_GET['tab']) : 'general';
490
$status = (isset($_GET['status'])) ? esc_attr($_GET['status']) : '';
491
$error = (isset($_GET['error'])) ? esc_attr($_GET['error']) : '';
492
?>
493
494
<div class="wrap">
4
Plugin URI: https://ajdg.solutions/product/adrotate-banner-manager/?pk_campaign=adrotatefree&pk_keyword=plugin_info
5
Author: Arnan de Gans
6
Author URI: https://www.arnan.me/?pk_campaign=adrotatefree&pk_keyword=plugin_info
7
+ Description: Monetise your website with adverts while keeping things simple. Start making money today!
8
Text Domain: adrotate
9
+ Version: 5.7.1
10
License: GPLv3
11
*/
12
21
------------------------------------------------------------------------------------ */
22
23
/*--- AdRotate values ---------------------------------------*/
24
+ define("ADROTATE_DISPLAY", '5.7.1');
25
define("ADROTATE_VERSION", 395);
26
define("ADROTATE_DB_VERSION", 65);
27
$plugin_folder = plugin_dir_path(__FILE__);
489
$active_tab = (isset($_GET['tab'])) ? esc_attr($_GET['tab']) : 'general';
490
$status = (isset($_GET['status'])) ? esc_attr($_GET['status']) : '';
491
$error = (isset($_GET['error'])) ? esc_attr($_GET['error']) : '';
492
+
493
+
494
+ $action = (isset($_GET['action'])) ? esc_attr($_GET['action']) : '';
495
+ if($action == 'update-db') adrotate_check_upgrade();
496
+ if($action == 'reset-tasks') adrotate_check_schedules();
497
?>
498
499
<div class="wrap">
dashboard/info.php CHANGED
@@ -94,11 +94,9 @@ $data = get_option("adrotate_advert_status");
94
<div class="ajdg-postbox">
95
<h2 class="ajdg-postbox-title"><?php _e('News & Updates', 'adrotate'); ?></h2>
96
<div id="news" class="ajdg-postbox-content">
97
- <p><center><a href="https://www.arnan.me?pk_campaign=adrotatefree&pk_keyword=info_page&pk_content=news_link" title="Visit Arnan's website" target="_blank"><img src="<?php echo plugins_url("/images/buttons/1.png", dirname(__FILE__)); ?>" alt="Arnan de Gans website" /></a><a href="https://ajdg.solutions?pk_campaign=adrotatefree&pk_keyword=info_page&pk_content=news_link" title="Visit the AJdG Solutions website" target="_blank"><img src="<?php echo plugins_url("/images/buttons/2.png", dirname(__FILE__)); ?>" alt="AJdG Solutions website" /></a><a href="https://www.twitter.com/arnandegans" title="Arnan de Gans on Twitter" target="_blank"><img src="<?php echo plugins_url("/images/buttons/4.png", dirname(__FILE__)); ?>" alt="Arnan de Gans on Twitter" /></a><a href="https://arnandegans.tumblr.com" title="AJdG Solutions on Tumblr" target="_blank"><img src="<?php echo plugins_url("/images/buttons/3.png", dirname(__FILE__)); ?>" alt="AJdG Solutions on Tumblr" /></a></center></p>
98
-
99
<?php wp_widget_rss_output(array(
100
'url' => 'http://ajdg.solutions/feed/',
101
- 'items' => 2,
102
'show_summary' => 1,
103
'show_author' => 0,
104
'show_date' => 1)
94
<div class="ajdg-postbox">
95
<h2 class="ajdg-postbox-title"><?php _e('News & Updates', 'adrotate'); ?></h2>
96
<div id="news" class="ajdg-postbox-content">
97
<?php wp_widget_rss_output(array(
98
'url' => 'http://ajdg.solutions/feed/',
99
+ 'items' => 4,
100
'show_summary' => 1,
101
'show_author' => 0,
102
'show_date' => 1)
dashboard/publisher/adverts-edit.php CHANGED
@@ -236,11 +236,11 @@ if($edit_banner) {
236
<table class="widefat" style="margin-top: .5em">
237
<tbody>
238
<tr>
239
- <th width="15%"><?php _e('Start date', 'adrotate'); ?> (dd-mmm-yyyy)</th>
240
<td width="35%">
241
<input tabindex="9" type="text" id="startdate_picker" name="adrotate_start_date" value="<?php echo $start_date; ?>" class="datepicker ajdg-inputfield" autocomplete="off" />
242
</td>
243
- <th width="15%"><?php _e('End date', 'adrotate'); ?> (dd-mmm-yyyy)</th>
244
<td>
245
<input tabindex="10" type="text" id="enddate_picker" name="adrotate_end_date" value="<?php echo $end_date; ?>" class="datepicker ajdg-inputfield" autocomplete="off" />
246
</td>
236
<table class="widefat" style="margin-top: .5em">
237
<tbody>
238
<tr>
239
+ <th width="15%"><?php _e('Start date', 'adrotate'); ?> (dd-mm-yyyy)</th>
240
<td width="35%">
241
<input tabindex="9" type="text" id="startdate_picker" name="adrotate_start_date" value="<?php echo $start_date; ?>" class="datepicker ajdg-inputfield" autocomplete="off" />
242
</td>
243
+ <th width="15%"><?php _e('End date', 'adrotate'); ?> (dd-mm-yyyy)</th>
244
<td>
245
<input tabindex="10" type="text" id="enddate_picker" name="adrotate_end_date" value="<?php echo $end_date; ?>" class="datepicker ajdg-inputfield" autocomplete="off" />
246
</td>
dashboard/settings/maintenance.php CHANGED
@@ -89,7 +89,7 @@
89
<tr>
90
<th valign="top"><?php _e('Background tasks', 'adrotate'); ?></th>
91
<td colspan="3">
92
- <a class="button" href="admin.php?page=adrotate&tasks=1"><?php _e('Reset background tasks', 'adrotate'); ?></a>
93
</td>
94
</tr>
95
</table>
@@ -106,7 +106,7 @@
106
<tr>
107
<th valign="top"><?php _e('Manual upgrade', 'adrotate'); ?></th>
108
<td colspan="3">
109
- <a class="button" href="admin.php?page=adrotate&upgrade=1" onclick="return confirm('<?php _e('YOU ARE ABOUT TO DO A MANUAL UPDATE FOR ADROTATE.', 'adrotate'); ?>\n<?php _e('Make sure you have a database backup!', 'adrotate'); ?>\n\n<?php _e('This might take a while and may slow down your site during this action!', 'adrotate'); ?>\n\n<?php _e('OK to continue, CANCEL to stop.', 'adrotate'); ?>')"><?php _e('Run updater', 'adrotate'); ?></a>
110
</td>
111
</tr>
112
</table>
89
<tr>
90
<th valign="top"><?php _e('Background tasks', 'adrotate'); ?></th>
91
<td colspan="3">
92
+ <a class="button" href="admin.php?page=adrotate-settings&tab=maintenance&action=reset-tasks"><?php _e('Reset background tasks', 'adrotate'); ?></a>
93
</td>
94
</tr>
95
</table>
106
<tr>
107
<th valign="top"><?php _e('Manual upgrade', 'adrotate'); ?></th>
108
<td colspan="3">
109
+ <a class="button" href="admin.php?page=adrotate-settings&tab=maintenance&action=update-db" onclick="return confirm('<?php _e('YOU ARE ABOUT TO DO A MANUAL UPDATE FOR ADROTATE.', 'adrotate'); ?>\n<?php _e('Make sure you have a database backup!', 'adrotate'); ?>\n\n<?php _e('This might take a while and may slow down your site during this action!', 'adrotate'); ?>\n\n<?php _e('OK to continue, CANCEL to stop.', 'adrotate'); ?>')"><?php _e('Run updater', 'adrotate'); ?></a>
110
</td>
111
</tr>
112
</table>
images/buttons/1.png DELETED
Binary file
images/buttons/2.png DELETED
Binary file
images/buttons/3.png DELETED
Binary file
images/buttons/4.png DELETED
Binary file
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: adverts, ads, banners, advert manager, ad manager, banner manager, monetis
5
Requires at least: 4.6
6
Requires PHP: 5.6
7
Tested up to: 5.4
8
- Stable tag: 5.7
9
License: GPLv3
10
11
Manage your advertisements the easy way! Monetise your website with AdRotate. AdRotate has everything you need and keeps management simple!
@@ -30,7 +30,7 @@ Getting started with AdRotate is not complex, but a little help or advise is nev
30
31
**Some of the AdRotate Features**
32
33
- * Works with ad servers such as; Media.net, Blind Ferret, Google, Bing, Amazon, DFP and most other referrer/ad servers
34
* Put random, or selected, banners in pages or posts
35
* Easy management of Adverts, Groups and Schedules
36
* Track how many times a banner is clicked and show it's Cick-Through-Ratio (CTR)
@@ -68,20 +68,28 @@ For more detailed instructions check out the [installation steps](https://ajdg.s
68
Be a Pro and get [AdRotate Professional](https://ajdg.solutions/product-category/adrotate-pro/?pk_campaign=adrotatefree&pk_keyword=readme)!
69
70
= AdRotate 5.7 =
71
- * [fix] Vulnerability related to groups
72
- * [fix] Asset sometimes gets deselected when editing adverts
73
- * [new] Tooltips for useful tags when editing adverts
74
- * [change] Dashboard tweaks
75
76
= AdRotate Professional 5.7.1 =
77
- * [fix] Better organised $_SESSION data for duplicate adverts
78
- * [fix] Date selection for exports not working for some users
79
- * [fix] Date selection for group stats not working for some users
80
- * [fix] Date selection for advert stats not working for some users
81
- * [fix] Better error handling for Geo Targeting
82
- * [fix] Vulnerability related to groups
83
- * [fix] Better error handling when checking for updates
84
- * [change] Dashboard tweaks
85
86
All recent changes are available on the [AdRotate Changelog](https://ajdg.solutions/support/adrotate-development/?pk_campaign=adrotatefree&pk_keyword=readme).
87
5
Requires at least: 4.6
6
Requires PHP: 5.6
7
Tested up to: 5.4
8
+ Stable tag: 5.7.1
9
License: GPLv3
10
11
Manage your advertisements the easy way! Monetise your website with AdRotate. AdRotate has everything you need and keeps management simple!
30
31
**Some of the AdRotate Features**
32
33
+ * Works with ad servers such as; Media.net, Google AdSense, Bing, Amazon, Blind Ferret, DFP, Doubleclick and most other referrer/ad servers
34
* Put random, or selected, banners in pages or posts
35
* Easy management of Adverts, Groups and Schedules
36
* Track how many times a banner is clicked and show it's Cick-Through-Ratio (CTR)
68
Be a Pro and get [AdRotate Professional](https://ajdg.solutions/product-category/adrotate-pro/?pk_campaign=adrotatefree&pk_keyword=readme)!
69
70
= AdRotate 5.7 =
71
+ * [fix] Better check for Borlabs Cache availability
72
+ * [fix] Manual update and Background task reset button
73
+ * [fix] More reliable trigger for database update script
74
+ * [fix] Missing $wp_roles when deactivating the plugin
75
+ * [change] Updated export advert script
76
77
= AdRotate Professional 5.7.1 =
78
+ * [fix] 'Install Update' button not always working
79
+ * [fix] Missing array for network settings on non-network setups
80
+ * [fix] Better check for Borlabs Cache availability
81
+ * [fix] Manual update and Background task reset button
82
+ * [fix] More reliable importing of adverts
83
+ * [fix] More reliable trigger for database update script
84
+ * [change] Removed 'AdRotate Switch banner'
85
+ * [change] AdRotate Geo now provides 30000 lookups per day
86
+ * [change] Updated import advert script
87
+ * [change] Updated export advert script
88
+ * [new] Hide the license key and email on Network setups
89
+ * [new] Force de-activate license option for Network setups
90
+ * [new] Email notification when adverts expire in a week
91
+ * [new] Now uses Update API 8
92
+ * [new] Now uses AdRotate Geo 6
93
94
All recent changes are available on the [AdRotate Changelog](https://ajdg.solutions/support/adrotate-development/?pk_campaign=adrotatefree&pk_keyword=readme).
95