#37309 closed enhancement (fixed)
Show always domain and path when deleting a site
| Reported by: | ocean90 | Owned by: | ian.edington |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.7 |
| Component: | Networks and Sites | Version: | |
| Severity: | normal | Keywords: | good-first-bug has-patch |
| Cc: | Focuses: | multisite |
Description
Since #22383 the domain and path UI is combined and a subdomain install can have a custom path too. But tags/4.5.3/src/wp-admin/ms-delete-site.php?marks=88#L88 is still doing this check:
is_subdomain_install() ? $blog->domain : $blog->domain . $blog->path
This should be changed to always show the full URL.
Attachments (1)
Change History (6)
#1
@
10 years ago
- Keywords has-patch added; needs-patch removed
Removed conditional if and set the printf paramaters order to help with translation.
PS first patch. be kind ;)
Done as part of TO Contrib2Core meetup.
#2
@
10 years ago
- Milestone Future Release → 4.7
- Owner set to
- Status new → assigned
@ian.edington Thanks for the patch! The change to the string is not necessary as there is only one placeholder.
#3
follow-up:
↓ 5
@
10 years ago
@ocean90 Thanks for the feedback. My understanding from @pbearne is that although %s works, %1$s makes the code more clear, therefore readable. I can see both points of view and both ways are used throughout the code base. Which one is the standard/better?
php files in core that use %1 without %2 in same line: (24 files)
php files in core that use %s: (100+ files)
Would you like me to re-submit a patch without the string change?
#5
in reply to: ↑ 3
@
10 years ago
Replying to ian.edington:
@ocean90 Thanks for the feedback. My understanding from @pbearne is that although %s works, %1$s makes the code more clear, therefore readable.
Not sure if it's more readable but I prefer using %s if it's just one placeholder.
Would you like me to re-submit a patch without the string change?
No, I did it on commit. Thanks again!
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Patch ms-delete-site to remove conditional