diff --git a/wp-includes/post.php b/wp-includes/post.php index 334a0b8c0c..f7654f0f72 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -5091,11 +5091,16 @@ function wp_attachment_is( $type, $post_id = 0 ) { } $check = wp_check_filetype( $file ); - if ( empty( $check['ext'] ) || 'import' !== $post->post_mime_type ) { + if ( empty( $check['ext'] ) ) { return false; } + $ext = $check['ext']; + if ( 'import' !== $post->post_mime_type ) { + return $type === $ext; + } + switch ( $type ) { case 'image': $image_exts = array( 'jpg', 'jpeg', 'jpe', 'gif', 'png' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 29c9ba0589..3e4005d158 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-alpha-31646'; +$wp_version = '4.2-alpha-31647'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.