Trash, Draft and Pending review in wordpress, how do they work?

3

Good afternoon, I would like your help, I need to take a post from the air, but I would like to reactivate it regardless of the time it takes, if a year from now I want to publish it again how should I proceed, time all the posts in the recycle bin begin to disappear, the only alternative I found on the internet was to use

define( 'EMPTY_TRASH_DAYS', 365 );

but after 365 it is permanently deleted? and can I use a long period like this, or is there another way to leave the post as a draft?

    
asked by anonymous 05.12.2016 / 17:35

2 answers

2

Just leave the post in draft it will not be deleted, this line:

define( 'EMPTY_TRASH_DAYS', 365 );

It's about clearing the posts that are already in the bin, the draft is not considered bin. I'll leave this link of the documentation about the subject

    
05.12.2016 / 18:17
2

I believe that EMPTY_TRASH_DAYS is only for deleting, this does not affect "drafts", so I would just remove it from the publication, but if I am wrong I believe that just remove the action wp_schedule_delete , like this:

function my_remove_schedule_delete() {
    remove_action( 'wp_scheduled_delete', 'wp_scheduled_delete' );
}

add_action( 'init', 'my_remove_schedule_delete' );
    
05.12.2016 / 18:18