getType()) == 'atom') { return; // RSS 2.0 only } $this->_setCommentFeedLinks($this->_dom, $this->_base); if ($this->_called) { $this->_appendNamespaces(); } } /** * Append entry namespaces * * @return void */ protected function _appendNamespaces() { $this->getRootElement()->setAttribute('xmlns:wfw', 'http://wellformedweb.org/CommentAPI/'); } /** * Set entry comment feed links * * @param DOMDocument $dom * @param DOMElement $root * @return void */ protected function _setCommentFeedLinks(DOMDocument $dom, DOMElement $root) { $links = $this->getDataContainer()->getCommentFeedLinks(); if (!$links || empty($links)) { return; } foreach ($links as $link) { if ($link['type'] == 'rss') { $flink = $this->_dom->createElement('wfw:commentRss'); $text = $dom->createTextNode($link['uri']); $flink->appendChild($text); $root->appendChild($flink); } } $this->_called = true; } }