Changeset 6313 for trunk/wp-admin/includes/upload.php
- Timestamp:
- 11/05/2007 12:01:26 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/upload.php
r6235 r6313 16 16 if ( isset($attachment_data['width']) ) 17 17 list($width,$height) = wp_shrink_dimensions($attachment_data['width'], $attachment_data['height'], 171, 128); 18 // check for extended metadata from exif/iptc 19 if ( !isset($attachment_data['image_meta']) && $is_image ) { 20 $image_meta = wp_read_image_meta( $filesystem_path ); 21 $attachment_data['image_meta'] = $image_meta; 22 wp_update_attachment_metadata( $id, $attachment_data ); 23 } 18 24 19 25 $post_title = attribute_escape( the_title( '', '', false ) ); … … 164 170 <td><textarea name="post_content" id="post_content"><?php echo $attachment->post_content; ?></textarea></td> 165 171 </tr> 172 <?php if (isset($attachment_data['image_meta'])) { ?> 173 <tr> 174 <th scope="row"><label for="url"><?php _e('Aperture'); ?></label></th> 175 <td>f/<?php echo $attachment_data['image_meta']['aperture']; ?></td> 176 </tr> 177 <tr> 178 <th scope="row"><label for="url"><?php _e('Credit'); ?></label></th> 179 <td><?php echo $attachment_data['image_meta']['credit']; ?></td> 180 </tr> 181 <tr> 182 <th scope="row"><label for="url"><?php _e('Camera'); ?></label></th> 183 <td><?php echo $attachment_data['image_meta']['camera']; ?></td> 184 </tr> 185 <tr> 186 <th scope="row"><label for="url"><?php _e('Created'); ?></label></th> 187 <td><?php echo date_i18n(get_option('date_format').' '.get_option('time_format'), $attachment_data['image_meta']['created_timestamp']); ?></td> 188 </tr> 189 <tr> 190 <th scope="row"><label for="url"><?php _e('Copyright'); ?></label></th> 191 <td><?php echo $attachment_data['image_meta']['copyright']; ?></td> 192 </tr> 193 <tr> 194 <th scope="row"><label for="url"><?php _e('Focal Length'); ?></label></th> 195 <td><?php echo $attachment_data['image_meta']['focal_length']; ?>mm</td> 196 </tr> 197 <tr> 198 <th scope="row"><label for="url"><?php _e('ISO'); ?></label></th> 199 <td><?php echo $attachment_data['image_meta']['iso']; ?></td> 200 </tr> 201 <tr> 202 <th scope="row"><label for="url"><?php _e('Shutter Speed'); ?></label></th> 203 <td><?php $secs = $attachment_data['image_meta']['shutter_speed']; 204 echo ($secs > 0.0 and $secs < 1.0) ? ("1/" . round(1/$secs)) : ($secs); ?>s</td> 205 </tr> 206 <tr> 207 <th scope="row"><label for="url"><?php _e('Title'); ?></label></th> 208 <td><?php echo $attachment_data['image_meta']['title']; ?></td> 209 </tr> 210 <?php } ?> 166 211 <tr id="buttons" class="submit"> 167 212 <td colspan='2'>
Note: See TracChangeset
for help on using the changeset viewer.