Loco Translate
[resolved] Enable Loco Plugin for Editors (or other user roles) (5 posts)

  1. jun9e
    Posted 1 year ago #

    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 :)


  2. timwhitlock
    Plugin Author

    Posted 1 year ago #

    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:

  3. jun9e
    Posted 1 year ago #

    thank you.
    works fine temporarly.

  4. wube
    Posted 11 months ago #

    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');
  5. timwhitlock
    Plugin Author

    Posted 11 months ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Loco Translate
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic