Skip to content

Commit df8741f

Browse files
committed
Remove unused auto_sizes_get_width function
1 parent 5c6f7fd commit df8741f

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

plugins/auto-sizes/includes/improve-calculate-sizes.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,6 @@
66
* @since n.e.x.t
77
*/
88

9-
/**
10-
* Gets the smaller image size if the layout width is bigger.
11-
*
12-
* It will return the smaller image size and return "px" if the layout width
13-
* is something else, e.g. min(640px, 90vw) or 90vw.
14-
*
15-
* @since 1.1.0
16-
*
17-
* @param string $layout_width The layout width.
18-
* @param int $image_width The image width.
19-
* @return string The proper width after some calculations.
20-
*/
21-
function auto_sizes_get_width( string $layout_width, int $image_width ): string {
22-
if ( str_ends_with( $layout_width, 'px' ) ) {
23-
return $image_width > (int) $layout_width ? $layout_width : $image_width . 'px';
24-
}
25-
return $image_width . 'px';
26-
}
27-
289
/**
2910
* Primes attachment into the cache with a single database query.
3011
*

0 commit comments

Comments
 (0)