WP Version 5.4.2 There is an image size definition of medium_large with size_w = 768 and size_h = 0 - You can find it near line 530 of wp-admin/includes/schema.php:
// 4.4.0
'medium_large_size_w' => 768,
'medium_large_size_h' => 0,
I'm wondering what sense this definition makes?
WP Version 5.4.2 There is an image size definition of medium_large with size_w = 768 and size_h = 0 - You can find it near line 530 of wp-admin/includes/schema.php:
// 4.4.0
'medium_large_size_w' => 768,
'medium_large_size_h' => 0,
I'm wondering what sense this definition makes?
Share Improve this question asked Jul 7, 2020 at 17:05 TomTom 131 silver badge5 bronze badges1 Answer
Reset to default 1It appears that it's eventually used as a parameter to wp_constrain_dimensions
where '0' means 'no limit'.
It's only used directly in media.php:85
} elseif ( 'medium_large' === $size ) {
$max_width = intval( get_option( 'medium_large_size_w' ) );
$max_height = intval( get_option( 'medium_large_size_h' ) );
if ( intval( $content_width ) > 0 ) {
$max_width = min( intval( $content_width ), $max_width );
}
$max_height then used at :135
return wp_constrain_dimensions( $width, $height, $max_width, $max_height );
Docs here show 0 means no limit
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742284480a4415080.html
评论列表(0条)