mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00: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. git-svn-id: https://develop.svn.wordpress.org/trunk@57239 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0e559891ef
commit
489b9e737f
@ -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 );
|
||||
}
|
||||
|
||||
@ -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 "";
|
||||
}
|
||||
|
||||
@ -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...
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -1022,7 +1022,7 @@ class Tests_DB_Charset extends WP_UnitTestCase {
|
||||
$table_name = 'table_collation_check';
|
||||
$data = array(
|
||||
'utf8_bin' => array(
|
||||
// utf8_bin tables don't need extra sanity checking.
|
||||
// utf8_bin tables don't need extra confidence checking.
|
||||
'create' => '( a VARCHAR(50) COLLATE utf8_bin )',
|
||||
'expected' => true,
|
||||
),
|
||||
@ -1037,13 +1037,13 @@ class Tests_DB_Charset extends WP_UnitTestCase {
|
||||
'expected' => false,
|
||||
),
|
||||
'utf8_bin + big5_chinese_ci' => array(
|
||||
// utf8_bin tables don't need extra sanity checking,
|
||||
// utf8_bin tables don't need extra confidence checking,
|
||||
// except for when they're not just utf8_bin.
|
||||
'create' => '( a VARCHAR(50) COLLATE utf8_bin, b VARCHAR(50) COLLATE big5_chinese_ci )',
|
||||
'expected' => false,
|
||||
),
|
||||
'utf8_bin + int' => array(
|
||||
// utf8_bin tables don't need extra sanity checking
|
||||
// utf8_bin tables don't need extra confidence checking
|
||||
// when the other columns aren't strings.
|
||||
'create' => '( a VARCHAR(50) COLLATE utf8_bin, b INT )',
|
||||
'expected' => true,
|
||||
|
||||
@ -1788,7 +1788,7 @@ class Tests_Formatting_wpTexturize extends WP_UnitTestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* Extra sanity checks for _wptexturize_pushpop_element()
|
||||
* Extra confidence checks for _wptexturize_pushpop_element()
|
||||
*
|
||||
* @ticket 28483
|
||||
* @dataProvider data_element_stack
|
||||
|
||||
@ -229,7 +229,7 @@ class Tests_Functions extends WP_UnitTestCase {
|
||||
|
||||
$testdir = DIR_TESTDATA . '/images/';
|
||||
|
||||
// Sanity check.
|
||||
// Confidence check.
|
||||
$this->assertSame( 'abcdefg.png', wp_unique_filename( $testdir, 'abcdefg.png' ), 'Test non-existing file, file name should be unchanged.' );
|
||||
|
||||
// Ensure correct images exist.
|
||||
|
||||
@ -329,12 +329,12 @@ class Tests_Post extends WP_UnitTestCase {
|
||||
);
|
||||
stick_post( $post->ID );
|
||||
|
||||
// Sanity check.
|
||||
// Confidence check.
|
||||
$this->assertTrue( is_sticky( $post->ID ) );
|
||||
|
||||
wp_set_current_user( self::$grammarian_id );
|
||||
|
||||
// Sanity check.
|
||||
// Confidence check.
|
||||
$this->assertFalse( current_user_can( 'publish_posts' ) );
|
||||
$this->assertTrue( current_user_can( 'edit_others_posts' ) );
|
||||
$this->assertTrue( current_user_can( 'edit_published_posts' ) );
|
||||
@ -367,12 +367,12 @@ class Tests_Post extends WP_UnitTestCase {
|
||||
);
|
||||
stick_post( $post->ID );
|
||||
|
||||
// Sanity check.
|
||||
// Confidence check.
|
||||
$this->assertTrue( is_sticky( $post->ID ) );
|
||||
|
||||
wp_set_current_user( self::$grammarian_id );
|
||||
|
||||
// Sanity check.
|
||||
// Confidence check.
|
||||
$this->assertFalse( current_user_can( 'publish_posts' ) );
|
||||
$this->assertTrue( current_user_can( 'edit_others_posts' ) );
|
||||
$this->assertTrue( current_user_can( 'edit_published_posts' ) );
|
||||
|
||||
@ -2520,7 +2520,7 @@ class WP_Test_REST_Users_Controller extends WP_Test_REST_Controller_Testcase {
|
||||
)
|
||||
);
|
||||
|
||||
// Sanity check to ensure the factory created the post correctly.
|
||||
// Confidence check to ensure the factory created the post correctly.
|
||||
$post = get_post( $test_post );
|
||||
$this->assertEquals( $user_id, $post->post_author );
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user