[wp-trac] [WordPress Trac] #26516: Make it easier to check theme support
WordPress Trac
noreply at wordpress.org
Tue Dec 10 02:02:22 UTC 2013
#26516: Make it easier to check theme support
-------------------------+------------------------------------
Reporter: obenland | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: 2.9
Severity: normal | Keywords: has-patch dev-feedback
-------------------------+------------------------------------
Currently we don't make it too easy for plugins (and themes I suppose) to
get access to the information passed in the second argument to
`add_theme_support()`.
To get more information about a theme's support for post thumbnails for
example, a plugin would have to assign the return value of
`get_theme_support()` to a variable and then access the value stored in
the first key of the returned array:
{{{
#!php
$support = get_theme_support( 'post-thumbnails' );
$actual_support = $support[0];
}}}
While this is not ideal for core features that themes need to register
support for, it gets painful quickly when themes and plugins want to deal
with information coupled to a custom feature.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/26516>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list