[wp-trac] [WordPress Trac] #42697: Regression - Missing Languages update section

WordPress Trac noreply at wordpress.org
Tue Dec 5 16:44:38 UTC 2017


#42697: Regression - Missing Languages update section
-----------------------------+-----------------------
 Reporter:  selven99         |       Owner:  flixos90
     Type:  defect (bug)     |      Status:  assigned
 Priority:  normal           |   Milestone:  4.9.2
Component:  Role/Capability  |     Version:  4.9
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:
-----------------------------+-----------------------
Changes (by flixos90):

 * keywords:   => has-patch
 * component:  Upgrade/Install => Role/Capability


Comment:

 Thanks @selven99 for the ticket and also suggestion to fix. I applied it
 in [attachment:42697.diff], including related adjustments:

 * By using `wp_is_file_mod_allowed()`, we make the capability check for
 `install_languages` less restrictive. It was indeed wrong before, as a
 user should still be able to have the capability, even when language packs
 cannot be automatically installed. The automatic installation part is
 separate from that now.
 * Another benefit from that change is that we don't need to load the
 related admin files on the fly in the frontend.
 * The "downside" is that of several conditionals now need to check for
 both the capability and whether language packs can be installed without
 asking for credentials. However, I'd only consider this a downside because
 of more code. The two checks actually need to be separate things, for the
 above reasons.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42697#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list