Title: exist any Function to allow userid edit postid
Last modified: August 30, 2016

---

# exist any Function to allow userid edit postid

 *  Resolved [spyderlol](https://wordpress.org/support/users/spyderlol/)
 * (@spyderlol)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/exist-any-function-to-allow-userid-edit-postid/)
 * Hello,
 * There are any function that by code allow userid/username edit specific post?
 * Somethin like that:
 * allow_user_edit_post(user->id, post->ID);
 * [https://wordpress.org/plugins/user-role-editor/](https://wordpress.org/plugins/user-role-editor/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Vladimir Garagulya](https://wordpress.org/support/users/shinephp/)
 * (@shinephp)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/exist-any-function-to-allow-userid-edit-postid/#post-6706059)
 * There is no built-in function for this.
    You may write your own. Hook it to the‘
   map_meta_cap’ filter, fired at wp-includes/capabilities.php, line # 1429 Parameters
   for your function are $caps, $cap, $user_id, $args Post ID value will be it the
   $args[0], if available.
 * You should modify and return $caps array, remove ‘do_not_allow’ item and add ‘
   edit_posts’ or ‘edit_others_posts’, possibly adding $cap will be enough.

Viewing 1 replies (of 1 total)

The topic ‘exist any Function to allow userid edit postid’ is closed to new replies.

 * ![](https://ps.w.org/user-role-editor/assets/icon-256x256.jpg?rev=1020390)
 * [User Role Editor](https://wordpress.org/plugins/user-role-editor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/user-role-editor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/user-role-editor/)
 * [Active Topics](https://wordpress.org/support/plugin/user-role-editor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/user-role-editor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/user-role-editor/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Vladimir Garagulya](https://wordpress.org/support/users/shinephp/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/exist-any-function-to-allow-userid-edit-postid/#post-6706059)
 * Status: resolved