// 2a. now check if the content is valid XML, and if so, what type...
if($type=$this->is_valid_xml($content)){
...
...
@@ -110,16 +116,21 @@ abstract class BFFFinder extends BFFFeed {
if(array_key_exists($type,$this->feed_types)){
$this->log('the content is of type "'.$this->feed_types[$type].'".');
$this->response['content_type']=$type;
$this->add_message('Found a supported feed!','Found a feed in '.
$this->feed_types[$type].' format, which we support, yay!','good');
$this->add_feed($url,$type);
returntrue;
}
$this->log('the content is XML, but not of a sort we support as a feed type');
$this->add_message('Found what <em>might</em> be a feed, but it\'s not one we support.','Found valid XML content, but not in a format we currently support...','neutral');
}else{
$this->log('the content isn\'t valid XML.');
}
// 2.b now check if the content is valid JSON...
if($type=$this->is_valid_json($content)){
$this->log('ok, found that it\'s in JSON format, so it\'s probably a feed.');
$this->add_message('Found what is <em>probably</em> a feed!','Found JSON content, so this is likely to be a feed.','good');
$this->add_feed($url,$type);
returntrue;
}
...
...
@@ -202,7 +213,7 @@ abstract class BFFFinder extends BFFFeed {