mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Docs: Replace "sanity" with "confidence" for inclusive language.
The phrase "sanity check" unnecessarily references mental health. It's an old phrase used to denote an extra step in verifying code works as expected. “The WordPress open source community cares about diversity. We strive to maintain a welcoming environment where everyone can feel included.” While "sanity check" is a well-known phrase with a specific meaning, "confidence check" is a direct replacement that is more clear of its intent while being more inclusive. Words matter. Follow-up to [49216], [46271], [40583], [38832], [38637], [37409], [33359], [32162], [30346], [30345], [30238], [30055], [29902], [28763], [26141], [25002], [22227], [13428], [12148], [11025], [8927]. Props dartiss, hellofromTonya. Fixes #60187. Built from https://develop.svn.wordpress.org/trunk@57239 git-svn-id: http://core.svn.wordpress.org/trunk@56745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
87a8377de2
commit
d30fe43245
@ -1854,7 +1854,7 @@
|
||||
$p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] = floor($v_memory_limit_int*PCLZIP_TEMPORARY_FILE_RATIO);
|
||||
|
||||
|
||||
// ----- Sanity check : No threshold if value lower than 1M
|
||||
// ----- Confidence check : No threshold if value lower than 1M
|
||||
if ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] < 1048576) {
|
||||
unset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]);
|
||||
}
|
||||
|
@ -472,7 +472,7 @@ class Plugin_Upgrader extends WP_Upgrader {
|
||||
}
|
||||
|
||||
$working_directory = str_replace( $wp_filesystem->wp_content_dir(), trailingslashit( WP_CONTENT_DIR ), $source );
|
||||
if ( ! is_dir( $working_directory ) ) { // Sanity check, if the above fails, let's not prevent installation.
|
||||
if ( ! is_dir( $working_directory ) ) { // Confidence check, if the above fails, let's not prevent installation.
|
||||
return $source;
|
||||
}
|
||||
|
||||
|
@ -538,7 +538,7 @@ class Theme_Upgrader extends WP_Upgrader {
|
||||
|
||||
// Check that the folder contains a valid theme.
|
||||
$working_directory = str_replace( $wp_filesystem->wp_content_dir(), trailingslashit( WP_CONTENT_DIR ), $source );
|
||||
if ( ! is_dir( $working_directory ) ) { // Sanity check, if the above fails, let's not prevent installation.
|
||||
if ( ! is_dir( $working_directory ) ) { // Confidence check, if the above fails, let's not prevent installation.
|
||||
return $source;
|
||||
}
|
||||
|
||||
|
@ -452,7 +452,7 @@ function edit_post( $post_data = null ) {
|
||||
|
||||
$success = wp_update_post( $translated );
|
||||
|
||||
// If the save failed, see if we can sanity check the main fields and try again.
|
||||
// If the save failed, see if we can confidence check the main fields and try again.
|
||||
if ( ! $success && is_callable( array( $wpdb, 'strip_invalid_text_for_column' ) ) ) {
|
||||
$fields = array( 'post_title', 'post_content', 'post_excerpt' );
|
||||
|
||||
|
@ -1093,7 +1093,7 @@ function update_core( $from, $to ) {
|
||||
*/
|
||||
apply_filters( 'update_feedback', __( 'Verifying the unpacked files…' ) );
|
||||
|
||||
// Sanity check the unzipped distribution.
|
||||
// Confidence check the unzipped distribution.
|
||||
$distro = '';
|
||||
$roots = array( '/wordpress/', '/wordpress-mu/' );
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
* @subpackage Administration
|
||||
*/
|
||||
|
||||
// Sanity check.
|
||||
// Confidence check.
|
||||
if ( false ) {
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
|
@ -1173,7 +1173,7 @@ jQuery( function($) {
|
||||
}
|
||||
|
||||
/**
|
||||
* When the dragging stopped make sure we return focus and do a sanity check on the height.
|
||||
* When the dragging stopped make sure we return focus and do a confidence check on the height.
|
||||
*/
|
||||
function endDrag() {
|
||||
var height, toolbarHeight;
|
||||
@ -1198,7 +1198,7 @@ jQuery( function($) {
|
||||
|
||||
$document.off( '.wp-editor-resize' );
|
||||
|
||||
// Sanity check: normalize height to stay within acceptable ranges.
|
||||
// Confidence check: normalize height to stay within acceptable ranges.
|
||||
if ( height && height > 50 && height < 5000 ) {
|
||||
setUserSetting( 'ed_size', height );
|
||||
}
|
||||
|
@ -1300,7 +1300,7 @@ themes.view.Themes = wp.Backbone.View.extend({
|
||||
// Find the next model within the collection.
|
||||
nextModel = self.collection.at( self.collection.indexOf( model ) + 1 );
|
||||
|
||||
// Sanity check which also serves as a boundary test.
|
||||
// Confidence check which also serves as a boundary test.
|
||||
if ( nextModel !== undefined ) {
|
||||
|
||||
// We have a new theme...
|
||||
|
@ -69,7 +69,7 @@
|
||||
// Get accessible colors for the defined background-color and hue.
|
||||
colors = twentyTwentyColor( backgroundColor, accentHue );
|
||||
|
||||
// Sanity check.
|
||||
// Confidence check.
|
||||
if ( colors.getAccentColor() && 'function' === typeof colors.getAccentColor().toCSS ) {
|
||||
// Update the value for this context.
|
||||
value[ context ] = {
|
||||
|
@ -367,7 +367,7 @@ function twenty_twenty_one_print_first_instance_of_block( $block_name, $content
|
||||
// Loop blocks.
|
||||
foreach ( $blocks as $block ) {
|
||||
|
||||
// Sanity check.
|
||||
// Confidence check.
|
||||
if ( ! isset( $block['blockName'] ) ) {
|
||||
continue;
|
||||
}
|
||||
|
@ -505,7 +505,7 @@ class WP_Tax_Query {
|
||||
protected function find_compatible_table_alias( $clause, $parent_query ) {
|
||||
$alias = false;
|
||||
|
||||
// Sanity check. Only IN queries use the JOIN syntax.
|
||||
// Confidence check. Only IN queries use the JOIN syntax.
|
||||
if ( ! isset( $clause['operator'] ) || 'IN' !== $clause['operator'] ) {
|
||||
return $alias;
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ class wpdb {
|
||||
protected $result;
|
||||
|
||||
/**
|
||||
* Cached column info, for sanity checking data before inserting.
|
||||
* Cached column info, for confidence checking data before inserting.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
@ -172,7 +172,7 @@ class wpdb {
|
||||
protected $table_charset = array();
|
||||
|
||||
/**
|
||||
* Whether text fields in the current query need to be sanity checked.
|
||||
* Whether text fields in the current query need to be confidence checked.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
@ -1927,7 +1927,7 @@ class wpdb {
|
||||
mysqli_free_result( $this->result );
|
||||
$this->result = null;
|
||||
|
||||
// Sanity check before using the handle.
|
||||
// Confidence check before using the handle.
|
||||
if ( empty( $this->dbh ) || ! ( $this->dbh instanceof mysqli ) ) {
|
||||
return;
|
||||
}
|
||||
@ -3516,7 +3516,7 @@ class wpdb {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If any of the columns don't have one of these collations, it needs more sanity checking.
|
||||
// If any of the columns don't have one of these collations, it needs more confidence checking.
|
||||
$safe_collations = array(
|
||||
'utf8_bin',
|
||||
'utf8_general_ci',
|
||||
|
@ -874,7 +874,7 @@ function spawn_cron( $gmt_time = 0 ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Sanity check.
|
||||
// Confidence check.
|
||||
$crons = wp_get_ready_cron_jobs();
|
||||
if ( empty( $crons ) ) {
|
||||
return false;
|
||||
|
@ -4284,7 +4284,7 @@ function _wp_die_process_input( $message, $title = '', $args = array() ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Encodes a variable into JSON, with some sanity checks.
|
||||
* Encodes a variable into JSON, with some confidence checks.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @since 5.3.0 No longer handles support for PHP < 5.6.
|
||||
@ -4300,7 +4300,7 @@ function _wp_die_process_input( $message, $title = '', $args = array() ) {
|
||||
function wp_json_encode( $value, $flags = 0, $depth = 512 ) {
|
||||
$json = json_encode( $value, $flags, $depth );
|
||||
|
||||
// If json_encode() was successful, no need to do more sanity checking.
|
||||
// If json_encode() was successful, no need to do more confidence checking.
|
||||
if ( false !== $json ) {
|
||||
return $json;
|
||||
}
|
||||
@ -4315,7 +4315,7 @@ function wp_json_encode( $value, $flags = 0, $depth = 512 ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs sanity checks on data that shall be encoded to JSON.
|
||||
* Performs confidence checks on data that shall be encoded to JSON.
|
||||
*
|
||||
* @ignore
|
||||
* @since 4.1.0
|
||||
|
@ -199,7 +199,7 @@ function getCSSSize(size) {
|
||||
if (/^[0-9]+$/.test(size)) {
|
||||
size += 'px';
|
||||
}
|
||||
// Sanity check, IE doesn't like broken values
|
||||
// Confidence check, IE doesn't like broken values
|
||||
else if (!(/^[0-9\.]+(px|%|in|cm|mm|em|ex|pt|pc)$/i.test(size))) {
|
||||
return "";
|
||||
}
|
||||
|
@ -3861,7 +3861,7 @@ function wp_untrash_post_comments( $post = null ) {
|
||||
}
|
||||
|
||||
foreach ( $group_by_status as $status => $comments ) {
|
||||
// Sanity check. This shouldn't happen.
|
||||
// Confidence check. This shouldn't happen.
|
||||
if ( 'post-trashed' === $status ) {
|
||||
$status = '0';
|
||||
}
|
||||
|
@ -504,7 +504,7 @@ function do_shortcodes_in_html_tags( $content, $ignore_html, $tagnames ) {
|
||||
$element = preg_replace_callback( "/$pattern/", 'do_shortcode_tag', $element );
|
||||
}
|
||||
|
||||
// Looks like we found some crazy unfiltered HTML. Skipping it for sanity.
|
||||
// Looks like we found some crazy unfiltered HTML. Skipping it for confidence.
|
||||
$element = strtr( $element, $trans );
|
||||
continue;
|
||||
}
|
||||
|
@ -2573,7 +2573,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) {
|
||||
$tt_id = (int) $wpdb->insert_id;
|
||||
|
||||
/*
|
||||
* Sanity check: if we just created a term with the same parent + taxonomy + slug but a higher term_id than
|
||||
* Confidence check: if we just created a term with the same parent + taxonomy + slug but a higher term_id than
|
||||
* an existing term, then we have unwittingly created a duplicate term. Delete the dupe, and use the term_id
|
||||
* and term_taxonomy_id of the older term instead. Then return out of the function so that the "create" hooks
|
||||
* are not fired.
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.5-alpha-57238';
|
||||
$wp_version = '6.5-alpha-57239';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user