forked from blallo/rss-bridge
[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:
parent
01a2746715
commit
4a5f190e0e
1 changed files with 13 additions and 0 deletions
|
@ -23,6 +23,13 @@ class FacebookBridge extends BridgeAbstract {
|
||||||
'No Video' => 'novideo'
|
'No Video' => 'novideo'
|
||||||
),
|
),
|
||||||
'defaultValue' => 'all'
|
'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);
|
$posts = array($cell);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Optionally skip reviews
|
||||||
|
if($this->getInput('skip_reviews')
|
||||||
|
&& !is_null($cell->find('#review_composer_container', 0))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
foreach($posts as $post) {
|
foreach($posts as $post) {
|
||||||
// Check media type
|
// Check media type
|
||||||
switch($this->getInput('media_type')) {
|
switch($this->getInput('media_type')) {
|
||||||
|
|
Loading…
Reference in a new issue