WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Post Format Images in 3.6 (3 posts)

  1. Charles Frees-Melvin
    Member
    Posted 1 year ago #

    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; ?>
  2. winner001
    Member
    Posted 1 year ago #

    I think this look like a proper way to handle getting information from the post format boxes!

  3. There will be a way, Charles.

    get_post_format_meta() for one :)

Topic Closed

This topic has been closed to new replies.

About this Topic