Update (rss): block links that have less then 250 words
This commit is contained in:
@@ -18,6 +18,14 @@ public static function handle(int $rss_post_id)
|
||||
return;
|
||||
}
|
||||
|
||||
if (count_words($rss_post->body) < 250)
|
||||
{
|
||||
$rss_post->status = 'blocked';
|
||||
$rss_post->save();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (in_array($rss_post->status, ['blocked', 'trashed'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user