• Resolved Mark

    (@codeispoetry)


    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/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Daniel Bachhuber

    (@danielbachhuber)

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

    Thread Starter Mark

    (@codeispoetry)

    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?)

    Thread Starter Mark

    (@codeispoetry)

    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.

    Plugin Author Daniel Bachhuber

    (@danielbachhuber)

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

    Thread Starter Mark

    (@codeispoetry)

    Great, works!

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

    Plugin Author Daniel Bachhuber

    (@danielbachhuber)

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

    hazelstreet

    (@hazelstreet)

    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!

    Plugin Author Daniel Bachhuber

    (@danielbachhuber)

    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';
    }
    hazelstreet

    (@hazelstreet)

    Thanks so much, worked perfectly!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Who can add, edit, and assign co-authors?’ is closed to new replies.