Skip to content

@shawnsandy /default_thumbnail.php
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
How to define a default post thumbnail....
function default_thumbnail($html) {
global $_wp_additional_image_sizes;
$isize = $_wp_additional_image_sizes;
$w = $isize['post-thumbnail']['width'];
$h = $isize['post-thumbnail']['height'];
if (empty($html)) {
$html = '<figure class="default-post-thumbnail">';
$html .= '<img src="http://placehold.it/'.$w.'x'.$h.'" alt="" />';
$html .='</figure>';
}
return $html;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.