wp/wp-admin/my-sites.php
changeset 9 177826044cd9
parent 7 cf61fcea0001
child 16 a86126ab1dd4
--- a/wp/wp-admin/my-sites.php	Mon Oct 14 18:06:33 2019 +0200
+++ b/wp/wp-admin/my-sites.php	Mon Oct 14 18:28:13 2019 +0200
@@ -9,11 +9,13 @@
 
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( !is_multisite() )
+if ( ! is_multisite() ) {
 	wp_die( __( 'Multisite support is not enabled.' ) );
+}
 
-if ( ! current_user_can('read') )
+if ( ! current_user_can( 'read' ) ) {
 	wp_die( __( 'Sorry, you are not allowed to access this page.' ) );
+}
 
 $action = isset( $_POST['action'] ) ? $_POST['action'] : 'splash';
 
@@ -32,20 +34,22 @@
 	}
 }
 
-$title = __( 'My Sites' );
+$title       = __( 'My Sites' );
 $parent_file = 'index.php';
 
-get_current_screen()->add_help_tab( array(
-	'id'      => 'overview',
-	'title'   => __('Overview'),
-	'content' =>
-		'<p>' . __('This screen shows an individual user all of their sites in this network, and also allows that user to set a primary site. They can use the links under each site to visit either the front end or the dashboard for that site.') . '</p>'
-) );
+get_current_screen()->add_help_tab(
+	array(
+		'id'      => 'overview',
+		'title'   => __( 'Overview' ),
+		'content' =>
+			'<p>' . __( 'This screen shows an individual user all of their sites in this network, and also allows that user to set a primary site. They can use the links under each site to visit either the front end or the dashboard for that site.' ) . '</p>',
+	)
+);
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Dashboard_My_Sites_Screen">Documentation on My Sites</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Dashboard_My_Sites_Screen">Documentation on My Sites</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>'
 );
 
 require_once( ABSPATH . 'wp-admin/admin-header.php' );
@@ -55,9 +59,11 @@
 <?php } ?>
 
 <div class="wrap">
-<h1 class="wp-heading-inline"><?php
+<h1 class="wp-heading-inline">
+<?php
 echo esc_html( $title );
-?></h1>
+?>
+</h1>
 
 <?php
 if ( in_array( get_site_option( 'registration' ), array( 'all', 'blog' ) ) ) {
@@ -71,7 +77,7 @@
 	_e( 'You must be a member of at least one site to use this page.' );
 	echo '</p>';
 else :
-?>
+	?>
 
 <hr class="wp-header-end">
 
@@ -110,10 +116,10 @@
 	foreach ( $blogs as $user_blog ) {
 		switch_to_blog( $user_blog->userblog_id );
 
-		echo "<li>";
+		echo '<li>';
 		echo "<h3>{$user_blog->blogname}</h3>";
 
-		$actions = "<a href='" . esc_url( home_url() ). "'>" . __( 'Visit' ) . '</a>';
+		$actions = "<a href='" . esc_url( home_url() ) . "'>" . __( 'Visit' ) . '</a>';
 
 		if ( current_user_can( 'read' ) ) {
 			$actions .= " | <a href='" . esc_url( admin_url() ) . "'>" . __( 'Dashboard' ) . '</a>';
@@ -132,14 +138,17 @@
 
 		/** This filter is documented in wp-admin/my-sites.php */
 		echo apply_filters( 'myblogs_options', '', $user_blog );
-		echo "</li>";
+		echo '</li>';
 
 		restore_current_blog();
-	}?>
+	}
+	?>
 	</ul>
 	<?php
 	if ( count( $blogs ) > 1 || has_action( 'myblogs_allblogs_options' ) || has_filter( 'myblogs_options' ) ) {
-		?><input type="hidden" name="action" value="updateblogsettings" /><?php
+		?>
+		<input type="hidden" name="action" value="updateblogsettings" />
+		<?php
 		wp_nonce_field( 'update-my-sites' );
 		submit_button();
 	}