]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/network/site-themes.php
WordPress 4.3-scripts
[autoinstalls/wordpress.git] / wp-admin / network / site-themes.php
index 384f58c64efcdeb63b8e6478eb5187ae3228075f..5209988fb31dc843435d68246861a37132661460 100644 (file)
@@ -56,6 +56,10 @@ if ( ! $id )
 $wp_list_table->prepare_items();
 
 $details = get_blog_details( $id );
+if ( ! $details ) {
+       wp_die( __( 'The requested site does not exist.' ) );
+}
+
 if ( !can_edit_network( $details->site_id ) )
        wp_die( __( 'You do not have permission to access this page.' ), 403 );
 
@@ -129,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';
@@ -139,7 +141,8 @@ $submenu_file = 'sites.php';
 require( ABSPATH . 'wp-admin/admin-header.php' ); ?>
 
 <div class="wrap">
-<h2 id="edit-site"><?php echo $title_site_url_linked ?></h2>
+<h1 id="edit-site"><?php echo $title; ?></h1>
+<p class="edit-site-actions"><a href="<?php echo esc_url( get_home_url( $id, '/' ) ); ?>"><?php _e( 'Visit' ); ?></a> | <a href="<?php echo esc_url( get_admin_url( $id ) ); ?>"><?php _e( 'Dashboard' ); ?></a></p>
 <h3 class="nav-tab-wrapper">
 <?php
 $tabs = array(