• Resolved jun9e

    (@jun9e)


    Hello,
    normally i don´t want to copy&paste the translations into the plugin, if my editors can do it on the fly.

    I would like to know how i can change the admin capability to the ‘edit pages’ capability. I can see at your @todo

    if( current_user_can(Loco::CAPABILITY) ){
                    // @todo font end functionality

    that you thought about this already.

    I´m glad for any help 🙂

    https://wordpress.org/plugins/loco-translate/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Tim W

    (@timwhitlock)

    As you can probably see, the manage_options capability is required because altering files on disk within themes and plugins is a privileged operation that I thought should be reserved for admins.

    I’ll have to add a filter for you to override this to use a lower privilege like edit_posts. I can put this on my todo list, but can’t guarantee a timeline for implementing.

    In the mean time I think your only option is top hack the plugin code. The line is here:
    https://github.com/loco/wp-loco/blob/master/lib/loco-boot.php#L12

    Thread Starter jun9e

    (@jun9e)

    thank you.
    works fine temporarly.

    wube

    (@wujek_bogdan)

    There’s no need to modify the core files. Just use filter:

    Add the following code to your functions.php

    function mytheme_change_loco_admin_capability()
    {
        return 'edit_posts';
    }
    add_filter('loco_admin_capability', 'mytheme_change_loco_admin_capability');

    Plugin Author Tim W

    (@timwhitlock)

    Yes, filter was added recently.
    Ref: https://wordpress.org/support/topic/capability-filter

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Enable Loco Plugin for Editors (or other user roles)’ is closed to new replies.