mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 19:46:21 +00:00
Media: Recognize .ico
files as displayable images on PHP 5.3+ and allow attachment meta data to be generated for them.
Props remyvv, Guido07111975. Fixes #43458. Built from https://develop.svn.wordpress.org/trunk@42780 git-svn-id: http://core.svn.wordpress.org/trunk@42610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e451dfac9e
commit
5596017878
@ -556,6 +556,11 @@ function file_is_valid_image( $path ) {
|
||||
function file_is_displayable_image( $path ) {
|
||||
$displayable_image_types = array( IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG, IMAGETYPE_BMP );
|
||||
|
||||
// IMAGETYPE_ICO is only defined in PHP 5.3+.
|
||||
if ( defined( 'IMAGETYPE_ICO' ) ) {
|
||||
$displayable_image_types[] = IMAGETYPE_ICO;
|
||||
}
|
||||
|
||||
$info = @getimagesize( $path );
|
||||
if ( empty( $info ) ) {
|
||||
$result = false;
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.0-alpha-42779';
|
||||
$wp_version = '5.0-alpha-42780';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
x
Reference in New Issue
Block a user