From bb5aedf3d9a008c62de0b53271d29e761d3fb66d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 27 Oct 2014 11:25:31 +0000 Subject: [PATCH] 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 --- src/wp-includes/theme.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/theme.php b/src/wp-includes/theme.php index 340fe67f85..db684761ca 100644 --- a/src/wp-includes/theme.php +++ b/src/wp-includes/theme.php @@ -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' :