Allow Contributor to edit published post and filter by page id
I’d like to give contributors permission to edit only some of their own published pages.
I can use the following if I want to allow them to edit all of their published posts. How do I filter it allowing only certain pageids?
//to add capability to user $user = new WP_User( $user_id ); $user->add_cap( 'edit_published_posts');