Make WordPress Core

Ticket #22080: 22080-merge-post-thumbnails-cpt.diff

File 22080-merge-post-thumbnails-cpt.diff, 878 bytes (added by jmichaelward, 9 years ago)
  • theme.php

     
    15351535                $args = array_slice( func_get_args(), 1 );
    15361536
    15371537        switch ( $feature ) {
     1538                case 'post-thumbnails':
     1539                        // Support has already been added for all post types and has a boolean value of true
     1540                        if ( true === get_theme_support( 'post-thumbnails' ) ) {
     1541                                return true;
     1542                        }
     1543
     1544                        // Get previously added post types and merge unique values into new array as args
     1545                        if ( is_array( $args[0] ) && is_array( $_wp_theme_features['post-thumbnails'][0] ) ) {
     1546                                $values = array_unique( array_merge( $args[0], $_wp_theme_features['post-thumbnails'][0] ) );
     1547                                $args   = array( $values );
     1548                        }
     1549
     1550                        break;
     1551
    15381552                case 'post-formats' :
    15391553                        if ( is_array( $args[0] ) ) {
    15401554                                $post_formats = get_post_format_slugs();