Changeset 16747 for trunk/wp-admin/includes/update.php
- Timestamp:
- 12/06/2010 03:41:19 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/update.php
r16696 r16747 99 99 $cur->response = ''; 100 100 101 $href = is_multisite() ? network_admin_url( 'update-core.php' ) : admin_url( 'update-core.php' ); 102 101 103 switch ( $cur->response ) { 102 104 case 'development' : 103 return sprintf( __( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ), $GLOBALS['wp_version'], 'update-core.php');105 return sprintf( __( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ), $GLOBALS['wp_version'], $href ); 104 106 break; 105 107 106 108 case 'upgrade' : 107 return sprintf( '<strong>'.__( '<a href="%1$s">Get Version %2$s</a>' ).'</strong>', 'update-core.php', $cur->current);109 return sprintf( '<strong>'.__( '<a href="%1$s">Get Version %2$s</a>' ).'</strong>', $href, $cur->current); 108 110 break; 109 111 … … 130 132 return false; 131 133 132 if ( current_user_can('update_core') ) 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, 'update-core.php' ); 134 else 134 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 ); 137 } else { 135 138 $msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! Please notify the site administrator.'), $cur->current ); 136 139 } 137 140 echo "<div class='update-nag'>$msg</div>"; 138 141 } … … 147 150 148 151 $msg = sprintf( __('You are using <span class="b">WordPress %s</span>.'), $GLOBALS['wp_version'] ); 149 if ( isset( $cur->response ) && $cur->response == 'upgrade' && current_user_can('update_core') ) 150 $msg .= " <a href='update-core.php' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>'; 152 153 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>'; 156 } 151 157 152 158 echo "<span id='wp-version-message'>$msg</span>";
Note: See TracChangeset
for help on using the changeset viewer.