Wordpress 3.5
[autoinstalls/wordpress.git] / wp-admin / includes / class-wp-ms-sites-list-table.php
index 3d72381c7d60024d3e2afa7d8460da25c96a4032..371901a63801a8ad331106a5a0127777f60db8ce 100644 (file)
@@ -9,9 +9,10 @@
  */
 class WP_MS_Sites_List_Table extends WP_List_Table {
 
-       function __construct() {
+       function __construct( $args = array() ) {
                parent::__construct( array(
                        'plural' => 'sites',
+                       'screen' => isset( $args['screen'] ) ? $args['screen'] : null,
                ) );
        }
 
@@ -213,6 +214,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
                                switch ( $column_name ) {
                                        case 'cb': ?>
                                                <th scope="row" class="check-column">
+                                                       <label class="screen-reader-text" for="blog_<?php echo $blog['blog_id']; ?>"><?php printf( __( 'Select %s' ), $blogname ); ?></label>
                                                        <input type="checkbox" id="blog_<?php echo $blog['blog_id'] ?>" name="allblogs[]" value="<?php echo esc_attr( $blog['blog_id'] ) ?>" />
                                                </th>
                                        <?php
@@ -229,8 +231,11 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
                                                echo "<td class='column-$column_name $column_name'$style>"; ?>
                                                        <a href="<?php echo esc_url( network_admin_url( 'site-info.php?id=' . $blog['blog_id'] ) ); ?>" class="edit"><?php echo $blogname . $blog_state; ?></a>
                                                        <?php
-                                                       if ( 'list' != $mode )
-                                                               echo '<p>' . sprintf( _x( '%1$s &#8211; <em>%2$s</em>', '%1$s: site name. %2$s: site tagline.' ), get_blog_option( $blog['blog_id'], 'blogname' ), get_blog_option( $blog['blog_id'], 'blogdescription ' ) ) . '</p>';
+                                                       if ( 'list' != $mode ) {
+                                                               switch_to_blog( $blog['blog_id'] );
+                                                               echo '<p>' . sprintf( _x( '%1$s &#8211; <em>%2$s</em>', '%1$s: site name. %2$s: site tagline.' ), get_option( 'blogname' ), get_option( 'blogdescription ' ) ) . '</p>';
+                                                               restore_current_blog();
+                                                       }
 
                                                        // Preordered.
                                                        $actions = array(
@@ -264,7 +269,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
                                                                        $actions['delete']      = '<span class="delete"><a href="' . esc_url( wp_nonce_url( network_admin_url( 'sites.php?action=confirm&amp;action2=deleteblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to delete the site %s.' ), $blogname ) ) ), 'confirm') ) . '">' . __( 'Delete' ) . '</a></span>';
                                                        }
 
-                                                       $actions['visit']       = "<span class='view'><a href='" . esc_url( get_home_url( $blog['blog_id'] ) ) . "' rel='permalink'>" . __( 'Visit' ) . '</a></span>';
+                                                       $actions['visit']       = "<span class='view'><a href='" . esc_url( get_home_url( $blog['blog_id'], '/' ) ) . "' rel='permalink'>" . __( 'Visit' ) . '</a></span>';
 
                                                        $actions = apply_filters( 'manage_sites_action_links', array_filter( $actions ), $blog['blog_id'], $blogname );
                                                        echo $this->row_actions( $actions );