[wp-hackers] Never Permanently Delete

Andrew Nacin wp at andrewnacin.com
Mon Oct 4 19:27:07 UTC 2010

On Mon, Oct 4, 2010 at 2:21 PM, Ryan Bilesky <rbilesky at gmail.com> wrote:

> I am looking for a way to stop wordpress from emptying the trash every 30
> days.  I know I can define a new time frame but I want to completely
> disable
> the ability for trash to be permanently deleted.  I am also looking to
> remove the Permanently Delete link for posts and comments.

I've done this by placing EMPTY_TRASH_DAYS to an insane number.
Alternatively, you may prevent wp_scheduled_delete() from being scheduled
and fired.

You can also remove all UI action links for the deletion of a post (i.e. so
they do not appear on post_status=trash) but be sure to also force a die()
on pre-deletion hooks.

More information about the wp-hackers mailing list