Make WordPress Core

Opened 4 years ago

Last modified 4 years ago

#52471 new enhancement

Site Health Upload-related INI values could use consistent formatting

Reported by: ayeshrajans's profile ayeshrajans Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Site Health Keywords: has-patch close 2nd-opinion
Focuses: Cc:

Description

In #50038, we added a new section to Site Health -> Info section to show upload-related limits.

Currently, it does not show the information in a consistent way. It shows values like 128M, 2G, and 128 MB.

I would like to suggest to tweak this to use size_format function to properly format them. We already use wp_convert_hr_to_bytes function to parse INI-style values (128M, 2G, 2M, etc); they just need some formatting.

Despite being a smaller diff, I suppose 5.7 is too early to target this, assuming this gets accepted of course.

Attachments (3)

52471.patch (1.6 KB) - added by ayeshrajans 4 years ago.
media-formatting-mixup.png (25.2 KB) - added by ayeshrajans 4 years ago.
Before this change
media-formatting-mixup-after.png (25.4 KB) - added by ayeshrajans 4 years ago.
_After_ this change

Download all attachments as: .zip

Change History (4)

@ayeshrajans
4 years ago

@ayeshrajans
4 years ago

Before this change

@ayeshrajans
4 years ago

_After_ this change

#1 @SergeyBiryukov
4 years ago

  • Keywords close 2nd-opinion added

Hi there, thanks for the ticket and the patch!

Pretty much like in #46664, I think the purpose of the Site Health Info screen is to provide raw data as reported by PHP for debugging purposes, so we'd want to avoid any modifications of the displayed data here.

Note: See TracTickets for help on using tickets.