Version Description
Download this release
Release Info
Developer | axelseaa |
Plugin | Post Expirator |
Version | 2.4.1 |
Comparing to | |
See all releases |
Code changes from version 2.4.0.1 to 2.4.1
- admin-edit.js +1 -1
- post-expirator.php +11 -4
- readme.txt +14 -12
admin-edit.js
CHANGED
@@ -49,7 +49,7 @@
|
|
49 |
}
|
50 |
};
|
51 |
|
52 |
-
$( '#bulk_edit' ).
|
53 |
|
54 |
// define the bulk edit row
|
55 |
var $bulk_row = $( '#bulk-edit' );
|
49 |
}
|
50 |
};
|
51 |
|
52 |
+
$( '#bulk_edit' ).on( 'click', function() {
|
53 |
|
54 |
// define the bulk edit row
|
55 |
var $bulk_row = $( '#bulk-edit' );
|
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.4.
|
8 |
Author URI: http://postexpirator.tuxdocs.net/
|
9 |
Text Domain: post-expirator
|
10 |
*/
|
@@ -17,7 +17,7 @@ function postExpirator_init() {
|
|
17 |
add_action('plugins_loaded', 'postExpirator_init');
|
18 |
|
19 |
// Default Values
|
20 |
-
define('POSTEXPIRATOR_VERSION','2.4.
|
21 |
define('POSTEXPIRATOR_DATEFORMAT',__('l F jS, Y','post-expirator'));
|
22 |
define('POSTEXPIRATOR_TIMEFORMAT',__('g:ia','post-expirator'));
|
23 |
define('POSTEXPIRATOR_FOOTERCONTENTS',__('Post expires at EXPIRATIONTIME on EXPIRATIONDATE','post-expirator'));
|
@@ -262,6 +262,10 @@ function expirationdate_meta_box($post) {
|
|
262 |
// Get default month
|
263 |
$expirationdatets = get_post_meta($post->ID,'_expiration-date',true);
|
264 |
$firstsave = get_post_meta($post->ID,'_expiration-date-status',true);
|
|
|
|
|
|
|
|
|
265 |
$default = '';
|
266 |
$expireType = '';
|
267 |
$defaults = get_option('expirationdateDefaults'.ucfirst($post->post_type));
|
@@ -285,7 +289,7 @@ function expirationdate_meta_box($post) {
|
|
285 |
}
|
286 |
$defaultmonth = get_date_from_gmt(gmdate('Y-m-d H:i:s',$ts),'m');
|
287 |
$defaultday = get_date_from_gmt(gmdate('Y-m-d H:i:s',$ts),'d');
|
288 |
-
$defaultyear = get_date_from_gmt(gmdate('Y-m-d H:i:s',$ts),'Y')
|
289 |
$defaulthour = get_date_from_gmt(gmdate('Y-m-d H:i:s',$ts),'H');
|
290 |
$defaultminute = get_date_from_gmt(gmdate('Y-m-d H:i:s',$ts),'i');
|
291 |
}
|
@@ -335,7 +339,7 @@ function expirationdate_meta_box($post) {
|
|
335 |
|
336 |
if ($defaultyear < $currentyear) $currentyear = $defaultyear;
|
337 |
|
338 |
-
for($i = $currentyear; $i
|
339 |
if ($i == $defaultyear)
|
340 |
$selected = ' selected="selected"';
|
341 |
else
|
@@ -1539,6 +1543,9 @@ function postexpirator_upgrade() {
|
|
1539 |
if (version_compare($version,'2.4') == -1) {
|
1540 |
update_option('postexpiratorVersion',POSTEXPIRATOR_VERSION);
|
1541 |
}
|
|
|
|
|
|
|
1542 |
}
|
1543 |
}
|
1544 |
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.4.1
|
8 |
Author URI: http://postexpirator.tuxdocs.net/
|
9 |
Text Domain: post-expirator
|
10 |
*/
|
17 |
add_action('plugins_loaded', 'postExpirator_init');
|
18 |
|
19 |
// Default Values
|
20 |
+
define('POSTEXPIRATOR_VERSION','2.4.1');
|
21 |
define('POSTEXPIRATOR_DATEFORMAT',__('l F jS, Y','post-expirator'));
|
22 |
define('POSTEXPIRATOR_TIMEFORMAT',__('g:ia','post-expirator'));
|
23 |
define('POSTEXPIRATOR_FOOTERCONTENTS',__('Post expires at EXPIRATIONTIME on EXPIRATIONDATE','post-expirator'));
|
262 |
// Get default month
|
263 |
$expirationdatets = get_post_meta($post->ID,'_expiration-date',true);
|
264 |
$firstsave = get_post_meta($post->ID,'_expiration-date-status',true);
|
265 |
+
|
266 |
+
// nonce
|
267 |
+
wp_nonce_field( '__postexpirator', '_postexpiratornonce' );
|
268 |
+
|
269 |
$default = '';
|
270 |
$expireType = '';
|
271 |
$defaults = get_option('expirationdateDefaults'.ucfirst($post->post_type));
|
289 |
}
|
290 |
$defaultmonth = get_date_from_gmt(gmdate('Y-m-d H:i:s',$ts),'m');
|
291 |
$defaultday = get_date_from_gmt(gmdate('Y-m-d H:i:s',$ts),'d');
|
292 |
+
$defaultyear = get_date_from_gmt(gmdate('Y-m-d H:i:s',$ts),'Y');
|
293 |
$defaulthour = get_date_from_gmt(gmdate('Y-m-d H:i:s',$ts),'H');
|
294 |
$defaultminute = get_date_from_gmt(gmdate('Y-m-d H:i:s',$ts),'i');
|
295 |
}
|
339 |
|
340 |
if ($defaultyear < $currentyear) $currentyear = $defaultyear;
|
341 |
|
342 |
+
for($i = $currentyear; $i <= $currentyear + 10; $i++) {
|
343 |
if ($i == $defaultyear)
|
344 |
$selected = ' selected="selected"';
|
345 |
else
|
1543 |
if (version_compare($version,'2.4') == -1) {
|
1544 |
update_option('postexpiratorVersion',POSTEXPIRATOR_VERSION);
|
1545 |
}
|
1546 |
+
if (version_compare($version,'2.4.1') == -1) {
|
1547 |
+
update_option('postexpiratorVersion',POSTEXPIRATOR_VERSION);
|
1548 |
+
}
|
1549 |
}
|
1550 |
}
|
1551 |
add_action('admin_init','postexpirator_upgrade');
|
readme.txt
CHANGED
@@ -1,17 +1,19 @@
|
|
1 |
-
=== Post Expirator ===
|
2 |
-
Contributors: axelseaa
|
3 |
-
|
|
|
4 |
Tags: expire, posts, pages, schedule
|
5 |
Requires at least: 4.0
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 2.4.
|
8 |
|
9 |
-
|
10 |
-
post categories.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
-
The Post Expirator plugin allows
|
|
|
|
|
15 |
|
16 |
* Draft
|
17 |
* Delete
|
@@ -30,10 +32,6 @@ default display format. See the [PHP Date Function](http://us2.php.net/manual/e
|
|
30 |
|
31 |
NOTE: This plugin REQUIRES that WP-CRON is setup and functional on your webhost. Some hosts do not support this, so please check and confirm if you run into issues using the plugin.
|
32 |
|
33 |
-
Plugin homepage [WordPress Post Expirator](http://postexpirator.tuxdocs.net).
|
34 |
-
|
35 |
-
New! [Feature Requests](http://postexpirator.uservoice.com) Please enter all feature requests here. Requests entered via the plugin website or support forum may be missed.
|
36 |
-
|
37 |
**[postexpirator] shortcode attributes**
|
38 |
|
39 |
* type - defaults to full - valid options are full,date,time
|
@@ -57,6 +55,10 @@ This section describes how to install the plugin and get it working.
|
|
57 |
|
58 |
== Changelog ==
|
59 |
|
|
|
|
|
|
|
|
|
60 |
**Version 2.4.0**
|
61 |
|
62 |
* Fix: Fixed PHP Error with PHP 7.
|
1 |
+
=== Post Expirator: Automatically Unpublish WordPress Posts ===
|
2 |
+
Contributors: publishpress, kevinB, stevejburge, andergmartins, axelseaa
|
3 |
+
Author: PublishPress
|
4 |
+
Author URI: https://publishpress.com
|
5 |
Tags: expire, posts, pages, schedule
|
6 |
Requires at least: 4.0
|
7 |
+
Tested up to: 5.7.1
|
8 |
+
Stable tag: 2.4.1
|
9 |
|
10 |
+
Add an expiration date to posts. When your post is automatically unpublished, you can delete the post, change the status, or update the post categories.
|
|
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
The Post Expirator plugin allows you to add an expiration date to posts. When your post is automatically unpublished, you can delete the post, change the status, or update the post categories.
|
15 |
+
|
16 |
+
There are a number of different ways that the posts can expire:
|
17 |
|
18 |
* Draft
|
19 |
* Delete
|
32 |
|
33 |
NOTE: This plugin REQUIRES that WP-CRON is setup and functional on your webhost. Some hosts do not support this, so please check and confirm if you run into issues using the plugin.
|
34 |
|
|
|
|
|
|
|
|
|
35 |
**[postexpirator] shortcode attributes**
|
36 |
|
37 |
* type - defaults to full - valid options are full,date,time
|
55 |
|
56 |
== Changelog ==
|
57 |
|
58 |
+
**Version 2.4.1**
|
59 |
+
|
60 |
+
* Fix: Updated deprecated .live jQuery reference.
|
61 |
+
|
62 |
**Version 2.4.0**
|
63 |
|
64 |
* Fix: Fixed PHP Error with PHP 7.
|