#14890 closed enhancement (duplicate)
dynamic custom header image sizes patch
| Reported by: | a.hoereth | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Themes | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
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.
Attachments (1)
Change History (5)
#2
@
16 years ago
- Keywords needs-patch 2nd-opinion added; has-patch needs-testing removed
- Milestone Awaiting Review → Future Release
This just tries to do too much.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
svn patch