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:
parent
6c69eec02d
commit
bb5aedf3d9
@ -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' :
|
||||
|
Loading…
x
Reference in New Issue
Block a user