jarednova/timber — pull request #168 by jnweaver (2014-03-10 21:47:45+00:00)
Title: Add alt property to TimberImage

This adds an alt property to TimberImage that follows Wordpress' logic for determining the alt text of an image. In order of precedence, alt text is determined by: Alternative Text field, Caption field (post_excerpt), Title (post_title).

This would add another query for each TimberImage, however, because Wordpress stores the Alternative Text value in wp_postmeta.

But it would be nice to easily reference the alt text value for an image as, e.g. post.thumbnail.alt

(This is just my third pull request and first time writing a phpunit test; it's possible I overlooked something.)

Thanks for considering!