[FacebookBridge] Add option to hide posts with facebook videos
This adds a new option 'novideo' that can be set to 'on' or 'off' in order to skip posts that include facebook videos (does not work for linked videos like YouTube). This option is 'off' by default. References #533
This commit is contained in:
parent
7dda088b3f
commit
fa2df09b1b
1 changed files with 10 additions and 0 deletions
|
@ -12,6 +12,12 @@ class FacebookBridge extends BridgeAbstract {
|
||||||
'u' => array(
|
'u' => array(
|
||||||
'name' => 'Username',
|
'name' => 'Username',
|
||||||
'required' => true
|
'required' => true
|
||||||
|
),
|
||||||
|
'novideo' => array(
|
||||||
|
'name' => 'No Videos',
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'required' => false,
|
||||||
|
'title' => 'Activate to remove posts including (facebook) videos'
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -190,6 +196,10 @@ EOD;
|
||||||
|
|
||||||
foreach($posts as $post){
|
foreach($posts as $post){
|
||||||
|
|
||||||
|
// (optionally) skip posts that include facebook videos
|
||||||
|
if($this->getInput('novideo') && !empty($post->find('[aria-label=Video]')))
|
||||||
|
continue;
|
||||||
|
|
||||||
$item = array();
|
$item = array();
|
||||||
|
|
||||||
if(count($post->find('abbr')) > 0){
|
if(count($post->find('abbr')) > 0){
|
||||||
|
|
Loading…
Reference in a new issue