Ticket #18629: 18629.2.patch
| File 18629.2.patch, 2.3 KB (added by SergeyBiryukov, 21 months ago) |
|---|
-
wp-admin/includes/update.php
86 86 return false; 87 87 88 88 if ( !current_user_can('update_core') ) 89 return sprintf( __( 'Version %s' ), $GLOBALS['wp_version']);89 return sprintf( __( 'Version %s' ), get_bloginfo('version', 'display') ); 90 90 91 91 $cur = get_preferred_from_update_core(); 92 92 if ( ! isset( $cur->current ) ) … … 100 100 101 101 switch ( $cur->response ) { 102 102 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'], network_admin_url( 'update-core.php' ) );103 return sprintf( __( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ), get_bloginfo('version', 'display'), network_admin_url( 'update-core.php' ) ); 104 104 break; 105 105 106 106 case 'upgrade' : … … 109 109 110 110 case 'latest' : 111 111 default : 112 return sprintf( __( 'Version %s' ), $GLOBALS['wp_version']);112 return sprintf( __( 'Version %s' ), get_bloginfo('version', 'display') ); 113 113 break; 114 114 } 115 115 } … … 145 145 146 146 $cur = get_preferred_from_update_core(); 147 147 148 $msg = sprintf( __('You are using <span class="b">WordPress %s</span>.'), $GLOBALS['wp_version']);148 $msg = sprintf( __('You are using <span class="b">WordPress %s</span>.'), get_bloginfo('version', 'display') ); 149 149 150 150 if ( isset( $cur->response ) && $cur->response == 'upgrade' && current_user_can('update_core') ) { 151 151 $msg .= " <a href='" . network_admin_url( 'update-core.php' ) . "' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>'; … … 154 154 echo "<span id='wp-version-message'>$msg</span>"; 155 155 } 156 156 157 /** 158 * Adds SVN revision to WordPress version, if appropriate 159 */ 160 function get_svn_revision( $output, $show ) { 161 if ( 'version' == $show && is_super_admin() && file_exists( ABSPATH . '.svn/entries' ) && $svn = file( ABSPATH . '.svn/entries' ) ) 162 $output .= '-r' . trim( $svn[3] ); 163 164 return $output; 165 } 166 add_filter( 'bloginfo', 'get_svn_revision', 10, 2 ); 167 157 168 function get_plugin_updates() { 158 169 $all_plugins = get_plugins(); 159 170 $upgrade_plugins = array();
