[wp-trac] [WordPress Trac] #14890: dynamic custom header image sizes patch
WordPress Trac
wp-trac at lists.automattic.com
Fri Sep 17 15:22:56 UTC 2010
#14890: dynamic custom header image sizes patch
-------------------------+--------------------------------------------------
Reporter: a.hoereth | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version:
Severity: normal | Keywords: needs-testing,
-------------------------+--------------------------------------------------
This patch adds the capability for theme developers to use maximum, fixed
or automatic header image sizes.
HEADER_IMAGE_WIDTH and HEADER_IMAGE_HEIGHT can be set to 3 different
states:
fixed - "940" - like the old feature. all images get resized to a fixed
size
max - "max:940" - smaller images are not resized
auto - "auto" - no images are changed
At the moment the if clause handling if the image has to be resized and
how is very complex. I can simplify it very easily, but didnt due to the
possibility that we could at a "manual/automatic cropping" button or just
change some conditions to manual cropping if it "feels" better. Needs some
testing first..
The patch adds 4 new functions which - in future - will be used to return
or echo the header_image's width and height:
get_header_image_width() - header_image_width()
get_header_image_height() - header_image_height()
If the whole uploading process would be filterable I would add this as a
plugin, but I think it would be nice to have this feature in the core as
well.
It is not ready for release yet though. E.g. need to add an explanation of
the 3 states to be displayed to the user.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14890>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list