Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Bojan Radonic – WPMU DEV Support

    (@wpmudev-support4)

    Hey Douglas64,

    How are you doing today?

    This is default behavior of the plugin, only user with administrator role has access to PopUp in the admin. If you want editor to have access to popup you can do that with some custom code.

    Please try adding the following in functions.php in the theme, if you think your theme won’t be changed. Otherwise mu-plugins is the best solution. To use mu-plugins, go to /wp-content/ and find the folder with name ‘mu-plugins’. If there is no folder in that name, then create a folder, name it ‘mu-plugins’, create a file inside that, give any name you like and paste the code in there. You don’t need to activate that plugin. Mu-plugins means must use plugins, so it will be activated automatically always. If you use mu-plugins then add a php start tag at the beginning of the code.

    add_filter( 'popover-admin-access-capability', 'pop_custom_cap', 99, 1 );
    function pop_custom_cap( $cap ){
        return 'edit_posts';
    }

    This will allow editor to use popup in the admin.

    Cheers,
    Bojan

    Thread Starter Douglas64

    (@douglas64)

    It worked, thank you! .

    Just wanted to understand, where u found the name ‘popover-admin-access-capability’, u knew solve? Did you know that other plugin? I did not understand this first parameter of the function “add_filter ().” It is to explain ?

    Plugin Author Bojan Radonic – WPMU DEV Support

    (@wpmudev-support4)

    Hey Douglas64,

    In this specific case I already knew the answer as this was asked couple of times on WPMU DEV forum which is were we do support for premium version of our plugins for WPMU DEV members.

    Usually these kind of permissions are added to plugins and in our case, which is also what is being used in most of the plugins, is “manage_options” which is administrator capability. So the plugin checks for this and then determines whether settings will be displayed in admin panel or not. You can find more information about user capabilities here.

    The screenshot is from /inc/class-popup-posttype.php https://screencast.com/t/8PamDb1dOd. As you can see our developer added a filter there allowing us to manipulate with this without having to edit plugin core files, which is great meaning these changes will be safe once you update the plugin.

    I just used that filter to create another function that will return different value so instead of “manage_options” we’re using “edit_posts” which is Editor role capability allowing users with editor role to see the settings.

    You can find more information about the filters here and the use of add filter specifically here.

    Hope this helps and have a great weekend ??

    Cheers,
    Bojan

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Plugin does not appear in wordpress menu options when the user is of the "Editor’ is closed to new replies.