WordPress.org

Ready to get started?Download WordPress

Forums

Co-Authors Plus
[resolved] Who can add, edit, and assign co-authors? (10 posts)

  1. Mark
    Member
    Posted 1 year ago #

    Who can add, edit, and assign co-authors? Is there a special capability one needs to have for doing this? On my site, the administrator can obviously do everything, but a user with the WordPress "editor" role cannot add, edit, or assign co-authors.

    I would like to give these capabilities to the editor role. Using the Members plugin, I don't see any Co-Authors Plus related capabilities that I can assign to the editor role. How can I do this?

    http://wordpress.org/extend/plugins/co-authors-plus/

  2. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

    Co-Authors Plus checks for whether a user can 'edit_others_posts'.

  3. Mark
    Member
    Posted 1 year ago #

    Thanks, that makes sense. Now my editor role can change authors on posts.

    That answers only half of my question so I'm marking the topic as not resolved if you don't mind. (I see though that my original question wasn't the clearest formulation.) I'm also looking for the capabilities connected to viewing the list of guest authors via /wp-admin/users.php?page=view-guest-authors and adding new guest authors to it.

    I can give my editor capabilities like list_users, add_users, create_users, edit_users, remove_users, delete_users. Which ones do I need to give them the possibility of viewing and adding to the guest author list? (And what's the difference between add/create, and remove/delete?)

  4. Mark
    Member
    Posted 1 year ago #

    Update: To test, I have just given the editor all user-related capabilities except promoting and deleting/removing users. No dice. I can't get the Guest Authors page to show up for my editor.

  5. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

    Oh, I see what you're talking about now. The required cap is 'list_users' but that also is filterable.

  6. Mark
    Member
    Posted 1 year ago #

    Great, works!

    PS It might be useful to add these two pieces of information to the FAQ.

  7. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

    Great suggestion! I've added the explanation to the readme.

  8. hazelstreet
    Member
    Posted 1 year ago #

    Hi, I am trying to set up this exact thing (let my editors create new guest authors). I've found the filter you mention in the class-coauthors-guest-authors.php file:

    // Allow users to change the required cap for modifying guest authors
    		$this->list_guest_authors_cap = apply_filters( 'coauthors_guest_author_manage_cap', $this->list_guest_authors_cap );

    But I'm afraid I'm not very php literate. Where do I put this code? In my WP capabilities.php file somewhere? Someplace else? Do I have to add more to it to define it specifically for the Editor role?

    Sorry, I'm just a little lost. Thanks for any help!

  9. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

    Sure, you can drop the following into your theme's functions.php file:

    /**
     * Allow editors to manage guest author profiles
     */
    add_filter( 'coauthors_guest_author_manage_cap', 'capx_filter_guest_author_manage_cap' );
    function capx_filter_guest_author_manage_cap( $cap ) {
    	return 'edit_others_posts';
    }
  10. hazelstreet
    Member
    Posted 1 year ago #

    Thanks so much, worked perfectly!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic