Allow current_theme_supports() to be used to check for specific post formats. Props ericmann. Fixes #18691.
git-svn-id: https://develop.svn.wordpress.org/trunk@18720 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0ec131e16f
commit
7c0d6373af
@ -1947,10 +1947,14 @@ function current_theme_supports( $feature ) {
|
|||||||
if ( true === $_wp_theme_features[$feature] ) // Registered for all types
|
if ( true === $_wp_theme_features[$feature] ) // Registered for all types
|
||||||
return true;
|
return true;
|
||||||
$content_type = $args[0];
|
$content_type = $args[0];
|
||||||
if ( in_array($content_type, $_wp_theme_features[$feature][0]) )
|
return in_array( $content_type, $_wp_theme_features[$feature][0] );
|
||||||
return true;
|
break;
|
||||||
else
|
|
||||||
return false;
|
case 'post-formats':
|
||||||
|
// specific post formats can be registered by passing an array of types to
|
||||||
|
// add_theme_support()
|
||||||
|
$post_format = $args[0];
|
||||||
|
return in_array( $post_format, $_wp_theme_features[$feature][0] );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user