Skip to content

Commit

Permalink
Merge branch 'trunk' into try/performance-tests-expand
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed Dec 19, 2024
2 parents 05cd6a2 + 816ec5d commit db424c4
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/wp-admin/includes/credits.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ function wp_credits_section_list( $credits = array(), $slug = '' ) {
echo '<li class="wp-person" id="wp-person-' . esc_attr( $person_data[2] ) . '">' . "\n\t";
echo '<a href="' . esc_url( sprintf( $credits_data['profiles'], $person_data[2] ) ) . '" class="web">';
$size = $compact ? 80 : 160;
$data = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array( 'size' => $size ) );
$data2x = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array( 'size' => $size * 2 ) );
$data = get_avatar_data( $person_data[1] . '@sha256.gravatar.com', array( 'size' => $size ) );
$data2x = get_avatar_data( $person_data[1] . '@sha256.gravatar.com', array( 'size' => $size * 2 ) );
echo '<span class="wp-person-avatar"><img src="' . esc_url( $data['url'] ) . '" srcset="' . esc_url( $data2x['url'] ) . ' 2x" class="gravatar" alt="" /></span>' . "\n";
echo esc_html( $person_data[0] ) . "</a>\n\t";
if ( ! $compact && ! empty( $person_data[3] ) ) {
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/class-wp-user-query.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public static function fill_query_vars( $args ) {
* - 'login__in'
* - 'user_nicename' (or 'nicename')
* - 'nicename__in'
* - 'user_email (or 'email')
* - 'user_email' (or 'email')
* - 'user_url' (or 'url')
* - 'user_registered' (or 'registered')
* - 'post_count'
Expand Down
4 changes: 2 additions & 2 deletions src/wp-includes/script-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ function wp_default_packages_vendor( $scripts ) {
);

$vendor_scripts_versions = array(
'react' => '18.3.1',
'react-dom' => '18.3.1',
'react' => '18.3.1.1', // Final .1 due to switch to UMD build, can be removed in the next update.
'react-dom' => '18.3.1.1', // Final .1 due to switch to UMD build, can be removed in the next update.
'react-jsx-runtime' => '18.3.1',
'regenerator-runtime' => '0.14.1',
'moment' => '2.30.1',
Expand Down
15 changes: 15 additions & 0 deletions tests/phpunit/tests/dependencies/scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -3413,6 +3413,21 @@ public function test_vendor_script_versions_registered_manually( $script, $handl
$handle = $script;
}

/*
* Append '.1' to the version number for React and ReactDOM.
*
* This is due to a change in the build to use the UMD version of the
* scripts, requiring a different version number in order to break the
* caches of some CDNs.
*
* This can be removed in the next update to the packages.
*
* See https://core.trac.wordpress.org/ticket/62422
*/
if ( in_array( $handle, array( 'react', 'react-dom' ), true ) ) {
$package_json[ $script ] .= '.1';
}

$script_query = $wp_scripts->query( $handle, 'registered' );

$this->assertNotFalse( $script_query, "The script '{$handle}' should be registered." );
Expand Down

0 comments on commit db424c4

Please sign in to comment.