Hi Labs64,
I used the above information to retrieve the credit tracker author and source. But after I upgraded the plugin to the latest version, it doesn’t work anymore.
I used this code in the functions.php – has there been any changes?
Regards
// Thumbnail Caption
function monahans_thumbnail_caption($html, $post_id, $post_thumbnail_id, $size, $attr)
{
$attachment =& get_post($post_thumbnail_id);
// post_title => image title
// post_excerpt => image caption
// post_content => image description
if ($attachment->post_excerpt || $attachment->post_content) {
$html .= '<p class="thumbcaption">';
if ($attachment->post_excerpt) {
$html .= '<span class="captitle">'.wptexturize(get_post_meta(get_post_thumbnail_id($post->ID),'credit-tracker-author',true)).'</span> ';
}
$html .= "?".wptexturize(get_post_meta(get_post_thumbnail_id($post->ID),'credit-tracker-source',true))."/".wptexturize(get_post_meta(get_post_thumbnail_id($post->ID),'credit-tracker-author',true)).'</p>';
}
return $html;
}
add_action('post_thumbnail_html', 'monahans_thumbnail_caption', null, 5);