WordPress Ad Widget - Version 2.14.0

Version Description

Download this release

Release Info

Developer broadstreetads
Plugin Icon wp plugin WordPress Ad Widget
Version 2.14.0
Comparing to
See all releases

Code changes from version 2.13.0 to 2.14.0

Files changed (4) hide show
  1. adwidget.php +3 -77
  2. lib/Utility.php +0 -19
  3. readme.txt +1 -1
  4. views/modal/index.php +0 -2
adwidget.php CHANGED
@@ -3,7 +3,7 @@
3
Plugin Name: Wordpress Ad Widget
4
Plugin URI: https://github.com/broadstreetads/wordpress-ad-widget
5
Description: The easiest way to place ads in your Wordpress sidebar. Go to Settings -> Ad Widget
6
- Version: 2.13.0
7
Author: Broadstreet XPRESS
8
Author URI: http://broadstreetads.com
9
*/
@@ -20,7 +20,7 @@ add_action('admin_menu', array('AdWidget_Core', 'registerAdmin'));
20
class AdWidget_Core
21
{
22
CONST KEY_INSTALL_REPORT = 'AdWidget_Installed';
23
- CONST VERSION = '2.13.0';
24
CONST KEY_WELCOME = 'AdWidget_Welcome';
25
26
/**
@@ -68,8 +68,7 @@ class AdWidget_Core
68
*/
69
static function adminMenuCallback()
70
{
71
- self::sendInstallReportIfNew();
72
-
73
if(isset($_POST['cancel']))
74
Broadstreet_Adwidget_Mini_Utility::hasAdserving(false);
75
@@ -79,79 +78,6 @@ class AdWidget_Core
79
include dirname(__FILE__) . '/views/admin.php';
80
}
81
82
- /**
83
- * Makes a call to the Broadstreet service to collect information information
84
- * on the blog in case of errors and other needs.
85
- */
86
- public static function sendReport($message = 'General')
87
- {
88
- $report = "$message\n";
89
- $report .= get_bloginfo('name'). "\n";
90
- $report .= get_bloginfo('url'). "\n";
91
- $report .= get_bloginfo('admin_email'). "\n";
92
- $report .= 'WP Version: ' . get_bloginfo('version'). "\n";
93
- $report .= 'Plugin Version: ' . self::VERSION . "\n";
94
- $report .= "$message\n";
95
-
96
- @wp_mail('plugin@broadstreetads.com', "Report: $message", $report);
97
- }
98
-
99
- /**
100
- * Send a welcome email to the user
101
- */
102
- public static function sendWelcome()
103
- {
104
- $got_welcome = self::getOption(self::KEY_WELCOME);
105
-
106
- if($got_welcome != 'true') {
107
- $email = get_bloginfo('admin_email');
108
- $subject = "Welcome - Ad Widget/Broadstreet XPRESS";
109
-
110
- $body = "Thank you for choosing Wordpress AdWidget! This is a one-time email. If you have any support questions, reach out to frontdesk@broadstreetads.com.\n\n"
111
- . "You may wish to check out our extensive ad format gallery and full-service adserver: http://broadstreetads.com/ad-widget/\n\n"
112
- . "It helps to approach your sales prospects with something they've never seen before. We offer personal, 15 minute demos.\n\n"
113
- . "Best of luck!\n\n"
114
- . "- Kenny Katzgrau (Broadstreet XPRESS)\n\n";
115
-
116
- self::setOption(self::KEY_WELCOME, 'true');
117
-
118
- @wp_mail($email, $subject, $body);
119
- }
120
- }
121
-
122
- /**
123
- * If this is a new installation and we've never sent a report to the
124
- * Broadstreet server, send a packet of basic info about this blog in case
125
- * issues should arise in the future.
126
- */
127
- public static function sendInstallReportIfNew()
128
- {
129
- $install_key = self::KEY_INSTALL_REPORT;
130
- $upgrade_key = self::KEY_INSTALL_REPORT .'_'. self::VERSION;
131
-
132
- $installed = self::getOption($install_key);
133
- $upgraded = self::getOption($upgrade_key);
134
-
135
- $sent = ($installed && $upgraded);
136
-
137
- if($sent === FALSE)
138
- {
139
- if(!$installed)
140
- {
141
- self::sendWelcome();
142
- self::sendReport("Installation");
143
- self::setOption($install_key, 'true');
144
- self::setOption($upgrade_key, 'true');
145
- }
146
- else
147
- {
148
- self::sendWelcome();
149
- self::sendReport("Upgrade");
150
- self::setOption($upgrade_key, 'true');
151
- }
152
- }
153
- }
154
-
155
/**
156
* Sets a Wordpress option
157
* @param string $name The name of the option to set
3
Plugin Name: Wordpress Ad Widget
4
Plugin URI: https://github.com/broadstreetads/wordpress-ad-widget
5
Description: The easiest way to place ads in your Wordpress sidebar. Go to Settings -> Ad Widget
6
+ Version: 2.14.0
7
Author: Broadstreet XPRESS
8
Author URI: http://broadstreetads.com
9
*/
20
class AdWidget_Core
21
{
22
CONST KEY_INSTALL_REPORT = 'AdWidget_Installed';
23
+ CONST VERSION = '2.14.0';
24
CONST KEY_WELCOME = 'AdWidget_Welcome';
25
26
/**
68
*/
69
static function adminMenuCallback()
70
{
71
+
72
if(isset($_POST['cancel']))
73
Broadstreet_Adwidget_Mini_Utility::hasAdserving(false);
74
78
include dirname(__FILE__) . '/views/admin.php';
79
}
80
81
/**
82
* Sets a Wordpress option
83
* @param string $name The name of the option to set
lib/Utility.php CHANGED
@@ -97,21 +97,6 @@ class Broadstreet_Adwidget_Mini_Utility
97
return bsadwidget_get_option($name, $default);
98
}
99
100
- /**
101
- * Send an email about an error, issue, etc
102
- */
103
- public static function sendReport($message = 'General')
104
- {
105
- $report = "";
106
- $report .= bsadwidget_get_website_name(). "\n";
107
- $report .= bsadwidget_get_website(). "\n";
108
- $report .= bsadwidget_get_email(). "\n";
109
- $report .= 'Platform Version: ' . bsadwidget_get_platform_version() . "\n";
110
- $report .= "$message\n";
111
-
112
- @bsadwidget_mail('errors@broadstreetads.com', "Status Report: WP AdWidget", $report);
113
- }
114
-
115
/**
116
* Get a link to the Broadstreet interface
117
* @param string $path
@@ -181,7 +166,6 @@ class Broadstreet_Adwidget_Mini_Utility
181
self::setOption (Broadstreet_Adwidget_Mini_Utility::KEY_ADSERVER_ENABLED, (bool)$enabled);
182
$message = $enabled ? 'Subscribed' : 'Unsubscribed';
183
if($enabled) $success = self::importOldAds($email);
184
- if($success) self::sendReport("Premium Adserver $message");
185
return $success;
186
} else {
187
return (bool)self::getOption(self::KEY_ADSERVER_ENABLED, false);
@@ -317,7 +301,6 @@ class Broadstreet_Adwidget_Mini_Utility
317
return $api->updateAdvertisement($network_id, $advertiser_id, $advertisement_id, $params);
318
319
} catch(Exception $ex) {
320
- self::sendReport($ex->__toString());
321
exit($ex->__toString());
322
return false;
323
}
@@ -343,7 +326,6 @@ class Broadstreet_Adwidget_Mini_Utility
343
return $api->updateAdvertisement($network_id, $advertiser_id, $advertisement_id, $params);
344
345
} catch(Exception $ex) {
346
- self::sendReport($ex->__toString());
347
exit($ex->__toString());
348
return false;
349
}
@@ -422,7 +404,6 @@ class Broadstreet_Adwidget_Mini_Utility
422
}
423
catch(Exception $ex)
424
{
425
- self::sendReport($ex->__toString());
426
return false;
427
}
428
97
return bsadwidget_get_option($name, $default);
98
}
99
100
/**
101
* Get a link to the Broadstreet interface
102
* @param string $path
166
self::setOption (Broadstreet_Adwidget_Mini_Utility::KEY_ADSERVER_ENABLED, (bool)$enabled);
167
$message = $enabled ? 'Subscribed' : 'Unsubscribed';
168
if($enabled) $success = self::importOldAds($email);
169
return $success;
170
} else {
171
return (bool)self::getOption(self::KEY_ADSERVER_ENABLED, false);
301
return $api->updateAdvertisement($network_id, $advertiser_id, $advertisement_id, $params);
302
303
} catch(Exception $ex) {
304
exit($ex->__toString());
305
return false;
306
}
326
return $api->updateAdvertisement($network_id, $advertiser_id, $advertisement_id, $params);
327
328
} catch(Exception $ex) {
329
exit($ex->__toString());
330
return false;
331
}
404
}
405
catch(Exception $ex)
406
{
407
return false;
408
}
409
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: Broadstreet
3
Tags: wordpress,ad,widget,sidebar,google,tag,code
4
Requires at least: 3.0
5
Tested up to: 4.7
6
- Stable tag: 2.13.0
7
8
Easily upload ad images and ad code to your sidebar. For those that don't need or
9
want a complicated ad management system.
3
Tags: wordpress,ad,widget,sidebar,google,tag,code
4
Requires at least: 3.0
5
Tested up to: 4.7
6
+ Stable tag: 2.14.0
7
8
Easily upload ad images and ad code to your sidebar. For those that don't need or
9
want a complicated ad management system.
views/modal/index.php CHANGED
@@ -67,7 +67,5 @@ if($page == 'signup')
67
}
68
}
69
70
- Broadstreet_Adwidget_Mini_Utility::sendReport('Premium Exloration');
71
-
72
require "$page.php";
73
67
}
68
}
69
70
require "$page.php";
71