Restrict editing of post type to list stored in user meta
Ideally access controls would be implemented via WordPress’s Roles and Capabilities system. But in highly-granular cases such as limiting access to a single post to a few users, the map_meta_cap filter can be used to shim in additional restrictions. In this case, when WordPress is testing an edit_post capability for a user/post combination, we can … Read more