ralfhortt / wp-image-sizes
A helper class to register image sizes
Installs: 1 833
Dependents: 2
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
This package is auto-updated.
Last update: 2024-11-17 04:19:46 UTC
README
A helper class to register image sizes
Description
Image sizes are register like the default function add_image_size, beside of that, the image size will be added to the dropdown selection.
Installation
$ composer require ralfhortt/wp-image-sizes
Documentation
<?php new ImageSize(string $identifier, string $label, int $width, int $height, bool $crop);
Usage
<?php use RalfHortt\ImageSizes\ImageSize; (new ImageSize('tiny', __('Tiny', 'TEXTDOMAIN'), 50, 50, true))->register();