Changeset 652940
- Timestamp:
- 01/15/2013 12:35:50 PM (13 years ago)
- Location:
- image-metadata-cruncher/trunk
- Files:
-
- 2 edited
-
README.txt (modified) (2 diffs)
-
image-metadata-cruncher.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
image-metadata-cruncher/trunk/README.txt
r651721 r652940 5 5 Requires at least: 2.7 6 6 Tested up to: 3.5 7 Stable tag: 1. 47 Stable tag: 1.5 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 38 38 == Changelog == 39 39 40 = 1.5 = 41 * Fixed a bug which threw an exif_read_data() warning introduced by previous update. 42 40 43 = 1.4 = 41 44 * Added keys **Image:basename**, **Image:filename** and **Image:extension**. -
image-metadata-cruncher/trunk/image-metadata-cruncher.php
r651721 r652940 3 3 Plugin Name: Image Metadata Cruncher 4 4 Description: Gives you ultimate controll over which image metadata (EXIF or IPTC) WordPress extracts from an uploaded image and where and in what form it then goes. You can even specify unlimited custom post meta tags as the target of the extracted image metadata. 5 Version: 1. 45 Version: 1.5 6 6 Author: Peter Hudec 7 7 Author URI: http://peterhudec.com … … 22 22 private $pattern; 23 23 public $plugin_name = 'Image Metadata Cruncher'; 24 private $version = 1. 3;24 private $version = 1.5; 25 25 private $after_update = FALSE; 26 26 private $settings_slug = 'image_metadata_cruncher-options'; … … 192 192 ); 193 193 194 194 195 if ( in_array( $size['mime'], $safe_file_formats ) ) { 196 197 $exif = exif_read_data( $file['tmp_name'] ); 195 198 196 $exif = exif_read_data( $file ); 197 // add named copies of UndefinedTag:0x0000 items to $exif array 198 foreach ( $exif as $key => $value ) { 199 // check case insensitively if key begins with "UndefinedTag:" 200 if ( strtolower( substr( $key, 0, 13 ) ) == 'undefinedtag:' ) { 201 // get EXIF tag name by ID and convert it to base 16 integer 202 $id = intval( substr( $key, 13 ), 16 ); 203 204 if ( isset( $this->EXIF_MAPPING[ $id ] ) ) { 205 // create copy with EXIF tag name as key 206 $name = $this->EXIF_MAPPING[ $id ]; 207 //$exif[ $name ] = $value; 208 $this->insert_next_to_key( $exif, $key, array( $name => $value ) ); 199 if ( is_array( $exif ) ) { 200 // add named copies of UndefinedTag:0x0000 items to $exif array 201 foreach ( $exif as $key => $value ) { 202 // check case insensitively if key begins with "UndefinedTag:" 203 if ( strtolower( substr( $key, 0, 13 ) ) == 'undefinedtag:' ) { 204 // get EXIF tag name by ID and convert it to base 16 integer 205 $id = intval( substr( $key, 13 ), 16 ); 206 207 if ( isset( $this->EXIF_MAPPING[ $id ] ) ) { 208 // create copy with EXIF tag name as key 209 $name = $this->EXIF_MAPPING[ $id ]; 210 //$exif[ $name ] = $value; 211 $this->insert_next_to_key( $exif, $key, array( $name => $value ) ); 212 } 209 213 } 210 214 } 211 215 } 216 212 217 } 213 218
Note: See TracChangeset
for help on using the changeset viewer.