Network Admin: Improved header information in Edit Site tabs.

* Use the site's name rather than URL in the Edit Site header.
* Provide "Visit" and "Dashboard" links for the site on all tabs.

Props @Fab1en, @jeremyfelt.
Fixes #32525.

Built from https://develop.svn.wordpress.org/trunk@33186


git-svn-id: http://core.svn.wordpress.org/trunk@33158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Jeremy Felt 2015-07-13 00:27:24 +00:00
parent 562f49d683
commit a5f6dd3ea1
9 changed files with 25 additions and 19 deletions

View File

@ -3037,6 +3037,11 @@ img {
border-bottom: 1px solid #dfdfdf;
}
/* Edit Site */
.network-admin .edit-site-actions {
margin-top: 0;
}
/* My Sites */
.my-sites {
display: block;

View File

@ -3037,6 +3037,11 @@ img {
border-bottom: 1px solid #dfdfdf;
}
/* Edit Site */
.network-admin .edit-site-actions {
margin-top: 0;
}
/* My Sites */
.my-sites {
display: block;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -129,9 +129,7 @@ if ( isset( $_GET['update'] ) ) {
}
}
$site_url_no_http = preg_replace( '#^http(s)?://#', '', get_blogaddress_by_id( $id ) );
$title_site_url_linked = sprintf( __( 'Edit Site: %s' ), '<a href="' . get_blogaddress_by_id( $id ) . '">' . $site_url_no_http . '</a>' );
$title = sprintf( __( 'Edit Site: %s' ), $site_url_no_http );
$title = sprintf( __( 'Edit Site: %s' ), esc_html( $details->blogname ) );
$parent_file = 'sites.php';
$submenu_file = 'sites.php';
@ -141,7 +139,8 @@ require( ABSPATH . 'wp-admin/admin-header.php' );
?>
<div class="wrap">
<h1 id="edit-site"><?php echo $title_site_url_linked; ?></h1>
<h1 id="edit-site"><?php echo $title; ?></h1>
<p class="edit-site-actions"><a href="<?php echo esc_url( get_home_url( $id ) ); ?>">Visit</a> | <a href="<?php echo esc_url( get_admin_url( $id ) ); ?>">Dashboard</a></p>
<h3 class="nav-tab-wrapper">
<?php
$tabs = array(

View File

@ -79,9 +79,7 @@ if ( isset($_GET['update']) ) {
$messages[] = __('Site options updated.');
}
$site_url_no_http = preg_replace( '#^http(s)?://#', '', get_blogaddress_by_id( $id ) );
$title_site_url_linked = sprintf( __( 'Edit Site: %s' ), '<a href="' . get_blogaddress_by_id( $id ) . '">' . $site_url_no_http . '</a>' );
$title = sprintf( __( 'Edit Site: %s' ), $site_url_no_http );
$title = sprintf( __( 'Edit Site: %s' ), esc_html( $details->blogname ) );
$parent_file = 'sites.php';
$submenu_file = 'sites.php';
@ -91,7 +89,8 @@ require( ABSPATH . 'wp-admin/admin-header.php' );
?>
<div class="wrap">
<h1 id="edit-site"><?php echo $title_site_url_linked; ?></h1>
<h1 id="edit-site"><?php echo $title; ?></h1>
<p class="edit-site-actions"><a href="<?php echo esc_url( get_home_url( $id ) ); ?>">Visit</a> | <a href="<?php echo esc_url( get_admin_url( $id ) ); ?>">Dashboard</a></p>
<h3 class="nav-tab-wrapper">
<?php
$tabs = array(

View File

@ -133,9 +133,7 @@ if ( isset( $_GET['action'] ) && 'update-site' == $_GET['action'] ) {
add_thickbox();
add_screen_option( 'per_page' );
$site_url_no_http = preg_replace( '#^http(s)?://#', '', get_blogaddress_by_id( $id ) );
$title_site_url_linked = sprintf( __( 'Edit Site: %s' ), '<a href="' . get_blogaddress_by_id( $id ) . '">' . $site_url_no_http . '</a>' );
$title = sprintf( __( 'Edit Site: %s' ), $site_url_no_http );
$title = sprintf( __( 'Edit Site: %s' ), esc_html( $details->blogname ) );
$parent_file = 'sites.php';
$submenu_file = 'sites.php';
@ -143,7 +141,8 @@ $submenu_file = 'sites.php';
require( ABSPATH . 'wp-admin/admin-header.php' ); ?>
<div class="wrap">
<h1 id="edit-site"><?php echo $title_site_url_linked; ?></h1>
<h1 id="edit-site"><?php echo $title; ?></h1>
<p class="edit-site-actions"><a href="<?php echo esc_url( get_home_url( $id ) ); ?>">Visit</a> | <a href="<?php echo esc_url( get_admin_url( $id ) ); ?>">Dashboard</a></p>
<h3 class="nav-tab-wrapper">
<?php
$tabs = array(

View File

@ -161,9 +161,7 @@ if ( isset( $_GET['action'] ) && 'update-site' == $_GET['action'] ) {
add_screen_option( 'per_page' );
$site_url_no_http = preg_replace( '#^http(s)?://#', '', get_blogaddress_by_id( $id ) );
$title_site_url_linked = sprintf( __( 'Edit Site: %s' ), '<a href="' . get_blogaddress_by_id( $id ) . '">' . $site_url_no_http . '</a>' );
$title = sprintf( __( 'Edit Site: %s' ), $site_url_no_http );
$title = sprintf( __( 'Edit Site: %s' ), esc_html( $details->blogname ) );
$parent_file = 'sites.php';
$submenu_file = 'sites.php';
@ -186,7 +184,8 @@ var current_site_id = <?php echo $id; ?>;
<div class="wrap">
<h1 id="edit-site"><?php echo $title_site_url_linked; ?></h1>
<h1 id="edit-site"><?php echo $title; ?></h1>
<p class="edit-site-actions"><a href="<?php echo esc_url( get_home_url( $id ) ); ?>">Visit</a> | <a href="<?php echo esc_url( get_admin_url( $id ) ); ?>">Dashboard</a></p>
<h3 class="nav-tab-wrapper">
<?php
$tabs = array(

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-beta2-33185';
$wp_version = '4.3-beta2-33186';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.