maintainer = "aledeg";
$this->name = "Wordpress Bridge";
$this->uri = "https://wordpress.org/";
$this->description = "Returns the 3 newest full posts of a Wordpress blog";
$this->parameters[] = array(
'url'=>array(
'name'=>'Blog URL',
'required'=>true
)
);
}
// Returns the content type for a given html dom
private function DetectContentType($html){
if($html->find('entry'))
return WORDPRESS_TYPE_ATOM;
if($html->find('item'))
return WORDPRESS_TYPE_RSS;
return WORDPRESS_TYPE_ATOM; // Make ATOM default
}
// Replaces all 'link' tags with 'url' for simplehtmldom to actually find 'links' ('url')
private function ReplaceLinkTagsWithUrlTags($element){
// We need to fix the 'link' tag as simplehtmldom cannot parse it (just rename it and load back as dom)
$element_text = $element->outertext;
$element_text = str_replace('', '', $element_text);
$element_text = str_replace('', '', $element_text);
$element_text = str_replace('', '', $string);
return $string;
}
private function ClearContent($content) {
$content = preg_replace('/