Closed dmseaton closed 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
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.
but without the check, the wrapping markup would remain should the image not load
The image will always load, because if there's no thumbnail the fallback image (in assets/img/) will be used instead.
OK FINE. GOSH.
VICTORY
@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.