Changeset 41269
- Timestamp:
- 08/19/2017 10:38:50 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/network/menu.php
r40404 r41269 13 13 $submenu['index.php'][0] = array( __( 'Home' ), 'read', 'index.php' ); 14 14 15 if ( current_user_can( 'update_core' ) ) { 16 $cap = 'update_core'; 17 } elseif ( current_user_can( 'update_plugins' ) ) { 18 $cap = 'update_plugins'; 19 } elseif ( current_user_can( 'update_themes' ) ) { 20 $cap = 'update_themes'; 21 } else { 22 $cap = 'update_languages'; 23 } 24 15 25 $update_data = wp_get_update_data(); 16 26 if ( $update_data['counts']['total'] ) { 17 $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>" ), 'update_core', 'update-core.php' );27 $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' ); 18 28 } else { 19 $submenu['index.php'][10] = array( __( 'Updates' ), 'update_core', 'update-core.php' );29 $submenu['index.php'][10] = array( __( 'Updates' ), $cap, 'update-core.php' ); 20 30 } 31 32 unset( $cap ); 21 33 22 34 $submenu['index.php'][15] = array( __( 'Upgrade Network' ), 'upgrade_network', 'upgrade.php' );
Note: See TracChangeset
for help on using the changeset viewer.