From fad33a77818396adc280a6971d7840f344937fe4 Mon Sep 17 00:00:00 2001 From: Robin Cornett Date: Thu, 9 Apr 2015 22:46:15 -0400 Subject: [PATCH] change filter calls for feed --- includes/class-displayfeaturedimagegenesis-rss.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/includes/class-displayfeaturedimagegenesis-rss.php b/includes/class-displayfeaturedimagegenesis-rss.php index 6cf57ce..5eb857b 100644 --- a/includes/class-displayfeaturedimagegenesis-rss.php +++ b/includes/class-displayfeaturedimagegenesis-rss.php @@ -28,14 +28,15 @@ class Display_Featured_Image_Genesis_RSS { return; } - //* if the feed is full text, filter the content + // if the feed is summary, filter the excerpt + $which_filter = 'the_excerpt_rss'; + $priority = 1000; + // if the feed is full text, filter the content if ( '0' === $rss_option ) { - add_filter( 'the_content_feed', array( $this, 'add_image_to_feed' ), 15 ); - } - //* if the feed is summaries, filter the excerpt, not the content - else { - add_filter( 'the_excerpt_rss', array( $this, 'add_image_to_feed' ), 1000, 1 ); + $which_filter = 'the_content_feed'; + $priority = 15; } + add_filter( $which_filter, array( $this, 'add_image_to_feed' ), $priority ); }