File tree Expand file tree Collapse file tree 1 file changed +0
-19
lines changed
plugins/auto-sizes/includes Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Original file line number Diff line number Diff line change 6
6
* @since n.e.x.t
7
7
*/
8
8
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
-
28
9
/**
29
10
* Primes attachment into the cache with a single database query.
30
11
*
You can’t perform that action at this time.
0 commit comments