WordPress.org

Make WordPress Core

Ticket #18629: add-svn.diff

File add-svn.diff, 2.6 KB (added by Ipstenu, 3 years ago)

Adding SVN to 'Right Now' and Footer.

  • wp-includes/version.php

     
    4040 * @global string $required_mysql_version 
    4141 */ 
    4242$required_mysql_version = '5.0'; 
     43 
     44/** 
     45 * Generates the string for SVN version, if appropriate 
     46 * 
     47 * @global string $wp_svn_version 
     48 */ 
     49if ( $svn = File( '.svn/entries' ) ) 
     50       $wp_svn_version = ' SVN Revision: ' . $svn[3]; 
     51else 
     52       $wp_svn_version = ''; 
  • wp-admin/includes/update.php

     
    8686               return false; 
    8787 
    8888       if ( !current_user_can('update_core') ) 
    89                return sprintf( __( 'Version %s' ), $GLOBALS['wp_version'] ); 
     89               return sprintf( __( 'Version %1$s%2$s' ), $GLOBALS['wp_version'], $GLOBALS['wp_svn_version'] ); 
    9090 
    9191       $cur = get_preferred_from_update_core(); 
    9292       if ( ! isset( $cur->current ) ) 
     
    100100 
    101101       switch ( $cur->response ) { 
    102102       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%2$s). Cool! Please <a href="%3$s">stay updated</a>.' ), $GLOBALS['wp_version'], $GLOBALS['wp_svn_version'], network_admin_url( 'update-core.php' ) ); 
    104104       break; 
    105105 
    106106       case 'upgrade' : 
     
    109109 
    110110       case 'latest' : 
    111111       default : 
    112                return sprintf( __( 'Version %s' ), $GLOBALS['wp_version'] ); 
     112               return sprintf( __( 'Version %1$s%2$s' ), $GLOBALS['wp_version'], $GLOBALS['wp_svn_version'] ); 
    113113       break; 
    114114       } 
    115115} 
     
    145145 
    146146       $cur = get_preferred_from_update_core(); 
    147147 
    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 %1$s%2$s</span>.'), $GLOBALS['wp_version'], $GLOBALS['wp_svn_version'] ); 
    149149 
    150150       if ( isset( $cur->response ) && $cur->response == 'upgrade' && current_user_can('update_core') ) { 
    151151               $msg .= " <a href='" . network_admin_url( 'update-core.php' ) . "' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>';