Skip to content

Instantly share code, notes, and snippets.

@CBeloch
Created June 10, 2013 06:12
Show Gist options
  • Save CBeloch/5746831 to your computer and use it in GitHub Desktop.
Save CBeloch/5746831 to your computer and use it in GitHub Desktop.
Fix for the following Wordpress plugin: http://wordpress.org/plugins/wp-rss-images/
if($enclosure){ // this is Line 78
list($width, $height, $type, $attr) = getimagesize($url);
echo '<enclosure url="' . $image_url . '" length="' . $filesize . '" type="'.image_type_to_mime_type($type).'" />';
}
if($media){
list($width, $height, $type, $attr) = getimagesize($url);
echo '<media:content url="'.$image_url.'" width="'.$width.'" height="'.$height.'" medium="image" type="'.image_type_to_mime_type($type).'" />';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment