##Restrict Post Editing in the WordPress Admin
This code allows any users with the capability to edit other’s posts to view all posts. This means editors and administrators will be able to see all posts. Users with other roles like contributor or authors will only see their own posts. If you are using custom user roles on your site, then you need to keep in mind that users who can edit posts added by other users will also be able to see them.