#58150 closed enhancement (fixed)
Use is_main_site() in WP_MS_Sites_List_Table::handle_row_actions()
Reported by: | SergeyBiryukov | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 6.3 | Priority: | low |
Severity: | normal | Version: | |
Component: | Networks and Sites | Keywords: | good-first-bug has-patch |
Focuses: | multisite, coding-standards | Cc: |
Description
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].
Change History (7)
This ticket was mentioned in PR #4353 on WordPress/wordpress-develop by ecorica.
17 months ago
#2
- Keywords has-patch added; needs-patch removed
Trac ticket: https://core.trac.wordpress.org/ticket/58150
#3
follow-up:
↓ 4
@
17 months ago
Hello,
I'm at the contributor day in Paris and I pushed my first patch :)
#4
in reply to:
↑ 3
@
17 months ago
Replying to ecorica:
I'm at the contributor day in Paris and I pushed my first patch :)
Looks great, thank you! :)
#5
@
17 months ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 55666:
@SergeyBiryukov commented on PR #4353:
17 months ago
#6
Thanks for the PR! Merged in r55666.
Note: See
TracTickets for help on using
tickets.
+1 I like this.