Need hook which fires when user hits "trash" button on custom post
-
I need to run a function right after the user hits the “trash” button on a custom post. {$old_status}_{$new_status} won’t help because those and their relations fire after the custom post is trashed. I need the function to run before the custom post is trashed.
Here’s the detailed explanation: I have a list of members of a group, where the member custom post was created with the Pods plugin. My users are members of that group, and so have access to the list so they can create/modify/delete their data. Some of my users are barely computer literate, and easily confused. I don’t want a user trashing someone else’s post When a user hits the “trash” button on a given member custom post, I hope to run a function that compare’s the current user’s user id to the member post’s user id. If they don’t match, access will be denied.
I have looked all over the WordPress site, and even looked through the hooks listed for WordPress 3.9 on Adam Brown’s site. I’m afraid I’m stuck.
- The topic ‘Need hook which fires when user hits "trash" button on custom post’ is closed to new replies.