Skip to content

Instantly share code, notes, and snippets.

@jeremyfelt
Created April 4, 2012 22:42
Show Gist options
  • Save jeremyfelt/2306214 to your computer and use it in GitHub Desktop.
Save jeremyfelt/2306214 to your computer and use it in GitHub Desktop.
Resize the blogroll images
<?php
add_filter( 'get_bookmarks', 'prefix_resize_blogroll_images' );
function prefix_resize_blogroll_images( $output ) {
for ( $i = 0, $total = sizeof( $output ); $i < $total; $i++ ) {
if ( 'http' == substr( $output[ $i ]->link_image, 0, 4 ) )
$output[ $i ]->link_image = wpcom_vip_get_resized_remote_image_url( $output[ $i ]->link_image, 72, 51, false );
else
$output[ $i ]->link_image = '';
}
return $output;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment