Commit a8218e8d6d for wordpress.org
commit a8218e8d6d3340a69acb37ccbcb550735051b6e0
Author: johnjamesjacoby <johnjamesjacoby@git.wordpress.org>
Date: Sun Nov 1 03:12:00 2026 +0000
Networks and Sites: Remove view modes from the Network Sites and Users list tables.
The list and excerpt modes on these screens differ only by timestamps and optional site title and tagline output. Remove both view switchers and their request handling, and stop reading and writing the related user settings.
Use the former excerpt-mode date format as the canonical display. Remove the site title and tagline output to avoid additional per-row option reads.
Update the screen help text and add focused multisite tests.
Developed in https://github.com/WordPress/wordpress-develop/pull/13120.
Props afercia, johnjamesjacoby, realloc, sukhendu2002.
Fixes #43899.
Built from https://develop.svn.wordpress.org/trunk@65160
git-svn-id: http://core.svn.wordpress.org/trunk@64309 1a063a9b-81f0-0310-95a4-ce76da25c4cd
diff --git a/wp-admin/includes/class-wp-ms-sites-list-table.php b/wp-admin/includes/class-wp-ms-sites-list-table.php
index a12954827e..2738856f88 100644
--- a/wp-admin/includes/class-wp-ms-sites-list-table.php
+++ b/wp-admin/includes/class-wp-ms-sites-list-table.php
@@ -65,19 +65,11 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
*
* @since 3.1.0
*
- * @global string $mode List table view mode.
* @global string $s Search string.
* @global wpdb $wpdb WordPress database abstraction object.
*/
public function prepare_items() {
- global $mode, $s, $wpdb;
-
- if ( ! empty( $_REQUEST['mode'] ) ) {
- $mode = 'excerpt' === $_REQUEST['mode'] ? 'excerpt' : 'list';
- set_user_setting( 'sites_list_mode', $mode );
- } else {
- $mode = get_user_setting( 'sites_list_mode', 'list' );
- }
+ global $s, $wpdb;
$per_page = $this->get_items_per_page( 'sites_network_per_page' );
@@ -310,27 +302,6 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
return $actions;
}
- /**
- * Displays the pagination.
- *
- * @since 3.1.0
- *
- * @global string $mode List table view mode.
- *
- * @param string $which The location of the pagination nav markup: Either 'top' or 'bottom'.
- *
- * @phpstan-param 'top'|'bottom' $which
- */
- protected function pagination( $which ) {
- global $mode;
-
- parent::pagination( $which );
-
- if ( 'top' === $which ) {
- $this->view_switcher( $mode );
- }
- }
-
/**
* Displays extra controls between bulk actions and pagination.
*
@@ -474,13 +445,9 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
*
* @since 4.3.0
*
- * @global string $mode List table view mode.
- *
* @param array $blog Current site.
*/
public function column_blogname( $blog ) {
- global $mode;
-
$blogname = untrailingslashit( $blog['domain'] . $blog['path'] );
?>
@@ -496,18 +463,6 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
?>
</strong>
<?php
- if ( 'list' !== $mode ) {
- switch_to_blog( $blog['blog_id'] );
- echo '<p>';
- printf(
- /* translators: 1: Site title, 2: Site tagline. */
- __( '%1$s – %2$s' ),
- get_option( 'blogname' ),
- '<em>' . get_option( 'blogdescription' ) . '</em>'
- );
- echo '</p>';
- restore_current_blog();
- }
}
/**
@@ -515,18 +470,10 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
*
* @since 4.3.0
*
- * @global string $mode List table view mode.
- *
* @param array $blog Current site.
*/
public function column_lastupdated( $blog ) {
- global $mode;
-
- if ( 'list' === $mode ) {
- $date = __( 'Y/m/d' );
- } else {
- $date = __( 'Y/m/d g:i:s a' );
- }
+ $date = __( 'Y/m/d g:i:s a' );
if ( '0000-00-00 00:00:00' === $blog['last_updated'] ) {
_e( 'Never' );
@@ -540,18 +487,10 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
*
* @since 4.3.0
*
- * @global string $mode List table view mode.
- *
* @param array $blog Current site.
*/
public function column_registered( $blog ) {
- global $mode;
-
- if ( 'list' === $mode ) {
- $date = __( 'Y/m/d' );
- } else {
- $date = __( 'Y/m/d g:i:s a' );
- }
+ $date = __( 'Y/m/d g:i:s a' );
if ( '0000-00-00 00:00:00' === $blog['registered'] ) {
echo '—';
diff --git a/wp-admin/includes/class-wp-ms-users-list-table.php b/wp-admin/includes/class-wp-ms-users-list-table.php
index 8e7c98372e..eaf6a8df47 100644
--- a/wp-admin/includes/class-wp-ms-users-list-table.php
+++ b/wp-admin/includes/class-wp-ms-users-list-table.php
@@ -31,19 +31,11 @@ class WP_MS_Users_List_Table extends WP_List_Table {
*
* @since 3.1.0
*
- * @global string $mode List table view mode.
* @global string $usersearch User search query.
* @global string $role The user role to filter by. Only 'super' (super admins) is supported.
*/
public function prepare_items() {
- global $mode, $usersearch, $role;
-
- if ( ! empty( $_REQUEST['mode'] ) ) {
- $mode = 'excerpt' === $_REQUEST['mode'] ? 'excerpt' : 'list';
- set_user_setting( 'network_users_list_mode', $mode );
- } else {
- $mode = get_user_setting( 'network_users_list_mode', 'list' );
- }
+ global $usersearch, $role;
$usersearch = isset( $_REQUEST['s'] ) ? wp_unslash( trim( $_REQUEST['s'] ) ) : '';
@@ -189,27 +181,6 @@ class WP_MS_Users_List_Table extends WP_List_Table {
return $this->get_views_links( $role_links );
}
- /**
- * Generates the list table pagination.
- *
- * @since 3.1.0
- *
- * @global string $mode List table view mode.
- *
- * @param string $which The location of the pagination: Either 'top' or 'bottom'.
- *
- * @phpstan-param 'top'|'bottom' $which
- */
- protected function pagination( $which ) {
- global $mode;
-
- parent::pagination( $which );
-
- if ( 'top' === $which ) {
- $this->view_switcher( $mode );
- }
- }
-
/**
* Gets the list of columns for the users list table.
*
@@ -370,18 +341,10 @@ class WP_MS_Users_List_Table extends WP_List_Table {
*
* @since 4.3.0
*
- * @global string $mode List table view mode.
- *
* @param WP_User $user The current WP_User object.
*/
public function column_registered( $user ) {
- global $mode;
- if ( 'list' === $mode ) {
- $date = __( 'Y/m/d' );
- } else {
- $date = __( 'Y/m/d g:i:s a' );
- }
- echo mysql2date( $date, $user->user_registered );
+ echo mysql2date( __( 'Y/m/d g:i:s a' ), $user->user_registered );
}
/**
diff --git a/wp-admin/network/sites.php b/wp-admin/network/sites.php
index b4d266f2b9..5c2b72086b 100644
--- a/wp-admin/network/sites.php
+++ b/wp-admin/network/sites.php
@@ -29,7 +29,7 @@ get_current_screen()->add_help_tab(
'title' => __( 'Overview' ),
'content' =>
'<p>' . __( 'Add Site takes you to the screen for adding a new site to the network. You can search for a site by Name, ID number, or IP address. Screen Options allows you to choose how many sites to display on one page.' ) . '</p>' .
- '<p>' . __( 'This is the main table of all sites on this network. Switch between list and excerpt views by using the icons above the right side of the table.' ) . '</p>' .
+ '<p>' . __( 'This is the main table of all sites on this network.' ) . '</p>' .
'<p>' . __( 'Hovering over each site reveals seven options (three for the primary site):' ) . '</p>' .
'<ul><li>' . __( 'An Edit link to a separate Edit Site screen.' ) . '</li>' .
'<li>' . __( 'Dashboard leads to the Dashboard for that site.' ) . '</li>' .
diff --git a/wp-admin/network/users.php b/wp-admin/network/users.php
index 144f98d0f9..c7b63b4360 100644
--- a/wp-admin/network/users.php
+++ b/wp-admin/network/users.php
@@ -286,7 +286,7 @@ get_current_screen()->add_help_tab(
'<p>' . __( 'This table shows all users across the network and the sites to which they are assigned.' ) . '</p>' .
'<p>' . __( 'Hover over any user on the list to make the edit links appear. The Edit link on the left will take you to their Edit User profile page; the Edit link on the right by any site name goes to an Edit Site screen for that site.' ) . '</p>' .
'<p>' . __( 'You can also go to the user’s profile page by clicking on the individual username.' ) . '</p>' .
- '<p>' . __( 'You can sort the table by clicking on any of the table headings and switch between list and excerpt views by using the icons above the users list.' ) . '</p>' .
+ '<p>' . __( 'You can sort the table by clicking on any of the table headings.' ) . '</p>' .
'<p>' . __( 'The bulk action will permanently delete selected users, or mark/unmark those selected as spam. Spam users will have posts removed and will be unable to sign up again with the same email addresses.' ) . '</p>' .
'<p>' . __( 'You can make an existing user an additional super admin by going to the Edit User profile page and checking the box to grant that privilege.' ) . '</p>',
)
diff --git a/wp-includes/version.php b/wp-includes/version.php
index da3cc34cf5..bfc4c9eb50 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '7.2-beta3-65159';
+$wp_version = '7.2-beta3-65160';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.