Changeset 48081
- Timestamp:
- 06/18/2020 02:43:31 PM (5 years ago)
- Location:
- trunk/src/wp-includes/sitemaps
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/sitemaps/class-wp-sitemaps-renderer.php
r48072 r48081 41 41 public function __construct() { 42 42 $stylesheet_url = $this->get_sitemap_stylesheet_url(); 43 43 44 if ( $stylesheet_url ) { 44 45 $this->stylesheet = '<?xml-stylesheet type="text/xsl" href="' . esc_url( $stylesheet_url ) . '" ?>'; 45 46 } 46 $stylesheet_index_url = $this->get_sitemap_index_stylesheet_url(); 47 48 $stylesheet_index_url = $this->get_sitemap_index_stylesheet_url(); 49 47 50 if ( $stylesheet_index_url ) { 48 51 $this->stylesheet_index = '<?xml-stylesheet type="text/xsl" href="' . esc_url( $stylesheet_index_url ) . '" ?>'; … … 161 164 _doing_it_wrong( 162 165 __METHOD__, 163 /* translators: %s: list of element names */164 166 sprintf( 167 /* translators: %s: List of element names. */ 165 168 __( 'Fields other than %s are not currently supported for the sitemap index.' ), 166 169 implode( ',', array( 'loc', 'lastmod' ) ) … … 226 229 _doing_it_wrong( 227 230 __METHOD__, 228 /* translators: %s: list of element names */229 231 sprintf( 232 /* translators: %s: List of element names. */ 230 233 __( 'Fields other than %s are not currently supported for sitemaps.' ), 231 234 implode( ',', array( 'loc', 'lastmod', 'changefreq', 'priority' ) ) -
trunk/src/wp-includes/sitemaps/class-wp-sitemaps-stylesheet.php
r48072 r48081 53 53 54 54 $text = sprintf( 55 /* translators: %s: number of URLs. */55 /* translators: %s: Number of URLs. */ 56 56 esc_xml( __( 'Number of URLs in this XML Sitemap: %s.' ) ), 57 57 '<xsl:value-of select="count( sitemap:urlset/sitemap:url )" />' … … 153 153 */ 154 154 public function get_sitemap_index_stylesheet() { 155 $css 156 $title 157 $description 158 $learn_more 155 $css = $this->get_stylesheet_css(); 156 $title = esc_xml( __( 'XML Sitemap' ) ); 157 $description = esc_xml( __( 'This XML Sitemap is generated by WordPress to make your content more visible for search engines.' ) ); 158 $learn_more = sprintf( 159 159 '<a href="%s">%s</a>', 160 160 esc_url( __( 'https://www.sitemaps.org/' ) ), … … 163 163 164 164 $text = sprintf( 165 /* translators: %s: number of URLs. */165 /* translators: %s: Number of URLs. */ 166 166 esc_xml( __( 'Number of URLs in this XML Sitemap: %s.' ) ), 167 167 '<xsl:value-of select="count( sitemap:sitemapindex/sitemap:sitemap )" />' -
trunk/src/wp-includes/sitemaps/class-wp-sitemaps.php
r48072 r48081 208 208 209 209 // 'pagename' is for most permalink types, name is for when the %postname% is used as a top-level field. 210 if ( 'sitemap-xml' === $query->get( 'pagename' ) || 211 'sitemap-xml' === $query->get( 'name' ) ) { 210 if ( 'sitemap-xml' === $query->get( 'pagename' ) 211 || 'sitemap-xml' === $query->get( 'name' ) 212 ) { 212 213 wp_safe_redirect( $this->index->get_index_url() ); 213 214 exit();
Note: See TracChangeset
for help on using the changeset viewer.