Ignore unsupported post types in add_theme_support(). Props garyc40. fixes #16073

git-svn-id: https://develop.svn.wordpress.org/trunk@17213 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2011-01-03 23:56:42 +00:00
parent 61161d86ba
commit 26597c2e34
1 changed files with 3 additions and 0 deletions

View File

@ -1754,6 +1754,9 @@ function add_theme_support( $feature ) {
$_wp_theme_features[$feature] = true;
else
$_wp_theme_features[$feature] = array_slice( func_get_args(), 1 );
if ( $feature == 'post-formats' && is_array( $_wp_theme_features[$feature][0] ) )
$_wp_theme_features[$feature][0] = array_intersect( $_wp_theme_features[$feature][0], array_keys( get_post_format_slugs() ) );
}
/**