How to cancel the trash action inside wp_trash_post


I need to restrict the button “EMPTY TRASH” and make it delete only the posts only if the logged in user is the creator.

I tried to use the wp_trash_post and i need to decide in the function if i need to continue to trash or not.

How do i tell WordPress NOT to empty the trash from specific posts?

, e4rthdog 3 years 2020-08-25T20:10:42-05:00 0 Answers 50 views 0

Leave an answer