WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#21518 closed defect (bug) (fixed)

Remove 'hwstring_small' property from attachment metadata

Reported by: koopersmith Owned by: nacin
Milestone: 3.5 Priority: low
Severity: minor Version: 3.4.1
Component: Media Keywords: dev-feedback has-patch
Focuses: Cc:

Description

We don't appear to use the 'hwstring_small' meta key anywhere, and as a series of html attributes, it doesn't fit in with the rest of the attachment meta keys. Thoughts on removing (and/or deprecating) it?

Attachments (2)

21518.patch (2.9 KB) - added by SergeyBiryukov 3 years ago.
21518.2.patch (1.3 KB) - added by SergeyBiryukov 3 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 @nacin3 years ago

I'm fine with it vanishing. At worst, someone's image is no longer properly bound. Looks like it may not have been properly bound, anyway — it is based on an image downsize of 128 x 96, rather than any options.

Would be good to track down where it entered core and why. Sounds like it may be related to the old wp_get_attachment_thumb_file() and friends, before we had intermediate sizes.

@SergeyBiryukov3 years ago

comment:2 @SergeyBiryukov3 years ago

  • Keywords has-patch added

Introduced in [2921], unused since [2958].

The patch also deprecates get_udims() (unused since [6309]), which is essentially a copy of wp_shrink_dimensions(), already deprecated in [12823]:
http://core.trac.wordpress.org/browser/tags/3.4.1/wp-admin/includes/deprecated.php#L39

comment:3 @nacin3 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In [21808]:

Remove 'hwstring_small' from attachment metadata and deprecate get_udims(). props SergeyBiryukov. fixes #21518.

@SergeyBiryukov3 years ago

comment:4 @SergeyBiryukov3 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

21518.2.patch corrects @return values, which are reversed:
http://core.trac.wordpress.org/browser/tags/3.4.2/wp-includes/media.php#L278

Also adds @see/@deprecated for consistency with other functions.

comment:5 @nacin3 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In [21835]:

Correct return values for two deprecated media admin functions. props SergeyBiryukov. fixes #21518.

Note: See TracTickets for help on using tickets.