Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#23392 closed enhancement (fixed)

Sooner filtering for image_downsize()

Reported by: anatolbroder's profile anatolbroder Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 3.6 Priority: normal
Severity: normal Version:
Component: Media Keywords: has-patch commit
Focuses: Cc:


In the function image_downsize() we have an initialization block with two non trivial time-consuming procedures inside.

	$img_url = wp_get_attachment_url($id);
	$meta = wp_get_attachment_metadata($id);

The filter image_downsize is below the block. But the filter parameters don’t interact with the initialization block. If we move the filter before the initialization block, plugins using the filter will save time.

Attachments (1)

23392.patch (910 bytes) - added by anatolbroder 11 years ago.

Download all attachments as: .zip

Change History (3)

11 years ago

#1 @SergeyBiryukov
11 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 3.6

Introduced in [6952] along with the function itself.

#2 @SergeyBiryukov
11 years ago

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

In 23410:

Return from image_downsize() earlier if a custom resize function is used. props anatolbroder. fixes #23392.

Note: See TracTickets for help on using tickets.