wordpress-develop/tests/phpunit/tests
Pascal Birchler b58973554d 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@48072 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-17 15:22:49 +00:00
..
actions Code is Poetry. 2017-11-30 23:09:33 +00:00
admin Editor: Fix code style for constructor arguments added in [47875]. 2020-06-01 16:25:18 +00:00
ajax I18N: Remove the "Error:" prefix from error messages. 2020-06-16 15:33:37 +00:00
attachment Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
blocks Editor: Ensure latest comments can only be viewed from public posts. 2020-06-10 19:18:50 +00:00
bookmark Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
canonical Sitemaps: Add XML sitemaps functionality to WordPress. 2020-06-17 15:22:49 +00:00
category Menus: In Walker_Nav_Menu, Walker_Category, and Walker_Page, properly output link attributes having a legitimate "empty" value, for example an HTML data attribute with a value of zero (0). 2019-10-06 15:04:18 +00:00
comment Comments: Ensure all elements in the array returned by get_comment_count() are integers. 2020-03-28 20:42:31 +00:00
customize Menus: Allow empty taxonomy terms to be surfaced when searching for items. 2020-05-02 22:34:50 +00:00
date Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
db Database: Introduce wpdb::db_server_info() to retrieve full MySQL server information string as supplied by mysqli_get_server_info(). 2020-03-12 15:53:01 +00:00
dependencies Scripts: Use core-js url as polyfill for window.URL. 2020-03-03 16:53:32 +00:00
editor Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
error-protection Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
external-http Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
feed Code Modernization: Replace dirname( __FILE__ ) calls with __DIR__ magic constant. 2020-02-06 06:31:22 +00:00
filesystem Code Modernization: Replace dirname( __FILE__ ) calls with __DIR__ magic constant. 2020-02-06 06:31:22 +00:00
formatting Sitemaps: Add XML sitemaps functionality to WordPress. 2020-06-17 15:22:49 +00:00
functions Coding Standards: Rename some files and classes in phpunit/tests/functions/ per the naming conventions. 2020-05-10 12:07:49 +00:00
general Tests: Rename $d variable in some date/time tests to $format for clarity. 2020-02-14 00:11:00 +00:00
hooks Code Modernisation: Introduce the spread operator in tests/phpunit/*. 2019-09-15 11:03:45 +00:00
http Code Modernization: Replace dirname( __FILE__ ) calls with __DIR__ magic constant. 2020-02-06 06:31:22 +00:00
image Code Modernization: Replace dirname( __FILE__ ) calls with __DIR__ magic constant. 2020-02-06 06:31:22 +00:00
import Comments: Ensure all elements in the array returned by get_comment_count() are integers. 2020-03-28 20:42:31 +00:00
includes Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
l10n Tests: Change a few remaining include_once statements to require_once, for consistency. 2020-02-06 21:40:05 +00:00
link Canonical: Redirect paged requests for non-paginated posts to the post permalink. 2020-04-30 12:03:11 +00:00
load Bootstrap: Enhance core's memory limit handling. 2016-07-08 14:36:37 +00:00
media Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
menu Menus: Allow empty taxonomy terms to be surfaced when searching for items. 2020-05-02 22:34:50 +00:00
meta Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
multisite Networks and Sites: Don't unnecessarily switch to the current blog in get_blog_details(). 2020-06-15 12:29:13 +00:00
oembed Embeds: Ensure that the title attribute is set correctly on embeds. 2020-06-10 16:34:18 +00:00
option Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
pomo Code Modernization: Replace dirname( __FILE__ ) calls with __DIR__ magic constant. 2020-02-06 06:31:22 +00:00
post Themes: Add additional later escaping to post_class() and body_class() functions. 2020-06-16 16:55:45 +00:00
privacy Privacy: Introduce filters for the headers of all the privacy-related e-mails: 2020-02-11 21:41:26 +00:00
query Code Modernization: Replace dirname( __FILE__ ) calls with __DIR__ magic constant. 2020-02-06 06:31:22 +00:00
rest-api REST API: Only register one block renderer route. 2020-06-17 03:20:02 +00:00
rewrite Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
sitemaps Sitemaps: Add XML sitemaps functionality to WordPress. 2020-06-17 15:22:49 +00:00
taxonomy Tests: Add missing parent::setUp() calls to all test classes. 2019-01-14 04:54:01 +00:00
term Code Standards: Clean up whitespace on the end of a file. 2020-05-29 23:34:00 +00:00
theme REST API: Add additional fields to the themes controller. 2020-06-07 06:44:08 +00:00
url Privacy: Introduce Privacy Policy page helpers: 2019-03-21 19:47:29 +00:00
user Posts, Post Types: Ensure delete_posts is included in default post type capabilities regardless of map_meta_cap value. 2020-02-25 12:48:11 +00:00
widgets Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
xmlrpc Tests: Adjust XML-RPC unit tests for [47160]. 2020-02-02 04:07:50 +00:00
actions.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
adminbar.php Code Modernization: Replace dirname( __FILE__ ) calls with __DIR__ magic constant. 2020-02-06 06:31:22 +00:00
auth.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
avatar.php Media: Enable lazy-loading of images by automatically adding the new loading="lazy" attribute to image tags on the front-end. 2020-04-08 00:53:18 +00:00
basic.php Tests: Add a unit test to ensure the "Supported Versions" section of GitHub Security Policy always includes the latest stable branch. 2020-03-02 01:11:29 +00:00
cache.php Coding Standards: Cleans up some PHPCS issues introduced in [47938]. 2020-06-09 22:40:50 +00:00
canonical.php Canonical: Add the ability to disable redirect_guess_404_permalink(). 2020-06-01 18:47:41 +00:00
category.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
comment-submission.php Comments: Ensure that inserting a comment with an empty type results in correct comment type. 2020-04-26 13:42:03 +00:00
comment.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
compat.php Code Modernization: Replace dirname( __FILE__ ) calls with __DIR__ magic constant. 2020-02-06 06:31:22 +00:00
cron.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
db.php Docs: Update inline comment in Tests_DB::test_locale_floats(). 2020-03-24 01:05:31 +00:00
dbdelta.php Code Modernization: Replace dirname( __FILE__ ) calls with __DIR__ magic constant. 2020-02-06 06:31:22 +00:00
dependencies.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
file.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
filters.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
functions.php General: Trim the input data in maybe_unserialize(), for consistency with is_serialized(). 2020-03-13 21:12:01 +00:00
kses.php Formatting: add a new 'safe_style_disallowed_chars' filter. 2020-06-02 23:44:40 +00:00
l10n.php Coding Standards: Fix the remaining issues in /tests. 2019-07-08 00:55:20 +00:00
link.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
locale.php I18N: Following [45688], remove test for removed method. 2019-07-27 14:29:28 +00:00
mail.php External Libraries: Upgrade PHPMailer to version 6.1.6. 2020-06-12 15:45:30 +00:00
media.php Media: Enable lazy-loading of images by automatically adding the new loading="lazy" attribute to image tags on the front-end. 2020-04-08 00:53:18 +00:00
meta.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
multisite.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
pluggable.php Cache API: Introduce wp_cache_get_multi(). 2020-06-09 19:45:27 +00:00
post.php Tests: Remove unnecessary use of wpdb_exposed_methods_for_testing in test_utf8mb3_post_saves_with_emoji(). 2020-03-05 11:53:34 +00:00
query.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
rest-api.php Role/Capability: Use meta caps edit_post, read_post, and delete_post directly. 2020-05-23 15:22:53 +00:00
rewrite.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
shortcode.php Code Modernization: Replace dirname( __FILE__ ) calls with __DIR__ magic constant. 2020-02-06 06:31:22 +00:00
site-health.php Code Modernization: Replace dirname( __FILE__ ) calls with __DIR__ magic constant. 2020-02-06 06:31:22 +00:00
taxonomy.php Taxonomy: In register_taxonomy(), return the registered taxonomy object on success, for consistency with register_post_type(). 2020-02-05 06:24:16 +00:00
template.php PHPCS: Remove extra spaces added in [44966]. 2019-03-21 20:19:16 +00:00
term.php Posts, Post Types: Introduce default_category_post_types filter. 2020-06-14 21:40:10 +00:00
theme.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
upload.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
url.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
user.php User: Invalidate user_activation_key on password update. 2020-04-29 15:23:37 +00:00
walker.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
widgets.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
wp.php Coding Standards: Fix the remaining issues in /tests. 2019-07-08 00:55:20 +00:00