You appear to be a bot. Output may be restricted
Description
Build the <sitemap>
tag for a given URL.
Usage
$string = WPSEO_Sitemaps_Renderer::sitemap_index_url( $url );
Parameters
- $url
- ( array ) required – Array of parts that make up this entry.
Returns
string
Source
File name: wordpress-seo/inc/sitemaps/class-sitemaps-renderer.php
Lines:
1 to 17 of 17
protected function sitemap_index_url( $url ) { $date = null; if ( ! empty( $url['lastmod'] ) ) { $date = $this->date->format( $url['lastmod'] ); } $url['loc'] = htmlspecialchars( $url['loc'], ENT_COMPAT, $this->output_charset, false ); $output = "\t<sitemap>\n"; $output .= "\t\t<loc>" . $url['loc'] . "</loc>\n"; $output .= empty( $date ) ? '' : "\t\t<lastmod>" . htmlspecialchars( $date, ENT_COMPAT, $this->output_charset, false ) . "</lastmod>\n"; $output .= "\t</sitemap>\n"; return $output; }