current_user_can capabilities in the admin not working as expected
With you current_user_can call everything is just fine. The problem lies elsewhere… If you’ll take a look at Roles and Capabilities, you’ll see that there is no capability like edit_post. So your code is working correctly – admin can’t edit_post, because there is no such capability (unless it’s a custom capability registered by your code … Read more