1
0
Fork 0
forked from blallo/rss-bridge

[Wordpress] Add a div class commonly used for post content

This commit is contained in:
Mitsukarenai 2016-08-02 17:48:57 +02:00
parent 3a0675364f
commit cd5f3e740a

View file

@ -57,6 +57,8 @@ class WordPressBridge extends BridgeAbstract {
$article_html = $this->file_get_html($this->items[$i]->uri); $article_html = $this->file_get_html($this->items[$i]->uri);
$this->items[$i]->content = clearContent($article_html->find('article', 0)->innertext); $this->items[$i]->content = clearContent($article_html->find('article', 0)->innertext);
if(empty($this->items[$i]->content))
$this->items[$i]->content = clearContent($article_html->find('.single-content', 0)->innertext); // another common content div
if(empty($this->items[$i]->content)) if(empty($this->items[$i]->content))
$this->items[$i]->content = clearContent($article_html->find('.post', 0)->innertext); // for old WordPress themes without HTML5 $this->items[$i]->content = clearContent($article_html->find('.post', 0)->innertext); // for old WordPress themes without HTML5