[wp-trac] [WordPress Trac] #17242: Themes: Allow flexible sizes for custom header uploads

WordPress Trac wp-trac at lists.automattic.com
Tue Jan 31 15:28:43 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):

 Ideas for consideration:
 1. Leave `get_random_header_image()` how it is and create
 `get_random_header_data()` (or something similar) which will return all
 the data on a header instead of just the URL. Themes would have to switch
 to the new function if they support random flex-height headers and need
 access to the height.  The big disadvantage here is that
 `get_header_image_height()` won't know the correct height for random
 headers.
 1. Add another global called something like `$wp_random_header` that
 stores the header data in it.
 1. A combination of the above: Create `get_random_header_data()` and make
 `get_random_header_image()` use it.  In the new function we could create
 the `$wp_random_header` global (Actually we could call it `$wp_header` and
 also create it in `get_header_image()` for consistency if we think it's
 useful).  Then if we're using a random header `get_header_image_height()`
 could pull from the global.

 I think #3 seems like the best option, but I'm open to ideas.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17242#comment:43>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list