mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
Ignore unsupported post types in add_theme_support(). Props garyc40. fixes #16073
git-svn-id: http://svn.automattic.com/wordpress/trunk@17213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4066dde395
commit
2de6f5ba96
@ -1754,6 +1754,9 @@ function add_theme_support( $feature ) {
|
|||||||
$_wp_theme_features[$feature] = true;
|
$_wp_theme_features[$feature] = true;
|
||||||
else
|
else
|
||||||
$_wp_theme_features[$feature] = array_slice( func_get_args(), 1 );
|
$_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() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user