WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Deleted account
    Member
    Posted 1 year 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!

    http://wordpress.org/extend/plugins/posts-to-posts/

  2. scribu
    Member
    Plugin Author

    Posted 1 year 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

About this Topic

Tags

No tags yet.