This thread is resolved. Here is a description of the problem and solution.
Problem:
We are trying to set up a user role for translators on our site that gives them the permissions to edit and translate the content, but not to access plugins and theme options.
Solution:
Just add this code to the functions.php file:
add_filter('wpml_user_can_translate', function ($user_can_translate, $user){
if (in_array('editor', (array) $user->roles, true) && current_user_can('translate')) {
return true;
}
return $user_can_translate;
}, 10, 2);
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
This topic contains 23 replies, has 2 voices.
Last updated by 3 years, 11 months ago.
Assisted by: Radu.