/** * Import any WP post meta tags * @param Article $article * @param SimpleXMLElement $item * @return array */ public function importTags(Article $article, SimpleXMLElement $item) { $tags = array(); if (empty($item->category)) { return; } foreach ($item->category as $category) { if (empty($category['domain'])) { continue; } if ($category['domain'] == 'post_tag') { $tags[] = (string) $category; } } $article->setTVValue('articlestags', implode(',', $tags)); return $tags; }
/** * Import any WP post meta tags * @param Article $article * @param SimpleXMLElement $entry * @return array */ public function importTags(Article $article, SimpleXMLElement $entry) { $tags = array(); if (empty($entry->category)) { return; } foreach ($entry->category as $category) { if (empty($category['scheme']) || $category['scheme'] != 'http://www.blogger.com/atom/ns#') { continue; } $tags[] = $category['term']; } if (!$this->debug) { $article->setTVValue('articlestags', implode(',', $tags)); } return $tags; }