• Resolved dannyogolo

    (@dannyogolo)


    Any clue why the generate image option doesnt display for editor? I havent tested with other roles though, but it shows for Admin

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Alexandre Gaboriau

    (@mcurly)

    Hi, yes by default capability “mpt_manage” is for admin, but you can easily change with this code for example:

    function change_rights_mpt_plugin() {
    $role = get_role( 'editor' );
    $role->add_cap( 'mpt_manage', true );
    }
    
    add_action( 'init', 'change_rights_mpt_plugin', 11 );

    You can also use a plugin like “User Role Editor” if you don’t want to add this code.

    Regards.

    Thread Starter dannyogolo

    (@dannyogolo)

    Is there no way that admin and editor can have the capability?

    Also I suggest you add this in the plugin settings – so that admin can set who has capability to generate images

    Plugin Author Alexandre Gaboriau

    (@mcurly)

    Yes I guess I could add it as a future update,I add it to my todo list.

    Note:I edited the code previously published (I replaced remove_cap() by add_cap()).

    Thread Starter dannyogolo

    (@dannyogolo)

    My Bad. I forgot to ask, Where to add this code?

    Plugin Author Alexandre Gaboriau

    (@mcurly)

    you can add it to your theme’s functions.php file for example.

    Thread Starter dannyogolo

    (@dannyogolo)

    I added it, but it didnt work

    Thread Starter dannyogolo

    (@dannyogolo)

    UPDAE:

    I worked. Had to restart

    thanks

    Thread Starter dannyogolo

    (@dannyogolo)

    I have been using this method successfully, but there is this website with Astra theme where the the MPT doesnt show up for Editor role. Could there be any special reason?

    Plugin Author Alexandre Gaboriau

    (@mcurly)

    I dont think so. This shouldn’t change anything.
    Unless your theme uses role functionality.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Generate image option not showing for Editor role’ is closed to new replies.