Make WordPress Core

Changeset 19699


Ignore:
Timestamp:
01/06/2012 05:53:41 PM (13 years ago)
Author:
nacin
Message:

Create a network/about.php page and leverage it, to prevent the dashboard from switching to the blog admin. fixes #19762.

Location:
trunk
Files:
3 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/about.php

    r19663 r19699  
    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">
     
    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">
     
    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>
     
    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">
     
    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>
     
    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
     
    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.
  • trunk/wp-admin/credits.php

    r19571 r19699  
    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">
     
    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}
     
    135135<?php
    136136
    137 include( './admin-footer.php' );
     137include( ABSPATH . 'wp-admin/admin-footer.php' );
    138138
    139139return;
  • trunk/wp-admin/freedoms.php

    r19536 r19699  
    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">
     
    5555
    5656</div>
    57 <?php include( './admin-footer.php' ); ?>
     57<?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>
  • trunk/wp-admin/includes/update-core.php

    r19596 r19699  
    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
     
    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.
     
    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
  • trunk/wp-admin/update-core.php

    r19684 r19699  
    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();
     
    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
  • trunk/wp-includes/admin-bar.php

    r19610 r19699  
    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'),
     
    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    }
Note: See TracChangeset for help on using the changeset viewer.