Please register or sign in to comment
Changing line 31 from
$img = $item->link[2]['href'];
to
$img = $item->xpath('*[@rel="enclosure"]');
if ( is_array( $img ) && count( $img ) > 0 ) {
$img = $img[0]['href'];
}
should embed media in more cases
isn't the $i++ better placed inside the block where the type is checked, so that it's the actual number of toots instead of any activity ? (comment, status change, ...)
Thank you @zeograd ! I updated the page. It works perfect now!