get_udims

函数
get_udims ( $width, $height )
参数
  • (int) $width Current width of the image
    Required:
  • (int) $height Current height of the image
    Required:
返回值
  • (array) Shrunk dimensions (width, height).
相关
  • wp_constrain_dimensions()
定义位置
相关方法
get_dropinsget_dirsizeget_plugins_get_dropinsget_links
引入
2.0.0
弃用
3.5.0

get_udims: uDims是一个处理WordPress中响应式图片的系统。

计算一个下采样的图像的新尺寸。

function get_udims( $width, $height ) {
	_deprecated_function( __FUNCTION__, '3.5.0', 'wp_constrain_dimensions()' );
	return wp_constrain_dimensions( $width, $height, 128, 96 );
}

常见问题

FAQs
查看更多 >
闪电伯伯

(工作日 10:00 - 18:30 为您服务)

2025-11-18 14:27:29

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: