Version Description
Download this release
Release Info
Developer | redwallhp |
Plugin | WP125 |
Version | 1.4.4 |
Comparing to | |
See all releases |
Code changes from version 1.4.3 to 1.4.4
- readme.txt +4 -3
- wp125.php +21 -2
readme.txt
CHANGED
@@ -5,8 +5,8 @@ Author URI: http://www.webmaster-source.com
|
|
5 |
Donate link: http://www.webmaster-source.com/donate/?plugin=wp125
|
6 |
Tags: ads, 125x125, management, advertisement
|
7 |
Requires at least: 2.8
|
8 |
-
Tested up to: 3.
|
9 |
-
Stable tag: 1.4.
|
10 |
|
11 |
Easy management of 125x125 ads on your blog. Ads can be run for a specified number of days, and will automatically be taken down. Track clicks too.
|
12 |
|
@@ -121,4 +121,5 @@ If you're having a problem with the plugin, try posting on the official WordPres
|
|
121 |
* 1.4.0 - Now with WordPress 3.0 support!
|
122 |
* 1.4.1 - Added German translation and fixed a stylesheet enqueue bug for WP 3.3.
|
123 |
* 1.4.2 - Now with support for multiple widgets!
|
124 |
-
* 1.4.3 - Added Romanian translation.
|
|
5 |
Donate link: http://www.webmaster-source.com/donate/?plugin=wp125
|
6 |
Tags: ads, 125x125, management, advertisement
|
7 |
Requires at least: 2.8
|
8 |
+
Tested up to: 3.4.2
|
9 |
+
Stable tag: 1.4.4
|
10 |
|
11 |
Easy management of 125x125 ads on your blog. Ads can be run for a specified number of days, and will automatically be taken down. Track clicks too.
|
12 |
|
121 |
* 1.4.0 - Now with WordPress 3.0 support!
|
122 |
* 1.4.1 - Added German translation and fixed a stylesheet enqueue bug for WP 3.3.
|
123 |
* 1.4.2 - Now with support for multiple widgets!
|
124 |
+
* 1.4.3 - Added Romanian translation.
|
125 |
+
* 1.4.4 - Fixed a race condition that could cause many duplicate expiration emails to be sent on high-traffic sites.
|
wp125.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.webmaster-source.com/wp125-ad-plugin-wordpress/
|
|
5 |
Description: Easily manage 125x125 ads within your WordPress Dashboard.
|
6 |
Author: Matt Harzewski (redwall_hp)
|
7 |
Author URI: http://www.webmaster-source.com
|
8 |
-
Version: 1.4.
|
9 |
*/
|
10 |
|
11 |
|
@@ -97,6 +97,21 @@ function wp125_CheckAdDate($thedate, $theid, $pre_exp_email) {
|
|
97 |
}
|
98 |
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
|
101 |
//Write the Ads
|
102 |
function wp125_write_ads($exclude="0") {
|
@@ -117,7 +132,6 @@ echo '<div id="wp125adwrap_1c">'."\n";
|
|
117 |
$arraycount = 0;
|
118 |
if (!empty($theads)) {
|
119 |
foreach ($theads as $thead){
|
120 |
-
wp125_CheckAdDate($thead['end_date'], $thead['id'], $thead['pre_exp_email']);
|
121 |
$theslot = $thead['slot'];
|
122 |
$adguidearray[$theslot] = $thead;
|
123 |
$arraycount++;
|
@@ -232,6 +246,11 @@ add_filter('favorite_actions', 'wp125_add_menu_favorite'); //Favorites Menu
|
|
232 |
add_action("widgets_init", "wp125_create_ad_widget"); //Create the Widget
|
233 |
if (is_admin()) { add_action('admin_menu', 'wp125_add_admin_menu'); } //Admin pages
|
234 |
|
|
|
|
|
|
|
|
|
|
|
235 |
|
236 |
|
237 |
/*
|
5 |
Description: Easily manage 125x125 ads within your WordPress Dashboard.
|
6 |
Author: Matt Harzewski (redwall_hp)
|
7 |
Author URI: http://www.webmaster-source.com
|
8 |
+
Version: 1.4.4
|
9 |
*/
|
10 |
|
11 |
|
97 |
}
|
98 |
|
99 |
|
100 |
+
function wp125_task_check_ad_expiry() {
|
101 |
+
|
102 |
+
global $wpdb;
|
103 |
+
$adtable_name = $wpdb->prefix . "wp125_ads";
|
104 |
+
$ads = $wpdb->get_results("SELECT * FROM $adtable_name WHERE status = '1'");
|
105 |
+
|
106 |
+
if ($ads) {
|
107 |
+
foreach ($ads as $key => $ad) {
|
108 |
+
wp125_CheckAdDate($ad->end_date, $ad->id, $ad->pre_exp_email);
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
+
}
|
113 |
+
|
114 |
+
|
115 |
|
116 |
//Write the Ads
|
117 |
function wp125_write_ads($exclude="0") {
|
132 |
$arraycount = 0;
|
133 |
if (!empty($theads)) {
|
134 |
foreach ($theads as $thead){
|
|
|
135 |
$theslot = $thead['slot'];
|
136 |
$adguidearray[$theslot] = $thead;
|
137 |
$arraycount++;
|
246 |
add_action("widgets_init", "wp125_create_ad_widget"); //Create the Widget
|
247 |
if (is_admin()) { add_action('admin_menu', 'wp125_add_admin_menu'); } //Admin pages
|
248 |
|
249 |
+
if (!wp_next_scheduled('wp125classic_cron_ad_expiry')) {
|
250 |
+
wp_schedule_event(time(), 'twicedaily', 'wp125classic_cron_ad_expiry');
|
251 |
+
}
|
252 |
+
add_action('wp125classic_cron_ad_expiry', 'wp125_task_check_ad_expiry');
|
253 |
+
|
254 |
|
255 |
|
256 |
/*
|