• Hi, I’ve installed your plugin, all looks good. I’ve created a custom capability called wfu, but don’t know what to do next? I want editors to see the plugin ‘WordPress File Upload’ which is in the settings menu, ideally move to it to tools. But, tools is not showing for editors, which capability is this? With thanks in advance. topmarksenglish.com

    https://www.ads-software.com/plugins/user-role-editor/

Viewing 1 replies (of 1 total)
  • Plugin Author Vladimir Garagulya

    (@shinephp)

    Hi,

    Things are not so easy. You can not use own custom capability for the plugin, in case plugin does not allow to dynamically change a capability which it uses. The reason – that capability is written at the plugin source code:

    add_options_page('Wordpress File Upload', 'Wordpress File Upload', 'manage_options', 'wordpress_file_upload', 'wordpress_file_upload_manage_dashboard');

    .
    “WordPress File Upload” plugin protects its menu item with the same capability which protects the “Settings” menu itself: ‘manage_options’.
    If you will give it to ‘editor’ role, the most probably you will wish to block for ‘editor’ some other menu items from “Settings”.
    User Role Edtior Pro may help you with that:
    https://www.role-editor.com/block-admin-menu-items

    To move ‘wp-file-upload’ plugin to the tools menu you have to change plugin’s source code – replace add_options_page to the add_management_page:
    https://codex.www.ads-software.com/Function_Reference/add_management_page. The most probably some other modification will be needed.
    A bad thing, that you can not install updated version of the plugin after that. You will need to transfer your changes to the new version 1st.

Viewing 1 replies (of 1 total)
  • The topic ‘Custom capability for WFU’ is closed to new replies.