Created
April 4, 2012 22:42
-
-
Save jeremyfelt/2306214 to your computer and use it in GitHub Desktop.
Resize the blogroll images
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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