Changeset 62550
- Timestamp:
- 06/23/2026 01:53:35 PM (9 hours ago)
- Location:
- trunk/src
- Files:
-
- 7 edited
-
wp-admin/includes/class-wp-site-health.php (modified) (1 diff)
-
wp-admin/includes/post.php (modified) (1 diff)
-
wp-includes/block-template-utils.php (modified) (1 diff)
-
wp-includes/class-wp-block-processor.php (modified) (1 diff)
-
wp-includes/class-wp-scripts.php (modified) (1 diff)
-
wp-includes/class-wp-styles.php (modified) (1 diff)
-
wp-includes/kses.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-site-health.php
r62545 r62550 3835 3835 ); 3836 3836 3837 foreach ( $threshold_map as $threshold => $table ) { 3838 if ( $thresholds[ $threshold ] <= $results[ $table ]->rows ) { 3839 return true; 3840 } 3841 } 3842 3843 return false; 3837 return array_any( $threshold_map, fn( $table, $threshold ) => $thresholds[ $threshold ] <= $results[ $table ]->rows ); 3844 3838 } 3845 3839 -
trunk/src/wp-admin/includes/post.php
r62353 r62550 1981 1981 1982 1982 // If the new autosave has the same content as the post, delete the autosave. 1983 $autosave_is_different = false; 1984 foreach ( array_intersect( array_keys( $new_autosave ), array_keys( _wp_post_revision_fields( $post ) ) ) as $field ) { 1985 if ( normalize_whitespace( $new_autosave[ $field ] ) !== normalize_whitespace( $post->$field ) ) { 1986 $autosave_is_different = true; 1987 break; 1988 } 1989 } 1983 $fields = array_intersect( array_keys( $new_autosave ), array_keys( _wp_post_revision_fields( $post ) ) ); 1984 $autosave_is_different = array_any( $fields, fn( $field ) => normalize_whitespace( $new_autosave[ $field ] ) !== normalize_whitespace( $post->$field ) ); 1990 1985 1991 1986 if ( ! $autosave_is_different ) { -
trunk/src/wp-includes/block-template-utils.php
r61734 r62550 1462 1462 $directories_to_ignore = array( '.DS_Store', '.svn', '.git', '.hg', '.bzr', 'node_modules', 'vendor' ); 1463 1463 1464 foreach ( $directories_to_ignore as $directory ) { 1465 if ( str_starts_with( $path, $directory ) ) { 1466 return true; 1467 } 1468 } 1469 1470 return false; 1464 return array_any( $directories_to_ignore, fn( $directory ) => str_starts_with( $path, $directory ) ); 1471 1465 } 1472 1466 -
trunk/src/wp-includes/class-wp-block-processor.php
r62461 r62550 1599 1599 } 1600 1600 1601 foreach ( $block_type as $block ) { 1602 if ( $this->is_block_type( $block ) ) { 1603 return true; 1604 } 1605 } 1606 1607 return false; 1601 return array_any( $block_type, fn( $block ) => $this->is_block_type( $block ) ); 1608 1602 } 1609 1603 -
trunk/src/wp-includes/class-wp-scripts.php
r62368 r62550 851 851 } 852 852 853 foreach ( (array) $this->default_dirs as $test ) { 854 if ( str_starts_with( $src, $test ) ) { 855 return true; 856 } 857 } 858 return false; 853 return array_any( (array) $this->default_dirs, fn( $test ) => str_starts_with( $src, $test ) ); 859 854 } 860 855 -
trunk/src/wp-includes/class-wp-styles.php
r61927 r62550 460 460 } 461 461 462 foreach ( (array) $this->default_dirs as $test ) { 463 if ( str_starts_with( $src, $test ) ) { 464 return true; 465 } 466 } 467 return false; 462 return array_any( (array) $this->default_dirs, fn( $test ) => str_starts_with( $src, $test ) ); 468 463 } 469 464 -
trunk/src/wp-includes/kses.php
r62531 r62550 2057 2057 $scheme = strtolower( $scheme ); 2058 2058 2059 $allowed = false; 2060 foreach ( (array) $allowed_protocols as $one_protocol ) { 2061 if ( strtolower( $one_protocol ) === $scheme ) { 2062 $allowed = true; 2063 break; 2064 } 2065 } 2059 $allowed = array_any( (array) $allowed_protocols, fn( $protocol ) => strtolower( $protocol ) === $scheme ); 2066 2060 2067 2061 if ( $allowed ) {
Note: See TracChangeset
for help on using the changeset viewer.