waughj / wp-media-sizes
Class that simplifies setting WordPress media sizes.
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: 2025-03-01 00:27:38 UTC
README
Class that simplifies setting WordPress media sizes.
Usage
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 ]
]);
Changelog
0.2.0
- Separate clear and reset functions
0.1.0
- Initial release