Skip to content

Commit

Permalink
Script Loader: Correct the number of arguments passed to `WP_Styles::…
Browse files Browse the repository at this point in the history
…get_etag()`.

This fixes an issue with the usage of the new `$wp_styles->get_etag()` method in `wp-admin/load-styles.php`, where `$wp_version` is passed as the first argument instead of `$load` being used as the ''only'' argument.

Follow-up to [58935].

Props justlevine, mukesh27, swissspidy.
See #52217, #61485.

git-svn-id: https://develop.svn.wordpress.org/trunk@59341 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Nov 4, 2024
1 parent 16de833 commit 6996faa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wp-admin/load-styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
$wp_styles = new WP_Styles();
wp_default_styles( $wp_styles );

$etag = $wp_styles->get_etag( $wp_version, $load );
$etag = $wp_styles->get_etag( $load );

if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) === $etag ) {
header( "$protocol 304 Not Modified" );
Expand Down

0 comments on commit 6996faa

Please sign in to comment.