[wp-trac] [WordPress Trac] #42697: Regression - Missing Languages update section
WordPress Trac
noreply at wordpress.org
Sat Nov 25 12:23:35 UTC 2017
#42697: Regression - Missing Languages update section
-----------------------------+-----------------------------
Reporter: selven99 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version: 4.9
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
Hello,
Since I updated my websites to Wordpress 4.9, Languages Update section
disappears in Dashboard > Updates section!
After some debug, I found the issue with the new capabilities added in
this version.
https://github.com/WordPress/WordPress/blob/4.9-branch/wp-
includes/capabilities.php#L443
Here:
{{{#!php
<?php
if ( ! wp_can_install_language_pack() ) {
$caps[] = 'do_not_allow';
} elseif ( is_multisite() && ! is_super_admin( $user_id ) ) {
$caps[] = 'do_not_allow';
} else {
$caps[] = 'install_languages';
}
}}}
The first line will check if FTP (or SFTP/SSH) details are corrects and if
wordpress can access to filesystem. But, creditentials are not provided in
this step, we can fill them only after click to "Update translations"
button (that is missing...).
So, I think this implementation is incorrect and should be:
{{{#!php
<?php
if ( ! wp_is_file_mod_allowed( 'can_install_language_pack' ) ) {
$caps[] = 'do_not_allow';
} elseif ( is_multisite() && ! is_super_admin( $user_id ) ) {
$caps[] = 'do_not_allow';
} else {
$caps[] = 'install_languages';
}
}}}
What do you think about this?
Thanks! :-)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42697>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list