waughj / wp-media-sizes
简化设置WordPress媒体尺寸的类。
v0.2.0
2020-04-28 19:12 UTC
Requires
- php: >=7.2
- waughj/test-hash-item: ^2.0
Requires (Dev)
This package is auto-updated.
Last update: 2024-09-29 04:43:35 UTC
README
简化设置WordPress媒体尺寸的类。
用法
use WaughJ\WPMediaSizes\WPMediaSizes;
WPMediaSizes::add
([
[ 'name' => 'thumbnail', 'width' => 300, 'height' => 300, 'crop' => true ],
[ 'name' => 'small', 'width' => 800, 'height' => 600 ],
[ 'name' => 'small_medium', 'width' => 1200, 'height' => 600 ],
[ 'name' => 'medium', 'width' => 1440, 'height' => 900 ],
[ 'name' => 'medium_large', 'width' => 1600, 'height' => 900 ],
[ 'name' => 'large', 'width' => 1920, 'height' => 1200 ],
[ 'name' => 'huge', 'width' => 2560, 'height' => 1440 ]
]);
变更日志
0.2.0
- 分开清晰和重置功能
0.1.0
- 首次发布