Role/Capability: Rename `upgrade_php` capability to more suitable `update_php`.
This brings the name in line with user-facing language and similar names of existing related capabilities. Since the capability has not been part of any WordPress release, it can be renamed without any backward-compatibility implications. Also missing props benhuberman for [43006]. Fixes #44457. Built from https://develop.svn.wordpress.org/trunk@43381 git-svn-id: http://core.svn.wordpress.org/trunk@43209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b98ef36c97
commit
e350e822f8
|
@ -37,7 +37,7 @@ function wp_dashboard_setup() {
|
|||
|
||||
// PHP Version.
|
||||
$response = wp_check_php_version();
|
||||
if ( $response && isset( $response['is_acceptable'] ) && ! $response['is_acceptable'] && current_user_can( 'upgrade_php' ) ) {
|
||||
if ( $response && isset( $response['is_acceptable'] ) && ! $response['is_acceptable'] && current_user_can( 'update_php' ) ) {
|
||||
add_filter( 'postbox_classes_dashboard_dashboard_php_nag', 'dashboard_php_nag_class' );
|
||||
wp_add_dashboard_widget( 'dashboard_php_nag', __( 'PHP Update Required' ), 'wp_dashboard_php_nag' );
|
||||
}
|
||||
|
|
|
@ -554,7 +554,7 @@ function map_meta_cap( $cap, $user_id ) {
|
|||
$caps[] = 'manage_options';
|
||||
}
|
||||
break;
|
||||
case 'upgrade_php':
|
||||
case 'update_php':
|
||||
if ( is_multisite() && ! is_super_admin( $user_id ) ) {
|
||||
$caps[] = 'do_not_allow';
|
||||
} else {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.0-alpha-43380';
|
||||
$wp_version = '5.0-alpha-43381';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue