Make WordPress Core


Ignore:
Timestamp:
04/26/2016 08:28:46 PM (9 years ago)
Author:
rachelbaker
Message:

Post Thumbnails: Fix logic bug and tests from [37308] where post-thumbnails support wasn’t added if there were no previous post_types with support already.

See #22080

File:
1 edited

Legend:

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

    r37308 r37313  
    15461546             * for post thumbnails.
    15471547             */
    1548             if ( is_array( $args[0] ) && is_array( $_wp_theme_features['post-thumbnails'][0] ) ) {
    1549                 $post_types = array_unique( array_merge( $args[0], $_wp_theme_features['post-thumbnails'][0] ) );
    1550 
    1551                 $args = array( $post_types );
     1548            if ( is_array( $args[0] ) && isset( $_wp_theme_features['post-thumbnails'] ) ) {
     1549                $args[0] = array_unique( array_merge( $_wp_theme_features['post-thumbnails'][0], $args[0] ) );
    15521550            }
    15531551
Note: See TracChangeset for help on using the changeset viewer.