Post Expirator - Version 2.0.1

Version Description

Removes old scheduled hook - this was not done completely in the 2.0.0 upgrade

Download this release

Release Info

Developer axelseaa
Plugin Icon 128x128 Post Expirator
Version 2.0.1
Comparing to
See all releases

Code changes from version 2.0.0 to 2.0.1

Files changed (2) hide show
  1. post-expirator.php +13 -10
  2. readme.txt +9 -1
post-expirator.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Post Expirator
4
  Plugin URI: http://wordpress.org/extend/plugins/post-expirator/
5
  Description: Allows you to add an expiration date (minute) to posts which you can configure to either delete the post, change it to a draft, or update the post categories at expiration time.
6
  Author: Aaron Axelsen
7
- Version: 2.0.0
8
  Author URI: http://postexpirator.tuxdocs.net/
9
  Translation: Thierry (http://palijn.info)
10
  Text Domain: post-expirator
@@ -18,7 +18,7 @@ function postExpirator_init() {
18
  add_action('plugins_loaded', 'postExpirator_init');
19
 
20
  // Default Values
21
- define('POSTEXPIRATOR_VERSION','2.0.0-rc1');
22
  define('POSTEXPIRATOR_DATEFORMAT',__('l F jS, Y','post-expirator'));
23
  define('POSTEXPIRATOR_TIMEFORMAT',__('g:ia','post-expirator'));
24
  define('POSTEXPIRATOR_FOOTERCONTENTS',__('Post expires at EXPIRATIONTIME on EXPIRATIONDATE','post-expirator'));
@@ -599,14 +599,6 @@ function postExpiratorMenuGeneral() {
599
  $expireddisplayfooterdisabled = 'checked="checked"';
600
  else if ($expireddisplayfooter == 1)
601
  $expireddisplayfooterenabled = 'checked="checked"';
602
-
603
- $expiredcategorydisabled = '';
604
- $expiredcategoryenabled = '';
605
- if ($expiredcategory == 0)
606
- $expiredcategorydisabled = 'checked="checked"';
607
- else if ($expiredcategory == 1)
608
- $expiredcategoryenabled = 'checked="checked"';
609
-
610
  ?>
611
  <p>
612
  <?php _e('The post expirator plugin sets a custom meta value, and then optionally allows you to select if you want the post changed to a draft status or deleted when it expires.','post-expirator'); ?>
@@ -1045,6 +1037,17 @@ function postexpirator_upgrade() {
1045
  delete_option('expirationdateExpiredPostStatus');
1046
  update_option('postexpiratorVersion',POSTEXPIRATOR_VERSION);
1047
  }
 
 
 
 
 
 
 
 
 
 
 
1048
  }
1049
  }
1050
  add_action('admin_init','postexpirator_upgrade');
4
  Plugin URI: http://wordpress.org/extend/plugins/post-expirator/
5
  Description: Allows you to add an expiration date (minute) to posts which you can configure to either delete the post, change it to a draft, or update the post categories at expiration time.
6
  Author: Aaron Axelsen
7
+ Version: 2.0.1
8
  Author URI: http://postexpirator.tuxdocs.net/
9
  Translation: Thierry (http://palijn.info)
10
  Text Domain: post-expirator
18
  add_action('plugins_loaded', 'postExpirator_init');
19
 
20
  // Default Values
21
+ define('POSTEXPIRATOR_VERSION','2.0.1');
22
  define('POSTEXPIRATOR_DATEFORMAT',__('l F jS, Y','post-expirator'));
23
  define('POSTEXPIRATOR_TIMEFORMAT',__('g:ia','post-expirator'));
24
  define('POSTEXPIRATOR_FOOTERCONTENTS',__('Post expires at EXPIRATIONTIME on EXPIRATIONDATE','post-expirator'));
599
  $expireddisplayfooterdisabled = 'checked="checked"';
600
  else if ($expireddisplayfooter == 1)
601
  $expireddisplayfooterenabled = 'checked="checked"';
 
 
 
 
 
 
 
 
602
  ?>
603
  <p>
604
  <?php _e('The post expirator plugin sets a custom meta value, and then optionally allows you to select if you want the post changed to a draft status or deleted when it expires.','post-expirator'); ?>
1037
  delete_option('expirationdateExpiredPostStatus');
1038
  update_option('postexpiratorVersion',POSTEXPIRATOR_VERSION);
1039
  }
1040
+
1041
+ if (version_compare($version,'2.0.1') == -1) {
1042
+ // Forgot to do this in 2.0.0
1043
+ if (is_multisite()) {
1044
+ global $current_blog;
1045
+ wp_clear_scheduled_hook('expirationdate_delete_'.$current_blog->blog_id);
1046
+ } else
1047
+ wp_clear_scheduled_hook('expirationdate_delete');
1048
+
1049
+ update_option('postexpiratorVersion',POSTEXPIRATOR_VERSION);
1050
+ }
1051
  }
1052
  }
1053
  add_action('admin_init','postexpirator_upgrade');
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: axelseaa
3
  Tags: expire, posts, pages, schedule
4
  Requires at least: 3.2
5
  Tested up to: 3.5.1
6
- Stable tag: 2.0.0
7
 
8
  Allows you to add an expiration date to posts which you can configure to either delete the post, change it to a draft, or update the
9
  post categories.
@@ -47,6 +47,11 @@ This section describes how to install the plugin and get it working.
47
 
48
  == Changelog ==
49
 
 
 
 
 
 
50
  **Version 2.0.0**
51
 
52
  This is a major update of the core functions of this plugin. All current plugins and settings should be upgraded to the new formats and work as expected. Any posts currently schedule to be expirated in the future will be automatically upgraded to the new format.
@@ -169,6 +174,9 @@ NOTE: After upgrading, you may need to reset the cron schedules. Following onsc
169
 
170
  == Upgrade Notice ==
171
 
 
 
 
172
  = 2.0.0 =
173
  This is a major update of the core functions of this plugin. All current plugins and settings should be upgraded to the new formats and work as expected. Any posts currently schedule to be expirated in the future will be automatically upgraded to the new format.
174
 
3
  Tags: expire, posts, pages, schedule
4
  Requires at least: 3.2
5
  Tested up to: 3.5.1
6
+ Stable tag: 2.0.1
7
 
8
  Allows you to add an expiration date to posts which you can configure to either delete the post, change it to a draft, or update the
9
  post categories.
47
 
48
  == Changelog ==
49
 
50
+ **Version 2.0.1**
51
+
52
+ * Removes old scheduled hook - this was not done completely in the 2.0.0 upgrade
53
+ * Old option cleanup
54
+
55
  **Version 2.0.0**
56
 
57
  This is a major update of the core functions of this plugin. All current plugins and settings should be upgraded to the new formats and work as expected. Any posts currently schedule to be expirated in the future will be automatically upgraded to the new format.
174
 
175
  == Upgrade Notice ==
176
 
177
+ = 2.0.1 =
178
+ Removes old scheduled hook - this was not done completely in the 2.0.0 upgrade
179
+
180
  = 2.0.0 =
181
  This is a major update of the core functions of this plugin. All current plugins and settings should be upgraded to the new formats and work as expected. Any posts currently schedule to be expirated in the future will be automatically upgraded to the new format.
182