Make WordPress Core

Changeset 57239


Ignore:
Timestamp:
01/03/2024 09:57:32 PM (5 months ago)
Author:
hellofromTonya
Message:

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.

Location:
trunk
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/admin/post.js

    r57231 r57239  
    11741174
    11751175        /**
    1176          * When the dragging stopped make sure we return focus and do a sanity check on the height.
     1176         * When the dragging stopped make sure we return focus and do a confidence check on the height.
    11771177         */
    11781178        function endDrag() {
     
    11991199            $document.off( '.wp-editor-resize' );
    12001200
    1201             // Sanity check: normalize height to stay within acceptable ranges.
     1201            // Confidence check: normalize height to stay within acceptable ranges.
    12021202            if ( height && height > 50 && height < 5000 ) {
    12031203                setUserSetting( 'ed_size', height );
  • trunk/src/js/_enqueues/vendor/tinymce/utils/form_utils.js

    r43309 r57239  
    200200    size += 'px';
    201201  }
    202   // Sanity check, IE doesn't like broken values
     202  // Confidence check, IE doesn't like broken values
    203203  else if (!(/^[0-9\.]+(px|%|in|cm|mm|em|ex|pt|pc)$/i.test(size))) {
    204204    return "";
  • trunk/src/js/_enqueues/wp/theme.js

    r53908 r57239  
    13011301        nextModel = self.collection.at( self.collection.indexOf( model ) + 1 );
    13021302
    1303         // Sanity check which also serves as a boundary test.
     1303        // Confidence check which also serves as a boundary test.
    13041304        if ( nextModel !== undefined ) {
    13051305
  • trunk/src/wp-admin/includes/class-pclzip.php

    r55827 r57239  
    18551855
    18561856
    1857     // ----- Sanity check : No threshold if value lower than 1M
     1857    // ----- Confidence check : No threshold if value lower than 1M
    18581858    if ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] < 1048576) {
    18591859      unset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]);
  • trunk/src/wp-admin/includes/class-plugin-upgrader.php

    r56549 r57239  
    473473
    474474        $working_directory = str_replace( $wp_filesystem->wp_content_dir(), trailingslashit( WP_CONTENT_DIR ), $source );
    475         if ( ! is_dir( $working_directory ) ) { // Sanity check, if the above fails, let's not prevent installation.
     475        if ( ! is_dir( $working_directory ) ) { // Confidence check, if the above fails, let's not prevent installation.
    476476            return $source;
    477477        }
  • trunk/src/wp-admin/includes/class-theme-upgrader.php

    r56549 r57239  
    539539        // Check that the folder contains a valid theme.
    540540        $working_directory = str_replace( $wp_filesystem->wp_content_dir(), trailingslashit( WP_CONTENT_DIR ), $source );
    541         if ( ! is_dir( $working_directory ) ) { // Sanity check, if the above fails, let's not prevent installation.
     541        if ( ! is_dir( $working_directory ) ) { // Confidence check, if the above fails, let's not prevent installation.
    542542            return $source;
    543543        }
  • trunk/src/wp-admin/includes/post.php

    r57093 r57239  
    453453    $success = wp_update_post( $translated );
    454454
    455     // If the save failed, see if we can sanity check the main fields and try again.
     455    // If the save failed, see if we can confidence check the main fields and try again.
    456456    if ( ! $success && is_callable( array( $wpdb, 'strip_invalid_text_for_column' ) ) ) {
    457457        $fields = array( 'post_title', 'post_content', 'post_excerpt' );
  • trunk/src/wp-admin/includes/update-core.php

    r57131 r57239  
    10941094    apply_filters( 'update_feedback', __( 'Verifying the unpacked files&#8230;' ) );
    10951095
    1096     // Sanity check the unzipped distribution.
     1096    // Confidence check the unzipped distribution.
    10971097    $distro = '';
    10981098    $roots  = array( '/wordpress/', '/wordpress-mu/' );
  • trunk/src/wp-admin/install.php

    r56024 r57239  
    77 */
    88
    9 // Sanity check.
     9// Confidence check.
    1010if ( false ) {
    1111    ?>
  • trunk/src/wp-content/themes/twentytwenty/assets/js/customize-controls.js

    r47776 r57239  
    7070        colors = twentyTwentyColor( backgroundColor, accentHue );
    7171
    72         // Sanity check.
     72        // Confidence check.
    7373        if ( colors.getAccentColor() && 'function' === typeof colors.getAccentColor().toCSS ) {
    7474            // Update the value for this context.
  • trunk/src/wp-content/themes/twentytwentyone/inc/template-functions.php

    r56549 r57239  
    368368    foreach ( $blocks as $block ) {
    369369
    370         // Sanity check.
     370        // Confidence check.
    371371        if ( ! isset( $block['blockName'] ) ) {
    372372            continue;
  • trunk/src/wp-includes/class-wp-tax-query.php

    r56166 r57239  
    506506        $alias = false;
    507507
    508         // Sanity check. Only IN queries use the JOIN syntax.
     508        // Confidence check. Only IN queries use the JOIN syntax.
    509509        if ( ! isset( $clause['operator'] ) || 'IN' !== $clause['operator'] ) {
    510510            return $alias;
  • trunk/src/wp-includes/class-wpdb.php

    r57089 r57239  
    155155
    156156    /**
    157      * Cached column info, for sanity checking data before inserting.
     157     * Cached column info, for confidence checking data before inserting.
    158158     *
    159159     * @since 4.2.0
     
    173173
    174174    /**
    175      * Whether text fields in the current query need to be sanity checked.
     175     * Whether text fields in the current query need to be confidence checked.
    176176     *
    177177     * @since 4.2.0
     
    19281928            $this->result = null;
    19291929
    1930             // Sanity check before using the handle.
     1930            // Confidence check before using the handle.
    19311931            if ( empty( $this->dbh ) || ! ( $this->dbh instanceof mysqli ) ) {
    19321932                return;
     
    35173517        }
    35183518
    3519         // If any of the columns don't have one of these collations, it needs more sanity checking.
     3519        // If any of the columns don't have one of these collations, it needs more confidence checking.
    35203520        $safe_collations = array(
    35213521            'utf8_bin',
  • trunk/src/wp-includes/cron.php

    r57106 r57239  
    875875    }
    876876
    877     // Sanity check.
     877    // Confidence check.
    878878    $crons = wp_get_ready_cron_jobs();
    879879    if ( empty( $crons ) ) {
  • trunk/src/wp-includes/functions.php

    r57131 r57239  
    42854285
    42864286/**
    4287  * Encodes a variable into JSON, with some sanity checks.
     4287 * Encodes a variable into JSON, with some confidence checks.
    42884288 *
    42894289 * @since 4.1.0
     
    43014301    $json = json_encode( $value, $flags, $depth );
    43024302
    4303     // If json_encode() was successful, no need to do more sanity checking.
     4303    // If json_encode() was successful, no need to do more confidence checking.
    43044304    if ( false !== $json ) {
    43054305        return $json;
     
    43164316
    43174317/**
    4318  * Performs sanity checks on data that shall be encoded to JSON.
     4318 * Performs confidence checks on data that shall be encoded to JSON.
    43194319 *
    43204320 * @ignore
  • trunk/src/wp-includes/post.php

    r57150 r57239  
    38623862
    38633863    foreach ( $group_by_status as $status => $comments ) {
    3864         // Sanity check. This shouldn't happen.
     3864        // Confidence check. This shouldn't happen.
    38653865        if ( 'post-trashed' === $status ) {
    38663866            $status = '0';
  • trunk/src/wp-includes/shortcodes.php

    r56838 r57239  
    505505            }
    506506
    507             // Looks like we found some crazy unfiltered HTML. Skipping it for sanity.
     507            // Looks like we found some crazy unfiltered HTML. Skipping it for confidence.
    508508            $element = strtr( $element, $trans );
    509509            continue;
  • trunk/src/wp-includes/taxonomy.php

    r57044 r57239  
    25742574
    25752575    /*
    2576      * Sanity check: if we just created a term with the same parent + taxonomy + slug but a higher term_id than
     2576     * Confidence check: if we just created a term with the same parent + taxonomy + slug but a higher term_id than
    25772577     * an existing term, then we have unwittingly created a duplicate term. Delete the dupe, and use the term_id
    25782578     * and term_taxonomy_id of the older term instead. Then return out of the function so that the "create" hooks
  • trunk/tests/phpunit/tests/db/charset.php

    r55562 r57239  
    10231023        $data       = array(
    10241024            'utf8_bin'                   => array(
    1025                 // utf8_bin tables don't need extra sanity checking.
     1025                // utf8_bin tables don't need extra confidence checking.
    10261026                'create'   => '( a VARCHAR(50) COLLATE utf8_bin )',
    10271027                'expected' => true,
     
    10381038            ),
    10391039            'utf8_bin + big5_chinese_ci' => array(
    1040                 // utf8_bin tables don't need extra sanity checking,
     1040                // utf8_bin tables don't need extra confidence checking,
    10411041                // except for when they're not just utf8_bin.
    10421042                'create'   => '( a VARCHAR(50) COLLATE utf8_bin, b VARCHAR(50) COLLATE big5_chinese_ci )',
     
    10441044            ),
    10451045            'utf8_bin + int'             => array(
    1046                 // utf8_bin tables don't need extra sanity checking
     1046                // utf8_bin tables don't need extra confidence checking
    10471047                // when the other columns aren't strings.
    10481048                'create'   => '( a VARCHAR(50) COLLATE utf8_bin, b INT )',
  • trunk/tests/phpunit/tests/formatting/wpTexturize.php

    r56548 r57239  
    17891789
    17901790    /**
    1791      * Extra sanity checks for _wptexturize_pushpop_element()
     1791     * Extra confidence checks for _wptexturize_pushpop_element()
    17921792     *
    17931793     * @ticket 28483
  • trunk/tests/phpunit/tests/functions.php

    r56971 r57239  
    230230        $testdir = DIR_TESTDATA . '/images/';
    231231
    232         // Sanity check.
     232        // Confidence check.
    233233        $this->assertSame( 'abcdefg.png', wp_unique_filename( $testdir, 'abcdefg.png' ), 'Test non-existing file, file name should be unchanged.' );
    234234
  • trunk/tests/phpunit/tests/post.php

    r56421 r57239  
    330330        stick_post( $post->ID );
    331331
    332         // Sanity check.
     332        // Confidence check.
    333333        $this->assertTrue( is_sticky( $post->ID ) );
    334334
    335335        wp_set_current_user( self::$grammarian_id );
    336336
    337         // Sanity check.
     337        // Confidence check.
    338338        $this->assertFalse( current_user_can( 'publish_posts' ) );
    339339        $this->assertTrue( current_user_can( 'edit_others_posts' ) );
     
    368368        stick_post( $post->ID );
    369369
    370         // Sanity check.
     370        // Confidence check.
    371371        $this->assertTrue( is_sticky( $post->ID ) );
    372372
    373373        wp_set_current_user( self::$grammarian_id );
    374374
    375         // Sanity check.
     375        // Confidence check.
    376376        $this->assertFalse( current_user_can( 'publish_posts' ) );
    377377        $this->assertTrue( current_user_can( 'edit_others_posts' ) );
  • trunk/tests/phpunit/tests/rest-api/rest-users-controller.php

    r56833 r57239  
    25212521        );
    25222522
    2523         // Sanity check to ensure the factory created the post correctly.
     2523        // Confidence check to ensure the factory created the post correctly.
    25242524        $post = get_post( $test_post );
    25252525        $this->assertEquals( $user_id, $post->post_author );
Note: See TracChangeset for help on using the changeset viewer.