https://github.com/wpessential/wpessential-images
WPEssential Images helping for the images registry in WordPress.
https://github.com/wpessential/wpessential-images
Last synced: 4 months ago
JSON representation
WPEssential Images helping for the images registry in WordPress.
- Host: GitHub
- URL: https://github.com/wpessential/wpessential-images
- Owner: wpessential
- License: gpl-3.0
- Created: 2024-08-07T14:17:11.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-09-10T22:58:30.000Z (almost 2 years ago)
- Last Synced: 2024-09-11T20:26:32.750Z (almost 2 years ago)
- Language: PHP
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WPEssential Images
Help to register the images in WordPress.
`composer require wpessential/wpessential-images`
Add the single image to WordPress registry
```php
$prefix ='wpe';
$images = \WPEssential\Library\Images::make( $prefix );
$images->add([
'size' => [ 'w' => 1980, 'h' => 9999 ],
'croup' => true
]);
$images->init();
```
Add the multiple images to WordPress registry
```php
$prefix ='wpe';
$images = \WPEssential\Library\Images::make( $prefix );
$images->add([
[
'size' => [ 'w' => 1920, 'h' => 1080 ],
'croup' => true
],
[
'size' => [ 'w' => 1980, 'h' => 9999 ],
'croup' => true
]
]);
$images->init();
```
Remove the single image from WordPress registry
```php
$prefix ='wpe';
$images = \WPEssential\Library\Images::make( $prefix );
$images->remove('1920x1080');
$images->init();
```
Remove the multiple image from WordPress registry
```php
$prefix ='wpe';
$images = \WPEssential\Library\Images::make( $prefix );
$images->remove(['1920x1080']);
$images->init();
```