Post Format Images in 3.6
-
Does this look like a proper way to handle getting information from the post format boxes, or will there be a future function.
<?php if ( get_post_meta($post->ID, '_wp_format_image', true) ) : $imgmeta = wp_get_attachment_metadata( get_post_meta( $id , '_wp_format_image', true) ); echo "<ul>\n"; echo "<li>Dimensions: " . $imgmeta['width']." x ".$imgmeta['height']."</li>\n"; echo "<li>Aperture: f/" . $imgmeta['image_meta']['aperture']."</li>\n"; echo "<li>Camera: " . $imgmeta['image_meta']['camera']."</li>\n"; echo "<li>Date Taken: " . date("d-m-Y H:i", $imgmeta['image_meta']['created_timestamp'])."</li>\n"; echo "<li>Focal Length: " . $imgmeta['image_meta']['focal_length']."mm</li>\n"; echo "<li>ISO: " . $imgmeta['image_meta']['iso']."</li>\n"; echo "<li>Shutter Speed: " . number_format($imgmeta['image_meta']['shutter_speed'],2)." seconds</li>\n"; echo "</ul>\n"; echo ""; endif; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Post Format Images in 3.6’ is closed to new replies.