Programmatically allow a non-author to edit a post based custom meta field
User A authored and published a post. In that post, User A selected User B as the “Manager” (a custom meta field).
How can I allow User B to edit any post in which they are selected as the “Manager”?
I’m comfortable with code. Looking for a way to programmatically hook into the check for who can edit a post.