From 4a5f190e0e2dd83f89bf60a6c7598d6c64e4a5c3 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Sun, 24 Jun 2018 10:52:00 +0200 Subject: [PATCH] [FacebookBridge] Add option to skip reviews Reviews are provided the same way as summary posts and therefore returned as separate feed item for each review. This commit adds a new option '&skip_reviews=on' to skip reviews entirely. References #706 --- bridges/FacebookBridge.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bridges/FacebookBridge.php b/bridges/FacebookBridge.php index a5b328d..63c9346 100644 --- a/bridges/FacebookBridge.php +++ b/bridges/FacebookBridge.php @@ -23,6 +23,13 @@ class FacebookBridge extends BridgeAbstract { 'No Video' => 'novideo' ), 'defaultValue' => 'all' + ), + 'skip_reviews' => array( + 'name' => 'Skip reviews', + 'type' => 'checkbox', + 'required' => false, + 'defaultValue' => false, + 'title' => 'Feed includes reviews when checked' ) )); @@ -195,6 +202,12 @@ EOD; $posts = array($cell); } + // Optionally skip reviews + if($this->getInput('skip_reviews') + && !is_null($cell->find('#review_composer_container', 0))) { + continue; + } + foreach($posts as $post) { // Check media type switch($this->getInput('media_type')) {