~canonical-sysadmins/wordpress/4.9.4

« back to all changes in this revision

Viewing changes to wp-admin/menu.php

  • Committer: Barry Price
  • Date: 2017-11-17 04:49:02 UTC
  • mfrom: (1.1.30 upstream)
  • Revision ID: barry.price@canonical.com-20171117044902-5frux4ycbq6g9fyf
Merge WP4.9 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
}
34
34
 
35
35
if ( ! is_multisite() ) {
36
 
        if ( current_user_can( 'update_core' ) )
 
36
        if ( current_user_can( 'update_core' ) ) {
37
37
                $cap = 'update_core';
38
 
        elseif ( current_user_can( 'update_plugins' ) )
 
38
        } elseif ( current_user_can( 'update_plugins' ) ) {
39
39
                $cap = 'update_plugins';
40
 
        else
 
40
        } elseif ( current_user_can( 'update_themes' ) ) {
41
41
                $cap = 'update_themes';
 
42
        } else {
 
43
                $cap = 'update_languages';
 
44
        }
42
45
        $submenu[ 'index.php' ][10] = array( sprintf( __('Updates %s'), "<span class='update-plugins count-{$update_data['counts']['total']}'><span class='update-count'>" . number_format_i18n($update_data['counts']['total']) . "</span></span>" ), $cap, 'update-core.php');
43
46
        unset( $cap );
44
47
}