#58150 closed enhancement (fixed)
Use is_main_site() in WP_MS_Sites_List_Table::handle_row_actions()
| Reported by: | SergeyBiryukov | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | low | Milestone: | 6.3 |
| Component: | Networks and Sites | Version: | |
| Severity: | normal | Keywords: | good-first-bug has-patch |
| Cc: | Focuses: | multisite, coding-standards |
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.
3 years ago
#2
- Keywords has-patch added; needs-patch removed
Trac ticket: https://core.trac.wordpress.org/ticket/58150
#3
follow-up:
↓ 4
@
3 years ago
Hello,
I'm at the contributor day in Paris and I pushed my first patch :)
#4
in reply to: ↑ 3
@
3 years ago
Replying to ecorica:
I'm at the contributor day in Paris and I pushed my first patch :)
Looks great, thank you! :)
@SergeyBiryukov commented on PR #4353:
3 years ago
#6
Thanks for the PR! Merged in r55666.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
+1 I like this.