WordPress.org

Make WordPress Core

Changeset 30038


Ignore:
Timestamp:
10/27/2014 11:25:31 AM (6 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/theme.php

    r29903 r30038  
    14731473    switch ( $feature ) {
    14741474        case 'post-formats' :
    1475             if ( is_array( $args[0] ) )
    1476                 $args[0] = array_intersect( $args[0], array_keys( get_post_format_slugs() ) );
     1475            if ( is_array( $args[0] ) ) {
     1476                $post_formats = get_post_format_slugs();
     1477                unset( $post_formats['standard'] );
     1478
     1479                $args[0] = array_intersect( $args[0], array_keys( $post_formats ) );
     1480            }
    14771481            break;
    14781482
Note: See TracChangeset for help on using the changeset viewer.