Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 7 years ago

#21518 closed defect (bug) (fixed)

Remove 'hwstring_small' property from attachment metadata

Reported by: koopersmith's profile koopersmith Owned by: nacin's profile 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 11 years ago.
21518.2.patch (1.3 KB) - added by SergeyBiryukov 11 years ago.

Download all attachments as: .zip

Change History (8)

#1 follow-up: @nacin
11 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.

#2 @SergeyBiryukov
11 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

#3 @nacin
11 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.

#4 @SergeyBiryukov
11 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.

#5 @nacin
11 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.

#6 in reply to: ↑ 1 @miqrogroove
7 years ago

Replying to nacin:

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.

Traced it as far as https://core.trac.wordpress.org/browser/tags/2.1/wp-admin/admin-functions.php#L2112

Note: See TracTickets for help on using tickets.