Opened 8 years ago
Closed 8 years ago
#41167 closed enhancement (fixed)
Remove help text duplication on Site editing screens in network admin
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.9 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Networks and Sites | Keywords: | good-first-bug has-patch |
Focuses: | administration, multisite | Cc: |
Description
When editing a site in Network Admin, the Help
text is duplicated across four files for each of the tabs at the top:
site-info.php
site-users.php
site-themes.php
site-settings.php
It should be abstracted into a helper function to avoid quadruplication and to allow the help text to be more easily updated in the future.
Attachments (2)
Change History (11)
#2
in reply to:
↑ 1
@
8 years ago
Replying to partyfrikadelle:
any idea where to put the helper function, so all the files can reference it?
wp-includes/ms-functions.php
would probably work.
#3
@
8 years ago
- Keywords has-patch added; needs-patch removed
Introduced 2 new functions get_site_screen_help_tab_args()
and get_site_screen_help_sidebar_content()
to solve the duplication.
This ticket was mentioned in Slack in #core-multisite by stevenkword. View the logs.
8 years ago
#5
@
8 years ago
- Keywords needs-refresh added
Thank you for the patch, @atanasangelovdev !
41167.patch applies cleanly as of July 10, 2017, but with warnings. (Stripping trailing CRs from patch; use --binary to disable.) We should refresh this patch with proper formatting. I am also going to add a label for dev-feedback, so we can get some more eyes on this.
@earnjam also has brought up during the weekly Multisite Bug Scrub that we should take a look through Core for other places where we repeat text like this. However, we should probably create those as new tickets to keep this one lean and then related them back to this ticket.
#7
@
8 years ago
- Milestone changed from Awaiting Review to 4.9
- Owner set to flixos90
- Status changed from new to reviewing
Thanks for the patch @atanasangelovdev, it looks good!
I will review in detail a bit later. The new functions should probably go into wp-admin/includes/ms.php
though since they're only needed in the admin, but I can change that when reviewing, so you don't need to do another patch just for that. :)
Hi,
any idea where to put the helper function, so all the files can reference it?
Thanks for your help!
Carsten