[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
This commit is contained in:
logmanoriginal 2018-06-24 10:52:00 +02:00
parent 01a2746715
commit 4a5f190e0e

View file

@ -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')) {