dynamic custom header image sizes patch
|Reported by:||a.hoereth||Owned by:|
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.
Change History (5)
- Keywords needs-patch 2nd-opinion added; has-patch needs-testing removed
- Milestone changed from Awaiting Review to Future Release
- Keywords needs-patch 2nd-opinion removed
- Milestone Future Release deleted
- Resolution set to fixed
- Status changed from new to closed