wpseek.com
WordPress开发者和主题制作者的搜索引擎
wp_expand_dimensions › WordPress Function
Since2.9.0
已弃用n/a
› wp_expand_dimensions ( $example_width, $example_height, $max_width, $max_height )
| 参数: (4) |
|
| 查看: | |
| 返回: |
|
| 定义在: |
|
| 文档: |
Based on a supplied width/height example, returns the biggest possible dimensions based on the max width/height.
源码
function wp_expand_dimensions( $example_width, $example_height, $max_width, $max_height ) {
$example_width = (int) $example_width;
$example_height = (int) $example_height;
$max_width = (int) $max_width;
$max_height = (int) $max_height;
return wp_constrain_dimensions( $example_width * 1000000, $example_height * 1000000, $max_width, $max_height );
}