public function custom ()
	{
		$this->_createDocument();
		$sitemapData = $this->getSitemap();

		if (!array_key_exists('customUrls', $sitemapData))
			return $this->_document->saveXML();

		foreach ($sitemapData['customUrls'] as $custom) if ($custom->enabled)
		{
			$url = $this->_document->createElement('url');
			$loc = $this->_document->createElement(
				'loc',
				UrlHelper::url($custom->url)
			);
			$frequency = $this->_document->createElement(
				'changefreq',
				$custom->frequency
			);
			$priority = $this->_document->createElement(
				'priority',
				$custom->priority
			);

			$url->appendChild($loc);
			$url->appendChild($frequency);
			$url->appendChild($priority);

			$this->_urlSet->appendChild($url);
		}

		return $this->_document->saveXML();
	}
public function custom ()
	{
		$this->_createDocument();
		$sitemapData = $this->getSitemap();

		if (!array_key_exists('customUrls', $sitemapData))
			return $this->_document->saveXML();

		foreach ($sitemapData['customUrls'] as $custom) if ($custom->enabled)
		{
			$url = $this->_document->createElement('url');
			$loc = $this->_document->createElement(
				'loc',
				UrlHelper::url($custom->url)
			);
			$frequency = $this->_document->createElement(
				'changefreq',
				$custom->frequency
			);
			$priority = $this->_document->createElement(
				'priority',
				$custom->priority
			);

			$url->appendChild($loc);
			$url->appendChild($frequency);
			$url->appendChild($priority);

			$this->_urlSet->appendChild($url);
		}

		return $this->_document->saveXML();
	}
public function custom ( ) { $ this -> _createDocument ( ) ; $ sitemapData = $ this -> getSitemap ( ) ; if ( ! array_key_exists ( 'customUrls' , $ sitemapData ) ) return $ this -> _document -> saveXML ( ) ; foreach ( $ sitemapData [ 'customUrls' ] as $ custom ) if ( $ custom -> enabled ) { $ url = $ this -> _document -> createElement ( 'url' ) ; $ loc = $ this -> _document -> createElement ( 'loc' , UrlHelper :: url ( $ custom -> url ) ) ; $ frequency = $ this -> _document -> createElement ( 'changefreq' , $ custom -> frequency ) ; $ priority = $ this -> _document -> createElement ( 'priority' , $ custom -> priority ) ; $ url -> appendChild ( $ loc ) ; $ url -> appendChild ( $ frequency ) ; $ url -> appendChild ( $ priority ) ; $ this -> _urlSet -> appendChild ( $ url ) ; } return $ this -> _document -> saveXML ( ) ; }
-------------------------------------------------------------------------
-------------------------------------------------------------------------