Timthumb in Contextual Related Posts & Top 10
<?php
/**
* Filter function to resize post thumbnail. Filters: crp_thumb_url.
*
* @since 1.8.4
*
* @param string $postimage
* @param string|int $thumb_width
* @param string|int $thumb_height
* @return object Post object
*/
function crp_scale_thumbs( $postimage, $thumb_width, $thumb_height, $post ) {
$timthumb = 'http://example.com/wp-content/timthumb';
return $timthumb . '/timthumb.php?src=' . urlencode( $postimage ) . '&w=' . $thumb_width . '&h=' . $thumb_height . '&zc=1&q=75';
}
add_filter( 'crp_thumb_url', 'crp_scale_thumbs', 10, 4 ); // Hook it to Contextual Related Posts
add_filter( 'tptn_thumb_url', 'crp_scale_thumbs', 10, 4 ); // Hook it to Top 10
?>