From 296518d73010c89884f52235b754666ed00144f5 Mon Sep 17 00:00:00 2001 From: Mateusz Hajdziony Date: Fri, 21 Oct 2016 16:52:50 +0200 Subject: [PATCH] Fix for items not being retired in non-incremental feeds WP_Query was used to query WP posts to mark them for retirement or process retirements. 'posts_per_page' was not specified so the default value was used (from Settings->Reading in WP admin), so only few first posts were retired, even though the feed might have more items removed from it. --- syndicatedlink.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/syndicatedlink.class.php b/syndicatedlink.class.php index b3676ce..281b7bb 100644 --- a/syndicatedlink.class.php +++ b/syndicatedlink.class.php @@ -268,6 +268,7 @@ function poll ($crash_ts = NULL) { 'ignore_sticky_posts' => true, 'meta_key' => 'syndication_feed_id', 'meta_value' => $this->id, + 'posts_per_page' => -1 )); foreach ($q->posts as $p) : update_post_meta($p->ID, '_feedwordpress_retire_me_'.$this->id, '1'); @@ -374,6 +375,7 @@ function process_retirements ($delta) { 'ignore_sticky_posts' => true, 'meta_key' => '_feedwordpress_retire_me_'.$this->id, 'meta_value' => '1', + 'posts_per_page' => -1 )); if ($q->have_posts()) : foreach ($q->posts as $p) :