[wp-trac] [WordPress Trac] #18027: reducing the confusion about twenty-eleven header image
WordPress Trac
wp-trac at lists.automattic.com
Tue Aug 23 15:26:52 UTC 2011
#18027: reducing the confusion about twenty-eleven header image
---------------------------+------------------------------
Reporter: walid3 | Owner: iandstewart
Type: enhancement | Status: reviewing
Priority: normal | Milestone: Awaiting Review
Component: Bundled Theme | Version: 3.2
Severity: normal | Resolution:
Keywords: |
---------------------------+------------------------------
Comment (by nacin):
Attached patch introduces the ability to provide arguments to
add_theme_support( 'post-thumbnails' ) beyond what post types you wish for
them to be applied. This will surely be needed in the future anyway.
Example:
{{{
add_theme_support( 'post-thumbnails', array( 'post', 'page' ) ); // old
way, still works
add_theme_support( 'post-thumbnails', array( 'usage' => array( 'post',
'page' ) ) ); // new
add_theme_support( 'post-thumbnails', array( 'usage' => __( 'This is how
the theme uses it.' ) ) );
}}}
As an alternative, we can use the third argument for options, with the
second argument remaining the post types:
{{{
add_theme_support( 'post-thumbnails', true, array( 'usage' => __( 'This is
how the theme uses it.' ) ) );
add_theme_support( 'post-thumbnails', array( 'post', 'page' ), array(
'usage' => __( 'This is how the theme uses it.' ) ) );
}}}
Attached is a patch that implements the first option, along with unit
tests. I think I prefer the alternative, but I'm trying to think of how we
want to expand the API in the future.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18027#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list