WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#7242 closed defect (bug) (fixed)

wp_get_attachment_thumb_url() back-compat with old format ".thumbnail" thumbnails broken

Reported by: DD32 Owned by:
Milestone: 2.6 Priority: normal
Severity: normal Version: 2.6
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

It appears that when using wp_get_attachment_thumb_url() for old attachments, Which use the "filename.thumbnail.jpg" format is broken, It cannot detect the thumbnail file, so returns a url to the fullsized image.

The bug is a 2-part:

  1. The $id of the attachment wanted is not passed to wp_get_attachment_thumb_file()
  2. The $thumb_file variable is not available in the 2nd part of the If at the time that PHP calls it, An extra compilation check needs to be done to make it available, Adding a set of brackets around it solves it.

Attachments (1)

7242.diff (601 bytes) - added by DD32 6 years ago.

Download all attachments as: .zip

Change History (2)

DD326 years ago

comment:1 ryan6 years ago

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

(In [8257]) Fix wp_get_attachment_thumb_url() tumbnail back compat. Props DD32. fixes #7242

Note: See TracTickets for help on using tickets.