General: Remove “whitelist” and “blacklist” in favor of more clear and inclusive language.

“The WordPress open source community cares about diversity. We strive to maintain a welcoming environment where everyone can feel included.”

With this commit, all occurrences of “whitelist” and “blacklist” (with the single exception of the `$new_whitelist_options` global variable) are removed. A new ticket has been opened to explore renaming the `$new_whitelist_options` variable (#50434).

Changing to more specific names or rewording sentences containing these terms not only makes the code more inclusive, but also helps provide clarity. These terms are often ambiguous. What is being blocked or allowed is not always immediately clear. This can make it more difficult for non-native English speakers to read through the codebase.

Words matter. If one contributor feels more welcome because these terms are removed, this was worth the effort.

Props strangerstudios, jorbin, desrosj, joemcgill, timothyblynjacobs, ocean90, ayeshrajans, davidbaumwald, earnjam.
See #48900, #50434.
Fixes #50413.

git-svn-id: https://develop.svn.wordpress.org/trunk@48121 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jonathan Desrosiers
2020-06-22 17:24:34 +00:00
parent 9e3b322f8f
commit e26394bb2d
60 changed files with 423 additions and 281 deletions

View File

@@ -441,7 +441,8 @@ function is_email_address_unsafe( $user_email ) {
* Sanitize and validate data required for a user sign-up.
*
* Verifies the validity and uniqueness of user names and user email addresses,
* and checks email addresses against admin-provided domain whitelists and blacklists.
* and checks email addresses against allowed and disallowed domains provided by
* administrators.
*
* The {@see 'wpmu_validate_user_signup'} hook provides an easy way to modify the sign-up
* process. The value $result, which is passed to the hook, contains both the user-provided
@@ -1358,7 +1359,7 @@ function wpmu_create_blog( $domain, $path, $title, $user_id, $options = array(),
wp_installing( true );
}
$site_data_whitelist = array( 'public', 'archived', 'mature', 'spam', 'deleted', 'lang_id' );
$allowed_data_fields = array( 'public', 'archived', 'mature', 'spam', 'deleted', 'lang_id' );
$site_data = array_merge(
array(
@@ -1366,14 +1367,14 @@ function wpmu_create_blog( $domain, $path, $title, $user_id, $options = array(),
'path' => $path,
'network_id' => $network_id,
),
array_intersect_key( $options, array_flip( $site_data_whitelist ) )
array_intersect_key( $options, array_flip( $allowed_data_fields ) )
);
// Data to pass to wp_initialize_site().
$site_initialization_data = array(
'title' => $title,
'user_id' => $user_id,
'options' => array_diff_key( $options, array_flip( $site_data_whitelist ) ),
'options' => array_diff_key( $options, array_flip( $allowed_data_fields ) ),
);
$blog_id = wp_insert_site( array_merge( $site_data, $site_initialization_data ) );
@@ -1840,12 +1841,12 @@ function get_most_recent_post_of_user( $user_id ) {
//
/**
* Check an array of MIME types against a whitelist.
* Check an array of MIME types against a list of allowed types.
*
* WordPress ships with a set of allowed upload filetypes,
* which is defined in wp-includes/functions.php in
* get_allowed_mime_types(). This function is used to filter
* that list against the filetype whitelist provided by Multisite
* that list against the filetypes allowed provided by Multisite
* Super Admins at wp-admin/network/settings.php.
*
* @since MU (3.0.0)