Networks and Sites: Simplify the check for main site on Network Admin → Sites screen.

This replaces a site ID comparison when displaying action links in `WP_MS_Sites_List_Table::handle_row_actions()` with a dedicated function call, `is_main_site()`, for clarity.

Follow-up to [13918], [25125], [26120], [32644], [38814].

Props ecorica, spacedmonkey, SergeyBiryukov.
Fixes #58150.
Built from https://develop.svn.wordpress.org/trunk@55666


git-svn-id: http://core.svn.wordpress.org/trunk@55178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2023-04-20 14:30:19 +00:00
parent 150781cb41
commit 19d36bfdd2
2 changed files with 2 additions and 2 deletions

View File

@ -732,7 +732,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
__( 'Dashboard' )
);
if ( get_network()->site_id !== (int) $blog['blog_id'] ) {
if ( ! is_main_site( $blog['blog_id'] ) ) {
if ( '1' === $blog['deleted'] ) {
$actions['activate'] = sprintf(
'<a href="%1$s">%2$s</a>',

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.3-alpha-55665';
$wp_version = '6.3-alpha-55666';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.