Changeset 651721
- Timestamp:
- 01/12/2013 08:44:01 PM (13 years ago)
- Location:
- image-metadata-cruncher/trunk
- Files:
-
- 2 edited
-
README.txt (modified) (2 diffs)
-
image-metadata-cruncher.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
image-metadata-cruncher/trunk/README.txt
r651258 r651721 5 5 Requires at least: 2.7 6 6 Tested up to: 3.5 7 Stable tag: 1. 37 Stable tag: 1.4 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.4 = 41 * Added keys **Image:basename**, **Image:filename** and **Image:extension**. 42 40 43 = 1.3 = 41 44 * Fixed broken links to plugin settings in the plugins page. -
image-metadata-cruncher/trunk/image-metadata-cruncher.php
r651258 r651721 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. 35 Version: 1.4 6 6 Author: Peter Hudec 7 7 Author URI: http://peterhudec.com … … 86 86 87 87 // get meta 88 $this->metadata = $this->extract_metadata( $file['tmp_name'] ); 88 89 $this->metadata = $this->extract_metadata( $file ); 89 90 90 91 // return untouched file … … 136 137 137 138 $this->metadata = array(); 138 139 139 140 // extract metadata from file 140 141 // the $meta variable will be populated with it 141 $size = getimagesize( $file, $meta ); 142 143 if ( $size ) { 144 $this->metadata['Image'] = $size; 145 } 142 $size = getimagesize( $file['tmp_name'], $meta ); 143 144 // extract pathinfo and merge with size 145 $this->metadata['Image'] = array_merge( $size, pathinfo( $file['name'] ) ); 146 147 // remove index 'dirname' 148 unset($this->metadata['Image']['dirname']); 146 149 147 150 // parse iptc … … 921 924 <br /> 922 925 926 <h2>Image:</h2> 927 <p> 928 Basic information related to the image file. 929 </p> 930 931 <div class="tag-list iptc"> 932 <?php 933 $image_keys = array('bits', 'channels', 'mime', 'basename', 'filename', 'extension'); 934 ?> 935 <?php foreach ( $image_keys as $value ): ?> 936 <span class="tag"> 937 <span class="first"> 938 <span class="prefix">Image</span><span class="colon">:</span><span class="part"><?php echo $value; ?></span> 939 </span> 940 </span> 941 <?php endforeach; ?> 942 </div> 943 <br /> 944 923 945 <h2>IPTC:</h2> 924 946 <p>
Note: See TracChangeset
for help on using the changeset viewer.