diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 9d2f905af6..46c1cf1740 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -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() ) ); } /**