Make WordPress Core

Ticket #31043: 31043.patch

File 31043.patch, 729 bytes (added by tyxla, 11 years ago)

This is correct - EXIF Title indeed appears to not exist, which makes this piece of code unusable. I suggest that we should remove it as unnecessary. Also, nothing further should be done, as in the lines below, EXIF ImageDescription will be set as title (if not longer than 80 characters). Submitting a patch with the removed code.

  • src/wp-admin/includes/image.php

     
    338338        if ( is_callable( 'exif_read_data' ) && in_array( $sourceImageType, apply_filters( 'wp_read_image_metadata_types', array( IMAGETYPE_JPEG, IMAGETYPE_TIFF_II, IMAGETYPE_TIFF_MM ) ) ) ) {
    339339                $exif = @exif_read_data( $file );
    340340
    341                 if ( empty( $meta['title'] ) && ! empty( $exif['Title'] ) ) {
    342                         $meta['title'] = trim( $exif['Title'] );
    343                 }
    344 
    345341                if ( ! empty( $exif['ImageDescription'] ) ) {
    346342                        mbstring_binary_safe_encoding();
    347343                        $description_length = strlen( $exif['ImageDescription'] );