From 8e468a9ca7fdf7c919aec2ef52249ddc5a21f72d Mon Sep 17 00:00:00 2001 From: Corentin Garcia Date: Fri, 15 Jun 2018 21:05:31 +0200 Subject: [PATCH] [SuperSmashBlogBridge] Added bridge (#716) --- bridges/SuperSmashBlogBridge.php | 45 ++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 bridges/SuperSmashBlogBridge.php diff --git a/bridges/SuperSmashBlogBridge.php b/bridges/SuperSmashBlogBridge.php new file mode 100644 index 0000000..06c58fc --- /dev/null +++ b/bridges/SuperSmashBlogBridge.php @@ -0,0 +1,45 @@ +'); + } else { + $picture = ''; + } + + $video = $article['acf']['link_url']; + if (strlen($video) != 0) { + $video = str_get_html('Youtube video'); + } else { + $video = ''; + } + $text = str_get_html($article['acf']['editor']); + $content = $picture . $video . $text; + + // Build final item + $item = array(); + $item['title'] = $article['title']['rendered']; + $item['timestamp'] = strtotime($article['date']); + $item['content'] = $content; + $item['uri'] = self::URI . '?post=' . $article['id']; + + $this->items[] = $item; + } + } +}