wp_maintenance() expiration time needs to be filterable
|Reported by:||jaredh123||Owned by:|
.maintenance files expire after 10 minutes if something goes wrong. 10 minutes is a long time, when most upgrading operations are attempted and fail within 20-60 seconds.
I propose three things:
- changing the default expiration to 5 minutes (300 seconds)
- Adding a filter to allow plugins and themes to filter this time to increase/decrease it
- Also, while I was in there, it seems prudent to attempt to delete the file if it has expired. The only argument I could see against this is that possibly it might be expensive if the file can not be deleted and wp attempts to delete the file on every page load. So I can take or leave 3 (and 2), but #2 I think is really important.