Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#23161 closed feature request (duplicate)

Filters for the image crop position

Reported by: sergejmueller's profile sergej.mueller Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.5
Component: Media Keywords: has-patch
Focuses: Cc:

Description

For a adjustable assignment of the crop start position.

Usage to make all crops start at (0,0):

add_action(
	'init',
	'set_image_crop_starts'
);
function set_image_crop_starts() {
	add_filter(
		'image_resize_dimensions_crop_start_x',
		function() {
			return 0;
		}
	);
	add_filter(
		'image_resize_dimensions_crop_start_y',
		function() {
			return 0;
		}
	);
}

Attachments (1)

media.php.patch (654 bytes) - added by sergej.mueller 12 years ago.
media.php

Download all attachments as: .zip

Change History (2)

@sergej.mueller
12 years ago

media.php

#1 @SergeyBiryukov
12 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version changed from trunk to 3.5

Duplicate of #19393.

Note: See TracTickets for help on using tickets.