• Resolved mwmcw

    (@mwmcw)


    At the moment the permissions to create / edit / delete contents of a modal window are only set for admins. Also the menu item on the backend is only visible for “admins”. What do I have to do to make the menu item visible for “editors” and also allow them to create / edit / delete modal windows?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Wow-Company

    (@wpcalc)

    Hello.

    You can change ‘capability’.
    Find line 109 in the file modal-window/admin/class-admin.php and change manage_options on edit_others_posts

    Your line 109 must be:
    $capability = ‘edit_others_posts’;

    Thread Starter mwmcw

    (@mwmcw)

    Thanks for your quick reply! I’ve already altered some of those capabilities. Unfortunately this is not an update-proof solution. After every update, I’ve to change those lines again. And there’s one more snippet which has to be changed.

    So in total you’d have to change the following lines:

    (1) It’s the snippet on line 109 which has to be changed to:
    $capability = 'edit_others_posts';

    (2) But also the manage_options on line 272 which has to be changed to:
    && current_user_can( 'edit_others_posts' )

    Otherwise editors wouldn’t be able to save / update their changed content.

    Maybe this would be a feature enhancement for an upcoming update, to have a checkbox or anything similar, where you could set the roles, which are able to edit/delete etc. Just as a humble suggestion. Otherwise thanks for a fantastic plugin and all the work you’ve put into this!

    • This reply was modified 4 years, 7 months ago by mwmcw.
    Plugin Author Wow-Company

    (@wpcalc)

    Thank you for feedback.
    We will think about how to implement this function in the next version of the plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to allow other roles than admin to configure modals’ is closed to new replies.