WordPress.org

Make WordPress Core

Ticket #15546: 15546.patch

File 15546.patch, 1.4 KB (added by SergeyBiryukov, 7 years ago)
  • wp-admin/includes/update.php

     
    8282}
    8383
    8484function core_update_footer( $msg = '' ) {
    85         if ( is_multisite() && !current_user_can('update_core') )
    86                 return false;
    87 
    8885        if ( !current_user_can('update_core') )
    8986                return sprintf( __( 'Version %s' ), $GLOBALS['wp_version'] );
    9087
     
    140137
    141138// Called directly from dashboard
    142139function update_right_now_message() {
    143         if ( is_multisite() && !current_user_can('update_core') )
    144                 return false;
    145 
    146         $cur = get_preferred_from_update_core();
    147 
    148140        $msg = sprintf( __('You are using <span class="b">WordPress %s</span>.'), $GLOBALS['wp_version'] );
    149141
    150         if ( isset( $cur->response ) && $cur->response == 'upgrade' && current_user_can('update_core') ) {
    151                 $msg .= " <a href='" . network_admin_url( 'update-core.php' ) . "' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>';
     142        if ( current_user_can('update_core') ) {
     143                $cur = get_preferred_from_update_core();
     144
     145                if ( isset( $cur->response ) && $cur->response == 'upgrade'  )
     146                        $msg .= " <a href='" . network_admin_url( 'update-core.php' ) . "' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>';
    152147        }
    153148
    154149        echo "<span id='wp-version-message'>$msg</span>";