I've created a post edit form in front-end of the site, this form is accessible on the front-end ONLY if the user is logged in. Now, for some reason, upon a certain condition is met, I want to DISABLE user capability to edit or delete the post and keep it read only.
I've modified the above mentioned user's capabilities (using a plugin) and have confirmed it via
user_can( $user, $capability ) that the user no longer has
Now the issue is, the user is still able to edit or delete post(s) via front-end form or delete link. Is there something I am missing? Do I manually have to hook into some action/filter to stop edit/delete_posts action? If so, how can I do it?
Note: All relevant
delete_*_posts are also disabled.