Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author sparkweb

    (@sparkweb)

    Hi Ben,

    This plugin only handles posts. User group rights are a whole other ball of wax and not something that I intend to target with this plugin. Sorry ’bout that.

    David

    Thread Starter benhartwich

    (@yoursql719)

    Hi,

    I think, you′ve missunderstood me. How can I control, which user role can access the bulk editor? Can I add author etc.? Can you please send me a code for this?

    Ben

    Plugin Author sparkweb

    (@sparkweb)

    Hi Ben, I get it now. Yes, there is a filter for the capability that you want to allow. You’ll set one for each CPT that you want to customize and it would work like this:

    apply_filters("cfbe_menu_display_post", "my_cfbe_perm_setting");
    apply_filters("cfbe_menu_display_page", "my_cfbe_perm_setting");
    apply_filters("cfbe_menu_display_MYCPT", "my_cfbe_perm_setting");
    function my_cfbe_perm_setting($str) {
    	return "edit_posts";
    }

    By default it uses manage_options which is an admin-only thing. But you could set it to edit_posts which I think is a author-level setting. Or maybe upload_files.

    https://codex.www.ads-software.com/Roles_and_Capabilities#Author

    Thread Starter benhartwich

    (@yoursql719)

    Hi,

    thanks for your code, but it doesn′t work. I′ve inserted it at my functions.php of my child theme, but nothing happens or have I missed anything?

    Regards,

    Plugin Author sparkweb

    (@sparkweb)

    Can you post the code you posted to your functions.php file?

    Thread Starter benhartwich

    (@yoursql719)

    I′ve inserted the lines you posted above.

    Regards,

    Plugin Author sparkweb

    (@sparkweb)

    Well as I mentioned, you may want to do upload_files instead. Also, the MYCPT line is for any custom posts you have. You’d replace MYCPT with the slug for your custom post type.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Access rights for bulk edit’ is closed to new replies.