Skip to content

Commit

Permalink
Fix incorrect code comments
Browse files Browse the repository at this point in the history
  • Loading branch information
brettsmason authored Sep 18, 2024
1 parent a9ccf26 commit b509be0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions includes/classes/RemoteFiles/RemoteFiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function setup() {

// Update Image URLs
add_filter( 'wp_get_attachment_image_src', [ $this, 'image_src' ] );
add_filter( 'wp_calculate_image_srcset', [ $this, 'image_srcset' ], 10, 5 );
add_filter( 'wp_calculate_image_srcset', [ $this, 'image_srcset' ] );
add_filter( 'wp_get_attachment_image_attributes', [ $this, 'image_attr' ], 99 );
add_filter( 'wp_prepare_attachment_for_js', [ $this, 'image_js' ], 10, 3 );
add_filter( 'the_content', [ $this, 'image_content' ] );
Expand Down Expand Up @@ -113,13 +113,13 @@ public function image_attr( array $attr ): array {
/**
* Modify Image Srcset
*
* @param array $size_array An array of width and height values.
* @param array $sources One or more arrays of source data to include in the ‘srcset’.
*
* @return array
*/
public function image_srcset( $size_array ): array {
public function image_srcset( $sources ): array {

foreach ( $size_array as $source => $source_data ) {
foreach ( $sources as $source => $source_data ) {
$sources[ $source ]['url'] = $this->update_image_url( $source_data['url'] );
}

Expand Down

0 comments on commit b509be0

Please sign in to comment.