PHP Code:
//remove class from the_post_thumbnail
function the_post_thumbnail_remove_class($output) {
$output = preg_replace('` class="(.*?)"`', '', $output);
return $output;
}
add_filter('the_post_thumbnail', 'the_post_thumbnail_remove_class');
This is racking my brains. Can you see anything wrong with my code? It doesn't work.