getType()) == 'atom') { return; // RSS 2.0 only } $this->_appendNamespaces(); $this->_setCommentFeedLinks($this->_dom, $this->_base); } protected function _appendNamespaces() { $this->getRootElement()->setAttribute('xmlns:wfw', 'http://wellformedweb.org/CommentAPI/'); } 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'); $flink->nodeValue = $link['uri']; $root->appendChild($flink); } } } }