getType()) == 'atom') { return; // RSS 2.0 only } $this->_setCommentFeedLinks($this->dom, $this->base); if ($this->called) { $this->_appendNamespaces(); } } /** * Append entry namespaces * * @return void */ // @codingStandardsIgnoreStart protected function _appendNamespaces() { // @codingStandardsIgnoreEnd $this->getRootElement()->setAttribute( 'xmlns:wfw', 'http://wellformedweb.org/CommentAPI/' ); } /** * Set entry comment feed links * * @param DOMDocument $dom * @param DOMElement $root * @return void */ // @codingStandardsIgnoreStart protected function _setCommentFeedLinks(DOMDocument $dom, DOMElement $root) { // @codingStandardsIgnoreEnd $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; } }