diff --git a/wp-includes/theme.php b/wp-includes/theme.php index f4dfaeedc2..2f7dc1fca7 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -1535,6 +1535,24 @@ function add_theme_support( $feature ) { $args = array_slice( func_get_args(), 1 ); switch ( $feature ) { + case 'post-thumbnails': + // All post types are already supported. + if ( true === get_theme_support( 'post-thumbnails' ) ) { + return; + } + + /* + * Merge post types with any that already declared their support + * for post thumbnails. + */ + if ( is_array( $args[0] ) && is_array( $_wp_theme_features['post-thumbnails'][0] ) ) { + $post_types = array_unique( array_merge( $args[0], $_wp_theme_features['post-thumbnails'][0] ) ); + + $args = array( $post_types ); + } + + break; + case 'post-formats' : if ( is_array( $args[0] ) ) { $post_formats = get_post_format_slugs(); diff --git a/wp-includes/version.php b/wp-includes/version.php index 721cf0c90b..e52c4bf0c6 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-alpha-37307'; +$wp_version = '4.6-alpha-37308'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.