Title: Electric Studio Auto Post Expire
Author: James Irving-Swift
Published: <strong>1 Aprile 2011</strong>
Last modified: 14 Febbraio 2014

---

Ricerca i plugin

![](https://ps.w.org/electric-studio-auto-expire-post/assets/banner-772x250.png?
rev=557349)

Questo plugin **non è stato testato con le ultime 3 versioni principali (major releases)
di WordPress**. Potrebbe non essere più mantenuto, o supportato, e potrebbe presentare
problemi di compatibilità se utilizzato con versioni più recenti di WordPress.

![](https://s.w.org/plugins/geopattern-icon/electric-studio-auto-expire-post_b1d5ea.
svg)

# Electric Studio Auto Post Expire

 Di [James Irving-Swift](https://profiles.wordpress.org/irvingswiftj/)

[Scarica](https://downloads.wordpress.org/plugin/electric-studio-auto-expire-post.zip)

 * [Dettagli](https://it.wordpress.org/plugins/electric-studio-auto-expire-post/#description)
 * [Recensioni](https://it.wordpress.org/plugins/electric-studio-auto-expire-post/#reviews)
 *  [Installazione](https://it.wordpress.org/plugins/electric-studio-auto-expire-post/#installation)
 * [Sviluppo](https://it.wordpress.org/plugins/electric-studio-auto-expire-post/#developers)

 [Supporto](https://wordpress.org/support/plugin/electric-studio-auto-expire-post/)

## Descrizione

Adds an expiry date and time to posts, pages, or custom post types in which the 
post becomes a draft.

 * Supports custom post types
 * Allows admin to choose which post types can expire
 * Sets expired posts to drafts rather than deleting them
 * To show an expiry date on the frontend, use shortcode [expirydate] else function
   es_ape_exp_date()

## Screenshot

[⌊The options menu⌉⌊The options menu⌉[

The options menu

[⌊The added metabox to the edit post/page/attachment page⌉⌊The added metabox to 
the edit post/page/attachment page⌉[

The added metabox to the edit post/page/attachment page

## Installazione

 1. Upload `electric-studio-auto-post-expire` folder to the `/wp-content/plugins/` 
    directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress

## FAQ

  How does it work?

The plugin uses WordPress’s built-in cron functionality. Every set time it will 
check whether there’s anything to expire. Previously it checked on pageload, which
was resource-intensive on high-traffic websites. You can check when it’s going to
run next on the top of this page.

  When will it run first?

As soon as you hit the “Save Changes” button. If it’s at 2am, then 2am, and then
x interval you set.

If you want to reset the time (say, you want to run it every day at 4am), you need
to set the frequence to something else, and then back to daily at 4am. Future release
of the plugin may have a “run first at” option, but not just yet.

  How do I disable the default expiration time?

Click on the input field (color will change red if you move your mouse over it) 
and Save Changes

  How often should I run the check?

That depends on the traffic your site is getting, and the granularity you want to
achieve.

If you need to expire a piece of content at 15:34, then I suggest setting 15 minutes
and clicking Save Changes at any of these times past the hour: 4, 19, 34, 49 minutes.

If you have a very high-traffic site with a lot of content, then I suggest running
it daily at the wee hours of the morning (or when you have the least ammount of 
traffic. Check your analytics).

It will run a complete loop of every post type, so it might take a while, and eat
up server memory and CPU cycles for a bit, which means for a short time your site
will be slower.

  It says the next scheduled check runs in a negative amount of minutes. What gives?

That’s just cron and WordPress being silly. Refresh should solve that problem, but
basically, WordPress thinks the next schedule is still in the past. It will get 
there, don’t worry.

That’s all I can think of right now. If you have any other questions, post them 
here, or the plugins WordPress plugin page. Use latter for bugs, and this one for
general questions / feature requests though.

  Can I use this plugin on more than one post type?

Yes you can since version 1.2

  Can I show the expiry date on the front end of my site?

Yes, since version 1.3.5, I have included the shorted code of [expirydate format
=”d-m-Y”] or for those that would like to build it into their template, you can 
use `es_ape_exp_date( $format )`. ($format is optional, and is the same as the PHP
date formats (see [http://uk.php.net/manual/en/function.date.php](http://uk.php.net/manual/en/function.date.php)))

## Recensioni

Non ci sono recensioni per questo plugin.

## Contributi e sviluppo

“Electric Studio Auto Post Expire” è un software open source. Le persone che hanno
contribuito allo sviluppo di questo plugin sono indicate di seguito.

Collaboratori

 *   [ James Irving-Swift ](https://profiles.wordpress.org/irvingswiftj/)
 *   [ javorszky ](https://profiles.wordpress.org/javorszky/)
 *   [ Electric Studio ](https://profiles.wordpress.org/electric-studio/)

[Traduci “Electric Studio Auto Post Expire” nella tua lingua.](https://translate.wordpress.org/projects/wp-plugins/electric-studio-auto-expire-post)

### Ti interessa lo sviluppo?

[Esplora il codice](https://plugins.trac.wordpress.org/browser/electric-studio-auto-expire-post/)
segui il [repository SVN](https://plugins.svn.wordpress.org/electric-studio-auto-expire-post/),
segui il [log delle modifiche](https://plugins.trac.wordpress.org/log/electric-studio-auto-expire-post/)
tramite [RSS](https://plugins.trac.wordpress.org/log/electric-studio-auto-expire-post/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.6.10

 * Fixed one more line that was outputting notices

#### 1.6.9

 * Refactored some of the internal code to prevent notices and warnings from populating
   the error_log
 * Introduced default values for some of the fields
 * New feature: added functionality to display how much time is left. Use `es_time_left()`
   within the loop. It will give you a human readable time difference in a variable,
   so you’ll need to use `echo` on that. Uses `human_time_diff()`, and accounts 
   for the frequency of the cron job.

#### 1.6.8

 * Fixed a bug where automatic expirations would fire hooks, manual ones wouldn’t.
   Now all will fire hooks.

#### 1.6.7

 * Moved expiry functions over to built-in methods. Now hooks on post status transition
   and trash will also fire.

#### 1.6.6

 * Fixed (hopefully) the random draft-set bug.

#### 1.6.5

 * Changed comparison method for meta value.

#### 1.6.4

 * Fixed cron scheduling. Mad props to MonkeyPress for spotting the problem! Thank
   you!

#### 1.6.2

 * Removed some superfluous piece of code.

#### 1.6.1

 * Added some logic to test for empty values in the date.

#### 1.6

 * New feature: Default expiry time now added
 * New feature: Status can be chosen to go into once expired (not just draft)
 * New feature: Replaced functionality from pageload (init hook) to a cron job

#### 1.5.5

 * Removed a blocking error message. This is a BETA thing, sometimes the expiry 
   date/time will not save due to a nonce verification error which I’m looking into.(
   as of 15th October, 2012)

#### 1.5.4

 * Removed a debugging related line.

#### 1.5.3

 * If the nonce fails, the whole script would die(), but there’s a call to an undefined
   function. That has been added back. It provides troubleshooting for me.

#### 1.5.2

 * Solved a problem that resulted in a warning if no post types are selected is 
   now fixed (line 347) – thanks Kathy
 * Solved an erroneous function call resulting in a failure to activate plugin (
   line 98)

#### 1.5

 * Added time as well, not just date. Uses current time, so make sure your timezone
   settings are properly configured (Settings->General)
 * Made it work under 3.4.2
 * Complete rewrite of the codebase
 * Now uses builtin jquery-ui-datepicker (instead of outside file)
 * Replaced raw SQL queries with proper WP functions
 * Since I inherited the plugin, some problems might crop up again. Help me weed
   them out 🙂

#### 1.4

 * Added fallback for users with older versions of jquery that don’t have .on() 
   function. Credit to Mark McLachlan for spotting this bug.
 * Cleaned up code to make it easier to read!
 * Put everthing into classes to tidy it up and the make it consistant with our 
   other plugins
 * Worked on some future proofing
 * Put backward compatility for users using the esape_get_expiry_date() function
   so that it would work the same despite now being inside a class.
 * Minor Bug Fixes

#### 1.3.5

 * Shortcode and function added for showing expiry date on front end.

#### 1.2.2

 * jquery ui datepicker bug fixed

#### 1.2.1

 * Fixed install and remove bug
 * Fixed date not showing in meta box bug

#### 1.2

 * Allows the Selection of multiple post types
 * Uses WordPress Options API for the options page

#### 1.1

 * Allows posts that have no expiry dates not to auto-expire

#### 1.0

 * 1st Stable Version!

## Meta

 *  Versione **1.6.10**
 *  Ultimo aggiornamento **13 anni fa**
 *  Installazioni attive **50+**
 *  Versione WordPress ** 3.0 o superiore **
 *  Testato fino alla versione **3.7.41**
 *  Lingua
 * [English (US)](https://wordpress.org/plugins/electric-studio-auto-expire-post/)
 * Tag
 * [custom posts](https://it.wordpress.org/plugins/tags/custom-posts/)[date](https://it.wordpress.org/plugins/tags/date/)
   [draft](https://it.wordpress.org/plugins/tags/draft/)[expiry](https://it.wordpress.org/plugins/tags/expiry/)
   [posts](https://it.wordpress.org/plugins/tags/posts/)
 *  [Visualizzazione avanzata](https://it.wordpress.org/plugins/electric-studio-auto-expire-post/advanced/)

## Valutazioni

 1 su 5 stelle.

 *  [  0 recensioni a 5-stelle     ](https://wordpress.org/support/plugin/electric-studio-auto-expire-post/reviews/?filter=5)
 *  [  0 recensioni a 4-stelle     ](https://wordpress.org/support/plugin/electric-studio-auto-expire-post/reviews/?filter=4)
 *  [  0 recensioni a 3-stelle     ](https://wordpress.org/support/plugin/electric-studio-auto-expire-post/reviews/?filter=3)
 *  [  0 recensioni a 2-stelle     ](https://wordpress.org/support/plugin/electric-studio-auto-expire-post/reviews/?filter=2)
 *  [  3 recensioni a 1-stelle     ](https://wordpress.org/support/plugin/electric-studio-auto-expire-post/reviews/?filter=1)

[La tua recensione](https://wordpress.org/support/plugin/electric-studio-auto-expire-post/reviews/#new-post)

[Vedi tutte le recensioni](https://wordpress.org/support/plugin/electric-studio-auto-expire-post/reviews/)

## Collaboratori

 *   [ James Irving-Swift ](https://profiles.wordpress.org/irvingswiftj/)
 *   [ javorszky ](https://profiles.wordpress.org/javorszky/)
 *   [ Electric Studio ](https://profiles.wordpress.org/electric-studio/)

## Supporto

Hai qualcosa da dire? Ti serve aiuto?

 [Chiedi nel forum di supporto](https://wordpress.org/support/plugin/electric-studio-auto-expire-post/)