WordPress.org

Make WordPress Core

Changeset 18843


Ignore:
Timestamp:
09/30/2011 05:31:52 PM (7 years ago)
Author:
markjaquith
Message:

More consistent right-now/footer messages related to version and upgrades in multisite. propx SergeyBiryukov. fixes #15545

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/update.php

    r18632 r18843  
    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'] );
     
    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
Note: See TracChangeset for help on using the changeset viewer.