mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-28 20:30:25 +02:00
[WordPress] Fix site name on bridge content
This commit is contained in:
@@ -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() {
|
||||||
|
Reference in New Issue
Block a user