The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Posts 2 Posts
Customize admin box based on user role. (2 posts)

  1. Deleted account
    Posted 3 years ago #

    Ok first of all. Thank you for such an amazing plugin with such an incredible documentation.

    I couldn't find this though:

    1) Currently the admin box for P2P displays only for the admin user. I want to display it for a specific user role as well.

    2) This one is more tricky: I want that only posts that belong to the current user (as author) are displayed in the box. On both 'from' and 'to' sides.

    I don't need you to tell me how to do it. Just let me know if it can be done (I think it should), and maybe a little direction on which functions or hooks to use. That's all !

    Thank you!


  2. scribu
    Plugin Author

    Posted 3 years ago #

    2) is actually the easier one. Just use the 'p2p_connectable_args' filter: https://github.com/scribu/wp-posts-to-posts/wiki/Admin-box-filters

    Currently the admin box for P2P displays only for the admin user.

    That's not true; it displays for any role that has the appropriate 'edit_posts' capability, for both concerned post types. See the can_edit_connections() method in core/side.php.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Posts 2 Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.