Make WordPress Core


Ignore:
Timestamp:
03/05/2018 01:02:20 AM (7 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

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

    r42449 r42780  
    557557    $displayable_image_types = array( IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG, IMAGETYPE_BMP );
    558558
     559    // IMAGETYPE_ICO is only defined in PHP 5.3+.
     560    if ( defined( 'IMAGETYPE_ICO' ) ) {
     561        $displayable_image_types[] = IMAGETYPE_ICO;
     562    }
     563
    559564    $info = @getimagesize( $path );
    560565    if ( empty( $info ) ) {
Note: See TracChangeset for help on using the changeset viewer.