[wp-trac] [WordPress Trac] #39677: Introduce capabilities for managing translations
WordPress Trac
noreply at wordpress.org
Tue Jan 24 14:29:10 UTC 2017
#39677: Introduce capabilities for managing translations
-----------------------------+-----------------------------
Reporter: flixos90 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Role/Capability | Version:
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
We currently have capabilities for managing core updates, plugin
installation/updates and theme installation/updates. However we lack
capabilities for managing translation installation/updates, so let's add
them. This is especially critical as it's currently not possible to allow
a user to only install/update translations while not allowing them to
install/update anything else.
I suggest introducing `install_translations` and `update_translations`. I
think they should be added as primitive caps to the `administrator` role
(would need to happen in WP version update function), just how the other
above caps work. We would then also need to add them to `map_meta_cap()`,
where it could currently go into the same group as the other caps I
mentioned above. However, let's also have an eye on #38673, as the changes
on that ticket might require us to handle the `map_meta_cap()` stuff
differently.
About usage of these capabilities, there are several areas in core where
they could be used:
* `wp-admin/options.php` line 185
* `wp-admin/options-general.php` line 147
* `wp-admin/network/settings.php` line 66 and 345
* `wp-admin/network/site-new.php` line 68 and 236
* `wp-admin/update-core.php` line 617 and 732
Regarding `wp_can_install_language_pack()`, I think the `current_user_can(
'install_translations' )` check should not go into that function as that
function is also used during setup where it should be accessible to
anyone.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39677>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list