Ticket #18629: 18629.4.patch
| File 18629.4.patch, 2.3 KB (added by SergeyBiryukov, 8 months ago) |
|---|
-
wp-admin/includes/update.php
83 83 84 84 function core_update_footer( $msg = '' ) { 85 85 if ( !current_user_can('update_core') ) 86 return sprintf( __( 'Version %s' ), $GLOBALS['wp_version']);86 return sprintf( __( 'Version %s' ), get_bloginfo( 'version', 'display' ) ); 87 87 88 88 $cur = get_preferred_from_update_core(); 89 89 if ( ! is_object( $cur ) ) … … 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 } … … 140 140 141 141 // Called directly from dashboard 142 142 function update_right_now_message() { 143 $msg = sprintf( __( 'You are using <span class="b">WordPress %s</span>.'), $GLOBALS['wp_version']);143 $msg = sprintf( __( 'You are using <span class="b">WordPress %s</span>.' ), get_bloginfo( 'version', 'display' ) ); 144 144 145 145 if ( current_user_can('update_core') ) { 146 146 $cur = get_preferred_from_update_core(); … … 152 152 echo "<span id='wp-version-message'>$msg</span>"; 153 153 } 154 154 155 /** 156 * Adds SVN revision to WordPress version, if appropriate 157 * 158 * @since 3.5.0 159 */ 160 function get_svn_revision( $output, $show ) { 161 if ( 'version' != $show || ! current_user_can( 'update_core' ) || false === strpos( $output, '-' ) ) 162 return $output; 163 164 if ( file_exists( ABSPATH . '.svn/entries' ) && $svn = file( ABSPATH . '.svn/entries' ) && isset( $svn[3] ) ) { 165 $output = preg_replace ( '/-[0-9]+$/', '', $output ); 166 $output .= '-r' . trim( $svn[3] ); 167 } 168 169 return $output; 170 } 171 add_filter( 'bloginfo', 'get_svn_revision', 10, 2 ); 172 155 173 function get_plugin_updates() { 156 174 $all_plugins = get_plugins(); 157 175 $upgrade_plugins = array();
