From 5f8f0033e06e399da67416b520caca45a7c4c2a2 Mon Sep 17 00:00:00 2001 From: Charles Johnson Date: Wed, 28 Nov 2012 17:54:55 -0600 Subject: [PATCH] Enclosures / Allow MediaRSS packages and other enclosures recognized by SimplePie to be pulled into gallery. --- fwp-sic-em/SicEm.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fwp-sic-em/SicEm.php b/fwp-sic-em/SicEm.php index cf2f6c7..60ca831 100644 --- a/fwp-sic-em/SicEm.php +++ b/fwp-sic-em/SicEm.php @@ -366,6 +366,13 @@ function process_post ($data, $post) { endforeach; endif; + $enclosures = $post->entry->get_enclosures(); + if (is_array($enclosures) and count($enclosures) > 0) : + foreach ($enclosures as $enclosure) : + $data['meta']['_syndicated_image_capture'][] = $enclosure->get_link(); + endforeach; + endif; + $thumb_id = $post->link->setting('featured image default', 'featured_image_default', NULL); if ($thumb_id) : $data['meta']['_thumbnail_id'] = $thumb_id;