[wp-trac] [WordPress Trac] #17242: Themes: Allow flexible sizes for custom header uploads
WordPress Trac
wp-trac at lists.automattic.com
Wed Feb 1 18:43:25 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 has-patch |
------------------------------------+------------------
Comment (by aaroncampbell):
[attachment:17242-height-width.2.diff] is based on feedback from nacin and
Mark Jaquith in [https://irclogs.wordpress.org/chanlog.php?channel
=wordpress-dev&day=2012-02-01&sort=asc#m360105 IRC]. * It gets rid of
`theme_supports_flex_width_headers()` and
`theme_supports_flex_height_headers()` in favor of
`current_theme_supports( 'custom-header', 'flex-width' )`.
* It changes `get_random_header_data()` to return an object so it can be
chained like `get_random_header_data()->width`.
* It introduces `get_current_header_data()` which also returns an object,
and it adds the attachment id to that object as ->id if it's an uploaded
image.
* I kept `get_header_image_width()` and `get_header_image_height()`
because they fall back to the constants.
* Additionally it gets rid of the `$_wp_random_header` global in favor of
a static variable in `get_random_header_data()`.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17242#comment:50>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list