bigspring / monolith

A starter theme for WordPress built with Twitter Bootstrap
MIT License
9 stars 1 forks source link

Snippet featured images #376

Closed dmseaton closed 8 years ago

dmseaton commented 8 years ago

@juliotaylor @jrgmartin

See this line - having a check for _has_postthumbnail makes the_monolith_post_thumbnail() completely pointless (as the purpose of that function is to provide a fallback image when there is no post thumbnail).

I'd recommend we remove the _has_postthumbnail check personally, as a fallback image is usually useful.

juliotaylor commented 8 years ago

agree, but the wrapping markup is quite important. can it be put into the function instead? or better still, can the thumbnail function use a molecule for layout?

cc @harrybigspring

dmseaton commented 8 years ago

The function is for utility and so should do one discrete task well, in this case returning image tag markup - adding wrapping markup to its output makes assumptions that restrict where it can be used.

The wrapping markup doesn't need to be removed - the _hasimage Builder argument handles whether or not an image needs to be shown.

juliotaylor commented 8 years ago

but without the check, the wrapping markup would remain should the image not load

dmseaton commented 8 years ago

The image will always load, because if there's no thumbnail the fallback image (in assets/img/) will be used instead.

juliotaylor commented 8 years ago

OK FINE. GOSH.

gosh

dmseaton commented 8 years ago

VICTORY