Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1501
    WillemSiebe
    Participant

    Hi,

    At this moment me, as administrator, can only change setting for this plugin. However, the editor sometimes needs to switch of the automatic watermarking for some pictures. How can I achieve this?

    I looked at the ‘Members’ plugin and found this in there Readme file:

    >Adding new default capabilities

    Your plugin/theme can add new capabilities to the Edit Roles component if needed. This will allow users to easily select the additional capabilities for whichever roles they choose.

    add_filter( ‘members_get_capabilities’, ‘my_plugin_new_caps’ );

    function my_plugin_new_caps( $capabilities ) {

    $capabilities[] = ‘cap_name_1’;

    $capabilities[] = ‘cap_name_2’;

    $capabilities[] = ‘cap_name_3’;

    return $capabilities;

    }
    Note that you need to respect the existing capabilities and return the original array.

    Is this a possibility? I just don’t understand it ;-). Hope for your help.

    Kind regards,

    Willem

    #1503
    Bartosz
    Keymaster

    Willem-Siebe, Image Watermark uses capability default to all WP settings – ‘manage_options’. To allow access to IW without giving access to other setting you’d have to manually modify every occurence of ‘manage_options’ in plugin code to something accessible for editors, like ‘edit_pages’.

    #1504
    WillemSiebe
    Participant

    Hi Bartosz,

    So, when I change the plugin code with something I think myself, like ‘edit_iw_settings’ that way I can have a ‘manual’ capibilty just for your plugin?

    Is it possible to change ‘manage_options’ without modifying the core code, but use functions.php instead?

    Kind regards,

    Willem

    #1506
    Bartosz
    Keymaster

    You’d need to add that capability first using other plugins like the one you mention – Members or User Role Editor for example. Then modify the plugin.

    But you should be aware of the fact that the code changes will be overriden during each IW update.

    #2442
    WillemSiebe
    Participant

    Hi, thanks for your answer.

    Consider this thread as a feature request then, because I’m not going to change the code ;-).

    Kind regards,

    Willem

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.