WordPress.org

Make WordPress Core

Ticket #19762: 19762.diff

File 19762.diff, 10.4 KB (added by nacin, 2 years ago)
  • wp-includes/admin-bar.php

     
    7575        $wp_admin_bar->add_menu( array( 
    7676                'id'    => 'wp-logo', 
    7777                'title' => '<span class="ab-icon"></span>', 
    78                 'href'  => admin_url( 'about.php' ), 
     78                'href'  => is_network_admin() ? network_admin_url( 'about.php' ) : admin_url( 'about.php' ), 
    7979                'meta'  => array( 
    8080                        'title' => __('About WordPress'), 
    8181                ), 
     
    8787                        'parent' => 'wp-logo', 
    8888                        'id'     => 'about', 
    8989                        'title'  => __('About WordPress'), 
    90                         'href'   => admin_url('about.php'), 
     90                        'href'  => is_network_admin() ? network_admin_url( 'about.php' ) : admin_url( 'about.php' ), 
    9191                ) ); 
    9292        } 
    9393 
  • wp-admin/includes/update-core.php

     
    601601/** 
    602602 * Redirect to the About WordPress page after a successful upgrade. 
    603603 * 
    604  * This function is only needed when the existing install is older than 3.3.0. 
     604 * This function is only needed when the existing install is older than 3.3.0 (3.4.0 for multisite). 
    605605 * 
    606606 * @since 3.3.0 
    607607 * 
     
    609609function _redirect_to_about_wordpress( $new_version ) { 
    610610        global $wp_version, $pagenow, $action; 
    611611 
    612         if ( version_compare( $wp_version, '3.3', '>=' ) ) 
     612        if ( is_multisite() ) { 
     613                // Change to self_admin_url(). 
     614                if ( version_compare( $wp_version, '3.4-alpha', '>=' ) ) 
     615                        return; 
     616        } elseif ( version_compare( $wp_version, '3.3', '>=' ) ) { 
    613617                return; 
     618        } 
    614619 
    615620        // Ensure we only run this on the update-core.php page. wp_update_core() could be called in other contexts. 
    616621        if ( 'update-core.php' != $pagenow ) 
     
    624629 
    625630        // See do_core_upgrade() 
    626631        show_message( __('WordPress updated successfully') ); 
    627         show_message( '<span class="hide-if-no-js">' . sprintf( __( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click <a href="%s">here</a>.' ), $new_version, esc_url( admin_url( 'about.php?updated' ) ) ) . '</span>' ); 
    628         show_message( '<span class="hide-if-js">' . sprintf( __( 'Welcome to WordPress %1$s. <a href="%2$s">Learn more</a>.' ), $new_version, esc_url( admin_url( 'about.php?updated' ) ) ) . '</span>' ); 
     632        show_message( '<span class="hide-if-no-js">' . sprintf( __( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click <a href="%s">here</a>.' ), $new_version, esc_url( self_admin_url( 'about.php?updated' ) ) ) . '</span>' ); 
     633        show_message( '<span class="hide-if-js">' . sprintf( __( 'Welcome to WordPress %1$s. <a href="%2$s">Learn more</a>.' ), $new_version, esc_url( self_admin_url( 'about.php?updated' ) ) ) . '</span>' ); 
    629634        echo '</div>'; 
    630635        ?> 
    631636<script type="text/javascript"> 
    632 window.location = '<?php echo admin_url( 'about.php?updated' ); ?>'; 
     637window.location = '<?php echo self_admin_url( 'about.php?updated' ); ?>'; 
    633638</script> 
    634639        <?php 
    635640 
  • wp-admin/freedoms.php

     
    1313 
    1414list( $display_version ) = explode( '-', $wp_version ); 
    1515 
    16 include( './admin-header.php' ); 
     16include( ABSPATH . 'wp-admin/admin-header.php' ); 
    1717?> 
    1818<div class="wrap about-wrap"> 
    1919 
     
    5454<p><?php _e( 'Don&#8217;t you wish all software came with these freedoms? So do we! For more information, check out the <a href="http://www.fsf.org/">Free Software Foundation</a>.' ); ?></p> 
    5555 
    5656</div> 
    57 <?php include( './admin-footer.php' ); ?> 
     57<?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?> 
  • wp-admin/credits.php

     
    4444 
    4545list( $display_version ) = explode( '-', $wp_version ); 
    4646 
    47 include( './admin-header.php' ); 
     47include( ABSPATH . 'wp-admin/admin-header.php' ); 
    4848?> 
    4949<div class="wrap about-wrap"> 
    5050 
     
    7373                'http://wordpress.org/about/', 
    7474                /* translators: Url to the codex documentation on contributing to WordPress used on the credits page */ 
    7575                __( 'http://codex.wordpress.org/Contributing_to_WordPress' ) ) . '</p>'; 
    76         include( './admin-footer.php' ); 
     76        include( ABSPATH . 'wp-admin/admin-footer.php' ); 
    7777        exit; 
    7878} 
    7979 
     
    134134</div> 
    135135<?php 
    136136 
    137 include( './admin-footer.php' ); 
     137include( ABSPATH . 'wp-admin/admin-footer.php' ); 
    138138 
    139139return; 
    140140 
  • wp-admin/update-core.php

     
    180180                echo '<p>' . __( 'While your site is being updated, it will be in maintenance mode. As soon as your updates are complete, your site will return to normal.' ) . '</p>'; 
    181181        } else { 
    182182                list( $normalized_version ) = explode( '-', $wp_version ); 
    183                 echo '<p>' . sprintf( __( '<a href="%s">Learn more about WordPress %s</a>.' ), esc_url( admin_url( 'about.php' ) ), $normalized_version ) . '</p>'; 
     183                echo '<p>' . sprintf( __( '<a href="%s">Learn more about WordPress %s</a>.' ), esc_url( self_admin_url( 'about.php' ) ), $normalized_version ) . '</p>'; 
    184184        } 
    185185        dismissed_updates(); 
    186186 
     
    382382        } 
    383383 
    384384        show_message( __('WordPress updated successfully') ); 
    385         show_message( '<span class="hide-if-no-js">' . sprintf( __( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click <a href="%s">here</a>.' ), $result, esc_url( admin_url( 'about.php?updated' ) ) ) . '</span>' ); 
    386         show_message( '<span class="hide-if-js">' . sprintf( __( 'Welcome to WordPress %1$s. <a href="%2$s">Learn more</a>.' ), $result, esc_url( admin_url( 'about.php?updated' ) ) ) . '</span>' ); 
     385        show_message( '<span class="hide-if-no-js">' . sprintf( __( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click <a href="%s">here</a>.' ), $result, esc_url( self_admin_url( 'about.php?updated' ) ) ) . '</span>' ); 
     386        show_message( '<span class="hide-if-js">' . sprintf( __( 'Welcome to WordPress %1$s. <a href="%2$s">Learn more</a>.' ), $result, esc_url( self_admin_url( 'about.php?updated' ) ) ) . '</span>' ); 
    387387        ?> 
    388388        </div> 
    389389        <script type="text/javascript"> 
    390         window.location = '<?php echo admin_url( 'about.php?upgraded' ); ?>'; 
     390        window.location = '<?php echo self_admin_url( 'about.php?upgraded' ); ?>'; 
    391391        </script> 
    392392        <?php 
    393393} 
  • wp-admin/about.php

     
    1313 
    1414list( $display_version ) = explode( '-', $wp_version ); 
    1515 
    16 include( './admin-header.php' ); 
     16include( ABSPATH . 'wp-admin/admin-header.php' ); 
    1717?> 
    1818<div class="wrap about-wrap"> 
    1919 
     
    3838 
    3939        <div class="feature-section images-stagger-right"> 
    4040                <div class="feature-images"> 
    41                         <img src="images/screenshots/media-icon.png" width="200" class="angled-right" /> 
    42                         <img src="images/screenshots/drag-and-drop.png" width="200" class="angled-left" /> 
     41                        <img src="<?php echo admin_url( 'images/screenshots/media-icon.png' ); ?>" width="200" class="angled-right" /> 
     42                        <img src="<?php echo admin_url( 'images/screenshots/drag-and-drop.png' ); ?>" width="200" class="angled-left" /> 
    4343                </div> 
    4444                <div class="left-feature"> 
    4545                        <h4><?php _e( 'File Type Detection' ); ?></h4> 
     
    6969 
    7070        <div class="feature-section screenshot-features"> 
    7171                <div class="angled-left"> 
    72                         <img src="images/screenshots/admin-flyouts.png" /> 
     72                        <img src="<?php echo admin_url( 'images/screenshots/admin-flyouts.png' ); ?>" /> 
    7373                        <h4><?php _e( 'Responsive Design' ); ?></h4> 
    7474                        <p><?php _e( 'Certain dashboard screens have been updated to look better at various sizes, including improved iPad/tablet support.' ); ?></p> 
    7575                </div> 
    7676                <div class="angled-right"> 
    77                         <img src="images/screenshots/help-screen.png" /> 
     77                        <img src="<?php echo admin_url( 'images/screenshots/help-screen.png' ); ?>" /> 
    7878                        <h4><?php _e( 'Help Tabs' ); ?></h4> 
    7979                        <p><?php _e( 'The Help tabs located in the upper corner of the dashboard screens below your name have gotten a facelift. Help content is broken into smaller sections for easier access, with links to relevant documentation and the support forums always visible.' ); ?></p> 
    8080                </div> 
     
    8686 
    8787        <div class="feature-section images-stagger-right"> 
    8888                <div class="feature-images"> 
    89                         <img src="images/screenshots/new-feature-pointer.png" class="angled-right" /> 
    90                         <img src="images/screenshots/welcome-screen.png" class="angled-left" /> 
     89                        <img src="<?php echo admin_url( 'images/screenshots/new-feature-pointer.png' ); ?>" class="angled-right" /> 
     90                        <img src="<?php echo admin_url( 'images/screenshots/welcome-screen.png' ); ?>" class="angled-left" /> 
    9191                </div> 
    9292                <div class="left-feature"> 
    9393                        <h4><?php _e( 'New Feature Pointers' ); ?></h4> 
     
    109109        <div class="feature-section three-col"> 
    110110                <div> 
    111111                        <h4><?php _e( 'Better Co-Editing' ); ?></h4> 
    112                         <img src="images/screenshots/coediting.png" class="element-screenshot" /> 
     112                        <img src="<?php echo admin_url( 'images/screenshots/coediting.png' ); ?>" class="element-screenshot" /> 
    113113                        <p><?php _e( 'Have you ever gone to edit a post after someone else has finished with it, only to get an alert that tells you the other person is still editing the post? From now on, you&#8217;ll only get that alert if another person is still on the editing screen &mdash; no more time lag.' ); ?></p> 
    114114                </div> 
    115115                <div> 
     
    161161 
    162162<div class="return-to-dashboard"> 
    163163        <?php if ( current_user_can( 'update_core' ) && isset( $_GET['updated'] ) ) : ?> 
    164         <a href="<?php echo esc_url( network_admin_url( 'update-core.php' ) ); ?>"><?php 
     164        <a href="<?php echo esc_url( self_admin_url( 'update-core.php' ) ); ?>"><?php 
    165165                is_multisite() ? _e( 'Return to Updates' ) : _e( 'Return to Dashboard &rarr; Updates' ); 
    166166        ?></a> | 
    167167        <?php endif; ?> 
    168         <a href="<?php echo esc_url( admin_url() ); ?>"><?php _e( 'Go to Dashboard &rarr; Home' ); ?></a> 
     168        <a href="<?php echo esc_url( self_admin_url() ); ?>"><?php 
     169                is_network_admin() ? _e( 'Go to Dashboard' ) : _e( 'Go to Dashboard &rarr; Home' ); ?></a> 
    169170</div> 
    170171 
    171172</div> 
    172173<?php 
    173174 
    174 include( './admin-footer.php' ); 
     175include( ABSPATH . 'wp-admin/admin-footer.php' ); 
    175176 
    176177// These are strings we may use to describe maintenance/security releases, where we aim for no new strings. 
    177178return;