Make WordPress Core

Changeset 55666 for trunk


Ignore:
Timestamp:
04/20/2023 02:28:50 PM (3 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-ms-sites-list-table.php

    r55656 r55666  
    733733                );
    734734
    735                 if ( get_network()->site_id !== (int) $blog['blog_id'] ) {
     735                if ( ! is_main_site( $blog['blog_id'] ) ) {
    736736                        if ( '1' === $blog['deleted'] ) {
    737737                                $actions['activate'] = sprintf(
Note: See TracChangeset for help on using the changeset viewer.