Make WordPress Core


Ignore:
Timestamp:
12/16/2010 06:12:55 AM (16 years ago)
Author:
nacin
Message:

Use maybe_network_admin_url. see #15840.

File:
1 edited

Legend:

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

    r16747 r16978  
    9999                $cur->response = '';
    100100
    101         $href = is_multisite() ? network_admin_url( 'update-core.php' ) : admin_url( 'update-core.php' );
    102 
    103101        switch ( $cur->response ) {
    104102        case 'development' :
    105                 return sprintf( __( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ), $GLOBALS['wp_version'], $href );
     103                return sprintf( __( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ), $GLOBALS['wp_version'], maybe_network_admin_url( 'update-core.php' ) );
    106104        break;
    107105
    108106        case 'upgrade' :
    109                 return sprintf( '<strong>'.__( '<a href="%1$s">Get Version %2$s</a>' ).'</strong>', $href, $cur->current);
     107                return sprintf( '<strong>'.__( '<a href="%1$s">Get Version %2$s</a>' ).'</strong>', maybe_network_admin_url( 'update-core.php' ), $cur->current);
    110108        break;
    111109
    … …  
    133131
    134132        if ( current_user_can('update_core') ) {
    135                 $href = is_multisite() ? network_admin_url( 'update-core.php' ) : admin_url( 'update-core.php' );
    136                 $msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! <a href="%2$s">Please update now</a>.'), $cur->current, $href );
     133                $msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! <a href="%2$s">Please update now</a>.'), $cur->current, maybe_network_admin_url( 'update-core.php' ) );
    137134        } else {
    138135                $msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! Please notify the site administrator.'), $cur->current );
    … …  
    152149
    153150        if ( isset( $cur->response ) && $cur->response == 'upgrade' && current_user_can('update_core') ) {
    154                 $href = is_multisite() ? network_admin_url( 'update-core.php' ) : admin_url( 'update-core.php' );
    155                 $msg .= " <a href='" . $href . "' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>';
     151                $msg .= " <a href='" . maybe_network_admin_url( 'update-core.php' ) . "' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>';
    156152        }
    157153
Note: See TracChangeset for help on using the changeset viewer.