1
0
Fork 0
forked from blallo/rss-bridge

[WordPress] Fix site name on bridge content

This commit is contained in:
logmanoriginal 2016-08-04 21:56:11 +02:00
parent 870ef6f6fc
commit 7afee0e277

View file

@ -4,6 +4,7 @@ define('WORDPRESS_TYPE_RSS', 2); // Content is of type RSS
class WordPressBridge extends BridgeAbstract { class WordPressBridge extends BridgeAbstract {
private $url; private $url;
public $sitename; // Name of the site
public function loadMetadatas() { public function loadMetadatas() {
@ -74,7 +75,7 @@ class WordPressBridge extends BridgeAbstract {
$posts = $html->find('entry'); $posts = $html->find('entry');
if(!empty($posts) ) { if(!empty($posts) ) {
$this->name = $html->find('title', 0)->plaintext; $this->sitename = $html->find('title', 0)->plaintext;
$i=0; $i=0;
foreach ($posts as $article) { foreach ($posts as $article) {
@ -132,7 +133,7 @@ class WordPressBridge extends BridgeAbstract {
} }
public function getName() { public function getName() {
return "{$this->name} - Wordpress Bridge"; return "{$this->sitename} - Wordpress Bridge";
} }
public function getURI() { public function getURI() {