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.

git-svn-id: https://develop.svn.wordpress.org/trunk@55666 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2023-04-20 14:28:50 +00:00
parent 39f4a27610
commit 0f28f4cf1a
@@ -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>',