When trying to edit existing translations as a custom user role, the pencil icon is greyed out and it shows this message: "You can only edit translations assigned to you"
How do you make the custom user role able to ALWAYS edit all translations, even when not assigned to them.
Please create a full backup then add the following code to your theme's functions.php file:
add_filter('wpml_user_can_translate', function ($user_can_translate, $user){
if (in_array('your_custom_role', (array) $user->roles, true) && current_user_can('translate')) {
return true;
}
return $user_can_translate;
}, 10, 2);
Please note that you need to change the your_custom_role part with your custom role name.
Let me know please if that helps.
Kind regards,
Mohamed
The topic ‘[Closed] Certain users cannot edit translations for certain content’ is closed to new replies.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.