WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/17/2020 03:22:49 PM (5 months ago)
Author:
swissspidy
Message:

Sitemaps: Add XML sitemaps functionality to WordPress.

While web crawlers are able to discover pages from links within the site and from other sites, XML sitemaps supplement this approach by allowing crawlers to quickly and comprehensively identify all URLs included in the sitemap and learn other signals about those URLs using the associated metadata.

See https://make.wordpress.org/core/2020/06/10/merge-announcement-extensible-core-sitemaps/ for more details.

This feature exposes the sitemap index via /wp-sitemap.xml and exposes a variety of new filters and hooks for developers to modify the behavior. Users can disable sitemaps completely by turning off search engine visibility in WordPress admin.

This change also introduces a new esc_xml() function to escape strings for output in XML, as well as XML support to wp_kses_normalize_entities().

Props Adrian McShane, afragen, adamsilverstein, casiepa, flixos90, garrett-eclipse, joemcgill, kburgoine, kraftbj, milana_cap, pacifika, pbiron, pfefferle, Ruxandra Gradina, swissspidy, szepeviktor, tangrufus, tweetythierry.
Fixes #50117.
See #3670. See #19998.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-settings.php

    r47612 r48072  
    264264require ABSPATH . WPINC . '/rest-api/search/class-wp-rest-search-handler.php';
    265265require ABSPATH . WPINC . '/rest-api/search/class-wp-rest-post-search-handler.php';
     266require ABSPATH . WPINC . '/sitemaps.php';
     267require ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps.php';
     268require ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps-index.php';
     269require ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps-provider.php';
     270require ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps-registry.php';
     271require ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps-renderer.php';
     272require ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps-stylesheet.php';
     273require ABSPATH . WPINC . '/sitemaps/providers/class-wp-sitemaps-posts.php';
     274require ABSPATH . WPINC . '/sitemaps/providers/class-wp-sitemaps-taxonomies.php';
     275require ABSPATH . WPINC . '/sitemaps/providers/class-wp-sitemaps-users.php';
    266276require ABSPATH . WPINC . '/class-wp-block-type.php';
    267277require ABSPATH . WPINC . '/class-wp-block-styles-registry.php';
Note: See TracChangeset for help on using the changeset viewer.