Changeset 57239
- Timestamp:
- 01/03/2024 09:57:32 PM (16 months ago)
- Location:
- trunk
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/admin/post.js
r57231 r57239 1174 1174 1175 1175 /** 1176 * When the dragging stopped make sure we return focus and do a sanitycheck on the height.1176 * When the dragging stopped make sure we return focus and do a confidence check on the height. 1177 1177 */ 1178 1178 function endDrag() { … … 1199 1199 $document.off( '.wp-editor-resize' ); 1200 1200 1201 // Sanitycheck: normalize height to stay within acceptable ranges.1201 // Confidence check: normalize height to stay within acceptable ranges. 1202 1202 if ( height && height > 50 && height < 5000 ) { 1203 1203 setUserSetting( 'ed_size', height ); -
trunk/src/js/_enqueues/vendor/tinymce/utils/form_utils.js
r43309 r57239 200 200 size += 'px'; 201 201 } 202 // Sanitycheck, IE doesn't like broken values202 // Confidence check, IE doesn't like broken values 203 203 else if (!(/^[0-9\.]+(px|%|in|cm|mm|em|ex|pt|pc)$/i.test(size))) { 204 204 return ""; -
trunk/src/js/_enqueues/wp/theme.js
r53908 r57239 1301 1301 nextModel = self.collection.at( self.collection.indexOf( model ) + 1 ); 1302 1302 1303 // Sanitycheck which also serves as a boundary test.1303 // Confidence check which also serves as a boundary test. 1304 1304 if ( nextModel !== undefined ) { 1305 1305 -
trunk/src/wp-admin/includes/class-pclzip.php
r55827 r57239 1855 1855 1856 1856 1857 // ----- Sanitycheck : No threshold if value lower than 1M1857 // ----- Confidence check : No threshold if value lower than 1M 1858 1858 if ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] < 1048576) { 1859 1859 unset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]); -
trunk/src/wp-admin/includes/class-plugin-upgrader.php
r56549 r57239 473 473 474 474 $working_directory = str_replace( $wp_filesystem->wp_content_dir(), trailingslashit( WP_CONTENT_DIR ), $source ); 475 if ( ! is_dir( $working_directory ) ) { // Sanitycheck, 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. 476 476 return $source; 477 477 } -
trunk/src/wp-admin/includes/class-theme-upgrader.php
r56549 r57239 539 539 // Check that the folder contains a valid theme. 540 540 $working_directory = str_replace( $wp_filesystem->wp_content_dir(), trailingslashit( WP_CONTENT_DIR ), $source ); 541 if ( ! is_dir( $working_directory ) ) { // Sanitycheck, 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. 542 542 return $source; 543 543 } -
trunk/src/wp-admin/includes/post.php
r57093 r57239 453 453 $success = wp_update_post( $translated ); 454 454 455 // If the save failed, see if we can sanitycheck the main fields and try again.455 // If the save failed, see if we can confidence check the main fields and try again. 456 456 if ( ! $success && is_callable( array( $wpdb, 'strip_invalid_text_for_column' ) ) ) { 457 457 $fields = array( 'post_title', 'post_content', 'post_excerpt' ); -
trunk/src/wp-admin/includes/update-core.php
r57131 r57239 1094 1094 apply_filters( 'update_feedback', __( 'Verifying the unpacked files…' ) ); 1095 1095 1096 // Sanitycheck the unzipped distribution.1096 // Confidence check the unzipped distribution. 1097 1097 $distro = ''; 1098 1098 $roots = array( '/wordpress/', '/wordpress-mu/' ); -
trunk/src/wp-admin/install.php
r56024 r57239 7 7 */ 8 8 9 // Sanitycheck.9 // Confidence check. 10 10 if ( false ) { 11 11 ?> -
trunk/src/wp-content/themes/twentytwenty/assets/js/customize-controls.js
r47776 r57239 70 70 colors = twentyTwentyColor( backgroundColor, accentHue ); 71 71 72 // Sanitycheck.72 // Confidence check. 73 73 if ( colors.getAccentColor() && 'function' === typeof colors.getAccentColor().toCSS ) { 74 74 // Update the value for this context. -
trunk/src/wp-content/themes/twentytwentyone/inc/template-functions.php
r56549 r57239 368 368 foreach ( $blocks as $block ) { 369 369 370 // Sanitycheck.370 // Confidence check. 371 371 if ( ! isset( $block['blockName'] ) ) { 372 372 continue; -
trunk/src/wp-includes/class-wp-tax-query.php
r56166 r57239 506 506 $alias = false; 507 507 508 // Sanitycheck. Only IN queries use the JOIN syntax.508 // Confidence check. Only IN queries use the JOIN syntax. 509 509 if ( ! isset( $clause['operator'] ) || 'IN' !== $clause['operator'] ) { 510 510 return $alias; -
trunk/src/wp-includes/class-wpdb.php
r57089 r57239 155 155 156 156 /** 157 * Cached column info, for sanitychecking data before inserting.157 * Cached column info, for confidence checking data before inserting. 158 158 * 159 159 * @since 4.2.0 … … 173 173 174 174 /** 175 * Whether text fields in the current query need to be sanitychecked.175 * Whether text fields in the current query need to be confidence checked. 176 176 * 177 177 * @since 4.2.0 … … 1928 1928 $this->result = null; 1929 1929 1930 // Sanitycheck before using the handle.1930 // Confidence check before using the handle. 1931 1931 if ( empty( $this->dbh ) || ! ( $this->dbh instanceof mysqli ) ) { 1932 1932 return; … … 3517 3517 } 3518 3518 3519 // If any of the columns don't have one of these collations, it needs more sanitychecking.3519 // If any of the columns don't have one of these collations, it needs more confidence checking. 3520 3520 $safe_collations = array( 3521 3521 'utf8_bin', -
trunk/src/wp-includes/cron.php
r57106 r57239 875 875 } 876 876 877 // Sanitycheck.877 // Confidence check. 878 878 $crons = wp_get_ready_cron_jobs(); 879 879 if ( empty( $crons ) ) { -
trunk/src/wp-includes/functions.php
r57131 r57239 4285 4285 4286 4286 /** 4287 * Encodes a variable into JSON, with some sanitychecks.4287 * Encodes a variable into JSON, with some confidence checks. 4288 4288 * 4289 4289 * @since 4.1.0 … … 4301 4301 $json = json_encode( $value, $flags, $depth ); 4302 4302 4303 // If json_encode() was successful, no need to do more sanitychecking.4303 // If json_encode() was successful, no need to do more confidence checking. 4304 4304 if ( false !== $json ) { 4305 4305 return $json; … … 4316 4316 4317 4317 /** 4318 * Performs sanitychecks on data that shall be encoded to JSON.4318 * Performs confidence checks on data that shall be encoded to JSON. 4319 4319 * 4320 4320 * @ignore -
trunk/src/wp-includes/post.php
r57150 r57239 3862 3862 3863 3863 foreach ( $group_by_status as $status => $comments ) { 3864 // Sanitycheck. This shouldn't happen.3864 // Confidence check. This shouldn't happen. 3865 3865 if ( 'post-trashed' === $status ) { 3866 3866 $status = '0'; -
trunk/src/wp-includes/shortcodes.php
r56838 r57239 505 505 } 506 506 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. 508 508 $element = strtr( $element, $trans ); 509 509 continue; -
trunk/src/wp-includes/taxonomy.php
r57044 r57239 2574 2574 2575 2575 /* 2576 * Sanitycheck: if we just created a term with the same parent + taxonomy + slug but a higher term_id than2576 * Confidence check: if we just created a term with the same parent + taxonomy + slug but a higher term_id than 2577 2577 * an existing term, then we have unwittingly created a duplicate term. Delete the dupe, and use the term_id 2578 2578 * 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 1023 1023 $data = array( 1024 1024 'utf8_bin' => array( 1025 // utf8_bin tables don't need extra sanitychecking.1025 // utf8_bin tables don't need extra confidence checking. 1026 1026 'create' => '( a VARCHAR(50) COLLATE utf8_bin )', 1027 1027 'expected' => true, … … 1038 1038 ), 1039 1039 'utf8_bin + big5_chinese_ci' => array( 1040 // utf8_bin tables don't need extra sanitychecking,1040 // utf8_bin tables don't need extra confidence checking, 1041 1041 // except for when they're not just utf8_bin. 1042 1042 'create' => '( a VARCHAR(50) COLLATE utf8_bin, b VARCHAR(50) COLLATE big5_chinese_ci )', … … 1044 1044 ), 1045 1045 'utf8_bin + int' => array( 1046 // utf8_bin tables don't need extra sanitychecking1046 // utf8_bin tables don't need extra confidence checking 1047 1047 // when the other columns aren't strings. 1048 1048 'create' => '( a VARCHAR(50) COLLATE utf8_bin, b INT )', -
trunk/tests/phpunit/tests/formatting/wpTexturize.php
r56548 r57239 1789 1789 1790 1790 /** 1791 * Extra sanitychecks for _wptexturize_pushpop_element()1791 * Extra confidence checks for _wptexturize_pushpop_element() 1792 1792 * 1793 1793 * @ticket 28483 -
trunk/tests/phpunit/tests/functions.php
r56971 r57239 230 230 $testdir = DIR_TESTDATA . '/images/'; 231 231 232 // Sanitycheck.232 // Confidence check. 233 233 $this->assertSame( 'abcdefg.png', wp_unique_filename( $testdir, 'abcdefg.png' ), 'Test non-existing file, file name should be unchanged.' ); 234 234 -
trunk/tests/phpunit/tests/post.php
r56421 r57239 330 330 stick_post( $post->ID ); 331 331 332 // Sanitycheck.332 // Confidence check. 333 333 $this->assertTrue( is_sticky( $post->ID ) ); 334 334 335 335 wp_set_current_user( self::$grammarian_id ); 336 336 337 // Sanitycheck.337 // Confidence check. 338 338 $this->assertFalse( current_user_can( 'publish_posts' ) ); 339 339 $this->assertTrue( current_user_can( 'edit_others_posts' ) ); … … 368 368 stick_post( $post->ID ); 369 369 370 // Sanitycheck.370 // Confidence check. 371 371 $this->assertTrue( is_sticky( $post->ID ) ); 372 372 373 373 wp_set_current_user( self::$grammarian_id ); 374 374 375 // Sanitycheck.375 // Confidence check. 376 376 $this->assertFalse( current_user_can( 'publish_posts' ) ); 377 377 $this->assertTrue( current_user_can( 'edit_others_posts' ) ); -
trunk/tests/phpunit/tests/rest-api/rest-users-controller.php
r56833 r57239 2521 2521 ); 2522 2522 2523 // Sanitycheck to ensure the factory created the post correctly.2523 // Confidence check to ensure the factory created the post correctly. 2524 2524 $post = get_post( $test_post ); 2525 2525 $this->assertEquals( $user_id, $post->post_author );
Note: See TracChangeset
for help on using the changeset viewer.