Skip to content

Commit c328bee

Browse files
fix: add fallback for media thumbnail retrieval
1 parent 0712c7e commit c328bee

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

includes/abstract/feedzy-rss-feeds-admin-abstract.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1767,6 +1767,13 @@ public function feedzy_retrieve_image( $item, $sc = null ) {
17671767
$the_thumbnail = $data['0']['attribs']['']['href'];
17681768
}
17691769
}
1770+
// xmlns:media thumbnail.
1771+
if ( empty( $the_thumbnail ) ) {
1772+
$data = $item->get_item_tags( 'http://search.yahoo.com/mrss/', 'thumbnail' );
1773+
if ( isset( $data['0']['data'] ) && ! empty( $data['0']['data'] ) ) {
1774+
$the_thumbnail = $data['0']['data'];
1775+
}
1776+
}
17701777
// Content image.
17711778
if ( empty( $the_thumbnail ) ) {
17721779
$feed_description = $item->get_content();

0 commit comments

Comments
 (0)