Add (political checks)
This commit is contained in:
@@ -147,6 +147,28 @@ public static function handle(int $rss_post_id)
|
||||
$rss_post->status = 'published';
|
||||
}
|
||||
|
||||
if (!$rss_post->status != 'blocked')
|
||||
{
|
||||
if (isset($post_meta_response->output->is_ai_or_tech_news))
|
||||
{
|
||||
if ($post_meta_response->output->is_ai_or_tech_news != true)
|
||||
{
|
||||
$rss_post->status = 'blocked';
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isset($post_meta_response->output->is_government_or_political_news))
|
||||
{
|
||||
if($post_meta_response->output->is_ai_or_tech_news == true)
|
||||
{
|
||||
$rss_post->status = 'blocked';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($rss_post->save()) {
|
||||
|
||||
if ($rss_post->status == 'published') {
|
||||
|
||||
Reference in New Issue
Block a user