Create a network/about.php page and leverage it, to prevent the dashboard from switching to the blog admin. fixes #19762.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
910b8a3754
commit
aa6c34ac3e
|
@ -13,7 +13,7 @@ $title = __( 'About' );
|
|||
|
||||
list( $display_version ) = explode( '-', $wp_version );
|
||||
|
||||
include( './admin-header.php' );
|
||||
include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
?>
|
||||
<div class="wrap about-wrap">
|
||||
|
||||
|
@ -38,8 +38,8 @@ include( './admin-header.php' );
|
|||
|
||||
<div class="feature-section images-stagger-right">
|
||||
<div class="feature-images">
|
||||
<img src="images/screenshots/media-icon.png" width="200" class="angled-right" />
|
||||
<img src="images/screenshots/drag-and-drop.png" width="200" class="angled-left" />
|
||||
<img src="<?php echo admin_url( 'images/screenshots/media-icon.png' ); ?>" width="200" class="angled-right" />
|
||||
<img src="<?php echo admin_url( 'images/screenshots/drag-and-drop.png' ); ?>" width="200" class="angled-left" />
|
||||
</div>
|
||||
<div class="left-feature">
|
||||
<h4><?php _e( 'File Type Detection' ); ?></h4>
|
||||
|
@ -69,12 +69,12 @@ include( './admin-header.php' );
|
|||
|
||||
<div class="feature-section screenshot-features">
|
||||
<div class="angled-left">
|
||||
<img src="images/screenshots/admin-flyouts.png" />
|
||||
<img src="<?php echo admin_url( 'images/screenshots/admin-flyouts.png' ); ?>" />
|
||||
<h4><?php _e( 'Responsive Design' ); ?></h4>
|
||||
<p><?php _e( 'Certain dashboard screens have been updated to look better at various sizes, including improved iPad/tablet support.' ); ?></p>
|
||||
</div>
|
||||
<div class="angled-right">
|
||||
<img src="images/screenshots/help-screen.png" />
|
||||
<img src="<?php echo admin_url( 'images/screenshots/help-screen.png' ); ?>" />
|
||||
<h4><?php _e( 'Help Tabs' ); ?></h4>
|
||||
<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>
|
||||
</div>
|
||||
|
@ -86,8 +86,8 @@ include( './admin-header.php' );
|
|||
|
||||
<div class="feature-section images-stagger-right">
|
||||
<div class="feature-images">
|
||||
<img src="images/screenshots/new-feature-pointer.png" class="angled-right" />
|
||||
<img src="images/screenshots/welcome-screen.png" class="angled-left" />
|
||||
<img src="<?php echo admin_url( 'images/screenshots/new-feature-pointer.png' ); ?>" class="angled-right" />
|
||||
<img src="<?php echo admin_url( 'images/screenshots/welcome-screen.png' ); ?>" class="angled-left" />
|
||||
</div>
|
||||
<div class="left-feature">
|
||||
<h4><?php _e( 'New Feature Pointers' ); ?></h4>
|
||||
|
@ -109,7 +109,7 @@ include( './admin-header.php' );
|
|||
<div class="feature-section three-col">
|
||||
<div>
|
||||
<h4><?php _e( 'Better Co-Editing' ); ?></h4>
|
||||
<img src="images/screenshots/coediting.png" class="element-screenshot" />
|
||||
<img src="<?php echo admin_url( 'images/screenshots/coediting.png' ); ?>" class="element-screenshot" />
|
||||
<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’ll only get that alert if another person is still on the editing screen — no more time lag.' ); ?></p>
|
||||
</div>
|
||||
<div>
|
||||
|
@ -161,17 +161,18 @@ include( './admin-header.php' );
|
|||
|
||||
<div class="return-to-dashboard">
|
||||
<?php if ( current_user_can( 'update_core' ) && isset( $_GET['updated'] ) ) : ?>
|
||||
<a href="<?php echo esc_url( network_admin_url( 'update-core.php' ) ); ?>"><?php
|
||||
<a href="<?php echo esc_url( self_admin_url( 'update-core.php' ) ); ?>"><?php
|
||||
is_multisite() ? _e( 'Return to Updates' ) : _e( 'Return to Dashboard → Updates' );
|
||||
?></a> |
|
||||
<?php endif; ?>
|
||||
<a href="<?php echo esc_url( admin_url() ); ?>"><?php _e( 'Go to Dashboard → Home' ); ?></a>
|
||||
<a href="<?php echo esc_url( self_admin_url() ); ?>"><?php
|
||||
is_network_admin() ? _e( 'Go to Dashboard' ) : _e( 'Go to Dashboard → Home' ); ?></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
|
||||
include( './admin-footer.php' );
|
||||
include( ABSPATH . 'wp-admin/admin-footer.php' );
|
||||
|
||||
// These are strings we may use to describe maintenance/security releases, where we aim for no new strings.
|
||||
return;
|
||||
|
|
|
@ -44,7 +44,7 @@ function _wp_credits_build_object_link( &$data ) {
|
|||
|
||||
list( $display_version ) = explode( '-', $wp_version );
|
||||
|
||||
include( './admin-header.php' );
|
||||
include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
?>
|
||||
<div class="wrap about-wrap">
|
||||
|
||||
|
@ -73,7 +73,7 @@ if ( ! $credits ) {
|
|||
'http://wordpress.org/about/',
|
||||
/* translators: Url to the codex documentation on contributing to WordPress used on the credits page */
|
||||
__( 'http://codex.wordpress.org/Contributing_to_WordPress' ) ) . '</p>';
|
||||
include( './admin-footer.php' );
|
||||
include( ABSPATH . 'wp-admin/admin-footer.php' );
|
||||
exit;
|
||||
}
|
||||
|
||||
|
@ -134,7 +134,7 @@ foreach ( $credits['groups'] as $group_slug => $group_data ) {
|
|||
</div>
|
||||
<?php
|
||||
|
||||
include( './admin-footer.php' );
|
||||
include( ABSPATH . 'wp-admin/admin-footer.php' );
|
||||
|
||||
return;
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ $title = __( 'Freedoms' );
|
|||
|
||||
list( $display_version ) = explode( '-', $wp_version );
|
||||
|
||||
include( './admin-header.php' );
|
||||
include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
?>
|
||||
<div class="wrap about-wrap">
|
||||
|
||||
|
@ -54,4 +54,4 @@ printf( __( 'Every plugin and theme in WordPress.org’s directory is 100%%
|
|||
<p><?php _e( 'Don’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>
|
||||
|
||||
</div>
|
||||
<?php include( './admin-footer.php' ); ?>
|
||||
<?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>
|
||||
|
|
|
@ -601,7 +601,7 @@ function _copy_dir($from, $to, $skip_list = array() ) {
|
|||
/**
|
||||
* Redirect to the About WordPress page after a successful upgrade.
|
||||
*
|
||||
* This function is only needed when the existing install is older than 3.3.0.
|
||||
* This function is only needed when the existing install is older than 3.3.0 (3.4.0 for multisite).
|
||||
*
|
||||
* @since 3.3.0
|
||||
*
|
||||
|
@ -609,8 +609,13 @@ function _copy_dir($from, $to, $skip_list = array() ) {
|
|||
function _redirect_to_about_wordpress( $new_version ) {
|
||||
global $wp_version, $pagenow, $action;
|
||||
|
||||
if ( version_compare( $wp_version, '3.3', '>=' ) )
|
||||
if ( is_multisite() ) {
|
||||
// Change to self_admin_url().
|
||||
if ( version_compare( $wp_version, '3.4-alpha', '>=' ) )
|
||||
return;
|
||||
} elseif ( version_compare( $wp_version, '3.3', '>=' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Ensure we only run this on the update-core.php page. wp_update_core() could be called in other contexts.
|
||||
if ( 'update-core.php' != $pagenow )
|
||||
|
@ -624,12 +629,12 @@ function _redirect_to_about_wordpress( $new_version ) {
|
|||
|
||||
// See do_core_upgrade()
|
||||
show_message( __('WordPress updated successfully') );
|
||||
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>' );
|
||||
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>' );
|
||||
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>' );
|
||||
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>' );
|
||||
echo '</div>';
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
window.location = '<?php echo admin_url( 'about.php?updated' ); ?>';
|
||||
window.location = '<?php echo self_admin_url( 'about.php?updated' ); ?>';
|
||||
</script>
|
||||
<?php
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
/**
|
||||
* Network About administration panel.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Multisite
|
||||
* @since 3.1.0
|
||||
*/
|
||||
|
||||
/** Load WordPress Administration Bootstrap */
|
||||
require_once( './admin.php' );
|
||||
|
||||
if ( ! is_multisite() )
|
||||
wp_die( __( 'Multisite support is not enabled.' ) );
|
||||
|
||||
require( '../about.php' );
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
/**
|
||||
* Network Credits administration panel.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Multisite
|
||||
* @since 3.1.0
|
||||
*/
|
||||
|
||||
/** Load WordPress Administration Bootstrap */
|
||||
require_once( './admin.php' );
|
||||
|
||||
if ( ! is_multisite() )
|
||||
wp_die( __( 'Multisite support is not enabled.' ) );
|
||||
|
||||
require( '../credits.php' );
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
/**
|
||||
* Network Freedoms administration panel.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Multisite
|
||||
* @since 3.1.0
|
||||
*/
|
||||
|
||||
/** Load WordPress Administration Bootstrap */
|
||||
require_once( './admin.php' );
|
||||
|
||||
if ( ! is_multisite() )
|
||||
wp_die( __( 'Multisite support is not enabled.' ) );
|
||||
|
||||
require( '../freedoms.php' );
|
|
@ -180,7 +180,7 @@ function core_upgrade_preamble() {
|
|||
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>';
|
||||
} else {
|
||||
list( $normalized_version ) = explode( '-', $wp_version );
|
||||
echo '<p>' . sprintf( __( '<a href="%s">Learn more about WordPress %s</a>.' ), esc_url( admin_url( 'about.php' ) ), $normalized_version ) . '</p>';
|
||||
echo '<p>' . sprintf( __( '<a href="%s">Learn more about WordPress %s</a>.' ), esc_url( self_admin_url( 'about.php' ) ), $normalized_version ) . '</p>';
|
||||
}
|
||||
dismissed_updates();
|
||||
|
||||
|
@ -382,12 +382,12 @@ function do_core_upgrade( $reinstall = false ) {
|
|||
}
|
||||
|
||||
show_message( __('WordPress updated successfully') );
|
||||
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>' );
|
||||
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>' );
|
||||
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>' );
|
||||
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>' );
|
||||
?>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
window.location = '<?php echo admin_url( 'about.php?upgraded' ); ?>';
|
||||
window.location = '<?php echo self_admin_url( 'about.php?upgraded' ); ?>';
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ function wp_admin_bar_wp_menu( $wp_admin_bar ) {
|
|||
$wp_admin_bar->add_menu( array(
|
||||
'id' => 'wp-logo',
|
||||
'title' => '<span class="ab-icon"></span>',
|
||||
'href' => admin_url( 'about.php' ),
|
||||
'href' => is_network_admin() ? network_admin_url( 'about.php' ) : admin_url( 'about.php' ),
|
||||
'meta' => array(
|
||||
'title' => __('About WordPress'),
|
||||
),
|
||||
|
@ -87,7 +87,7 @@ function wp_admin_bar_wp_menu( $wp_admin_bar ) {
|
|||
'parent' => 'wp-logo',
|
||||
'id' => 'about',
|
||||
'title' => __('About WordPress'),
|
||||
'href' => admin_url('about.php'),
|
||||
'href' => is_network_admin() ? network_admin_url( 'about.php' ) : admin_url( 'about.php' ),
|
||||
) );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue