[wp-trac] [WordPress Trac] #17242: Themes: Allow flexible sizes for custom header uploads
WordPress Trac
wp-trac at lists.automattic.com
Mon Jan 30 19:24:26 UTC 2012
#17242: Themes: Allow flexible sizes for custom header uploads
----------------------------+------------------
Reporter: lancewillett | Owner:
Type: task (blessed) | Status: new
Priority: normal | Milestone: 3.4
Component: Themes | Version:
Severity: normal | Resolution:
Keywords: dev-feedback |
----------------------------+------------------
Comment (by aaroncampbell):
[https://irclogs.wordpress.org/chanlog.php?channel=wordpress-
dev&day=2012-01-27&sort=asc#m358119 More IRC talk]. Currently we store
just the header image URL, storing it in a 'header_image' theme mod. We
talked about possibly storing the attachment ID along with the url. This
makes sense because even if it's a slightly expensive function it would
only run when you change the header. We could possibly even store the
image dimensions when the header is set (would help handle the default
headers that aren't in the media gallery). However, the issue is with the
random header option. Currently we have `get_random_header_image()` which
returns a URL to header image. The problem is that if a random header is
used, we have no way to know which one was used to give a size later.
We could consider a whole new function that returns a random image as well
as the size info, but `(get_)header_image()` already uses the
`get_random_header_image()` and needs a URL. Any ideas for an elegant
solution to handling the random headers?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17242#comment:37>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list