From cd5f3e740a55d948d1e664537e7046d3cb8d9b97 Mon Sep 17 00:00:00 2001 From: Mitsukarenai Date: Tue, 2 Aug 2016 17:48:57 +0200 Subject: [PATCH] [Wordpress] Add a div class commonly used for post content --- bridges/WordPressBridge.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bridges/WordPressBridge.php b/bridges/WordPressBridge.php index b437b02..7a1b12e 100644 --- a/bridges/WordPressBridge.php +++ b/bridges/WordPressBridge.php @@ -57,6 +57,8 @@ class WordPressBridge extends BridgeAbstract { $article_html = $this->file_get_html($this->items[$i]->uri); $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)) $this->items[$i]->content = clearContent($article_html->find('.post', 0)->innertext); // for old WordPress themes without HTML5