WordPress Post Expirator 2.0.0 Released

wordpress-logo-notext-rgbI’m happy to announce that the 2.0.0 version of Post Expirator is now available!  This is a major update to most of the underlying code, and a slight logic shift in how things are done to be more flexible for additional options to be added down the road.  I spent extensive time testing all of the various aspects, and migrations path.  So, you should have no issues upgrading!

All posts that were scheduled using a 1.x version of the plugin will be migrated to use the new scheduling format and should expire as planned.

Some of the key features in this version are:

  • New: Revamped the expiration process – the plugin no longer runs on an minute, hourly, or other schedule. Each expiration event schedules a unique event to run, conserving system resources and making things more efficient
  • New: Added the ability to expire to a “private” post
  • New: Added the ability to expire by adding or removing categories. The old way of doing things is now known as replacing categories
  • New: The type of expiration event can be selected for each post, directly from the post editing screen
  • New: Ability to set defaults for each post type (including custom posts)
  • New: Renamed expiration-date meta value to _expiration-date
  • New: Revamped timezone handling to be more correct with WordPress standards and fix conflicts with other plugins
  • Fix: Removed kses filter calls when then schedule task runs that was causing code entered as unfiltered_html to be removed

For a complete list, please see the changelog.

The plugin can be downloaded at the WordPress Plugins Page.  Enjoy!

Update: Version 2.0.1 has been released to finish removing the old scheduled event.

This entry was posted in WP Post Expirator. Bookmark the permalink.

12 Responses to WordPress Post Expirator 2.0.0 Released

  1. Corwyn says:

    I gotta say Aaron, thank you very much for this “must have” plugin. I’ve been using it for years and it just keeps getting better!

  2. Stephen says:

    Thank you for the plugin, it’s very handy.

    However I think this update has “broken” it in a way.

    I used a custom front-end posting form that would Enable Post Expiration by setting the “expiration-date” custom field using the “add_post_meta” function.

    This doesn’t work in the latest version. Is there a new way of doing this, or is it a bug?

    Thank you,

    Stephen

    • Aaron Axelsen says:

      Unfortunately how other plugins and developers are utilizing my plugin cannot always be known. This plugin was never designed to be used in this way. The fact that this doesn’t work anymore is actually a “feature” and one of the main reason the plugin was re-written. The way the expiration was running before it was very costly (resource-wise) and on larger sites it would cause a noticeable hit in performance, especially if configured to run every minute.

      Now – I’m happy to try to assist you to figure out the best solution in your scenario, but just adding a custom meta option won’t cut it anymore.

      How are you calculating the expiration timestamp in your custom form?

  3. Stephen says:

    Thanks for the quick response and explanation.

    After adding the post, I add:

    add_post_meta($newpostid, ‘expiration-date’, strtotime(“+31 days, now”), true);

    I added this line purely to automate the process of setting a post to auto-expire, as I know I can easily set the default expire date to “+ 31 days, now” in the options and tick the box manually on the post page in backend.

  4. Julie says:

    Hey Aaron, Thank you for this plugin. It looks exactly what I need. Please excuse me for being dense, but I don’t understand how to set the “Default Date/Time Duration” to a “Custom” setting.

    I want all posts in a certain category to default expire after 30 days. How can I set this?
    Is it as simple as putting “+30 days” in the custom setting?

  5. David says:

    I have the same problem as Stephen.

    I run a script to add my posts, and used to just add a custom tag timestamp to each post via add_post_meta(). Now it doesn’t work.

    I do add an update to the post via $post_id = wp_update_post( $update_post ) in my code after I add the meta key, but the wp-cron entry isn’t showing up either.

    If I manually go into the post and just click on “UPDATE” from within the admin panel, then the needed postExpiratorExpire cron entry will be created. Is there a way to add the hook for the post expirator code to run on manual post updates as well as post updates using code?

    If not, can you point me to the right direction to manually add a cron entry using code with the right parameters for postExpiratorExpire?

  6. Joe says:

    Hi Aaron

    Thanks for making this great and very useful plugin. Have a question for you, and it is an issue that makes running our site a bit time consuming. We have over 5000 users that upload posts via the Gravity Forms Plugin we have on our site, but this doesn’t set the expiry date automitally, even though it used to before doing an update on your plugin. I tried your plugin on another site/domain with a similar setup that I have on our site, and it has the same issue. If I edit the post, it shows the correct expiry date, but it only sets the expiry once the post is updated. We have hundreds of posts per day, so it would be good to get this to set automatically, any ideas?

    Thanks,

    Joe

    • Aaron Axelsen says:

      The gravity forms plugins likely needs to be updated to support the new method of doing things. Unfortunately, I am not involved with that plugin so you may need to post on the forums or try to get a hold of the plugin authors.

  7. Corwyn says:

    Hi Aaron…just checking to make sure its safe to upgrade to WP3.8 … thanks!

  8. Leslie says:

    Hello! I use Post Expirator on our website http://www.hannahstreasure.org, and find it to be VERY useful. Thank you so much for developing it!

    Hoping you will release an updated version soon. Is there any timeline for that?

    Leslie

Leave a Reply

Your email address will not be published. Required fields are marked *