Don't display Standard post format twice in the meta box if the theme unnecessarily mentions it in the add_theme_support() call.

props ptahdunbar, nacin, pushplaybang, obenland.
fixes #16555.

git-svn-id: https://develop.svn.wordpress.org/trunk@30038 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2014-10-27 11:25:31 +00:00
parent 6c69eec02d
commit bb5aedf3d9
1 changed files with 6 additions and 2 deletions

View File

@ -1472,8 +1472,12 @@ function add_theme_support( $feature ) {
switch ( $feature ) {
case 'post-formats' :
if ( is_array( $args[0] ) )
$args[0] = array_intersect( $args[0], array_keys( get_post_format_slugs() ) );
if ( is_array( $args[0] ) ) {
$post_formats = get_post_format_slugs();
unset( $post_formats['standard'] );
$args[0] = array_intersect( $args[0], array_keys( $post_formats ) );
}
break;
case 'html5' :