Make WordPress Core

Ticket #33772: 33772.patch

File 33772.patch, 906 bytes (added by SteveHoneyNZ, 10 years ago)
  • wp-admin/includes/image.php

     
    275275                'shutter_speed' => 0,
    276276                'title' => '',
    277277                'orientation' => 0,
     278                'keywords' => array(),
    278279        );
    279280
    280281        /*
     
    323324
    324325                        if ( ! empty( $iptc['2#116'][0] ) ) // copyright
    325326                                $meta['copyright'] = trim( $iptc['2#116'][0] );
     327                               
     328                        if ( ! empty( $iptc['2#025'][0] ) ) // keywords array
     329                                $meta['keywords'] = array_values( $iptc['2#025'] );
    326330                 }
    327331        }
    328332
     
    413417         * @param string $file            Path to image file.
    414418         * @param int    $sourceImageType Type of image.
    415419         */
    416         return apply_filters( 'wp_read_image_metadata', $meta, $file, $sourceImageType );
     420        return apply_filters( 'wp_read_image_metadata', $meta, $iptc, $file, $sourceImageType );
    417421
    418422}
    419423