[wp-trac] [WordPress Trac] #58150: Use is_main_site() in WP_MS_Sites_List_Table::handle_row_actions()
WordPress Trac
noreply at wordpress.org
Tue Apr 18 08:57:05 UTC 2023
#58150: Use is_main_site() in WP_MS_Sites_List_Table::handle_row_actions()
-------------------------------------+-------------------------------------
Reporter: SergeyBiryukov | Owner: (none)
Type: enhancement | Status: new
Priority: low | Milestone: 6.3
Component: Networks and Sites | Version:
Severity: normal | Keywords: needs-patch good-first-
Focuses: multisite, coding- | bug
standards |
-------------------------------------+-------------------------------------
There is a conditional in `WP_MS_Sites_List_Table::handle_row_actions()`:
{{{
if ( get_network()->site_id !== (int) $blog['blog_id'] )
}}}
For better readability, I think it can be replaced with:
{{{
if ( ! is_main_site( $blog['blog_id'] ) )
}}}
That would also be more consistent with
`WP_MS_Sites_List_Table::column_cb()`, which already uses `is_main_site()`
for a similar check as of [25125].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58150>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list