-
Notifications
You must be signed in to change notification settings - Fork 8
1. Installation
jc-vgermanov edited this page Apr 8, 2020
·
5 revisions
- Download, unzip and upload to your WordPress plugins directory
- Activate the plugin within you WordPress Administration Backend
- Register configuration hook in your
functions.php
theme file. - Setup the configuration array of images sizes.
More details about the plugin configuration you can find out in this wiki.
To set configuration options you should create a new function and register a new filter hook rwd_image_sizes
inside your functions.php
file:
add_filter('rwd_image_sizes', 'my_rwd_image_sizes');
function my_rwd_image_sizes( $image_sizes ) {
$my_image_sizes = array( ... );
return $my_image_sizes;
}
If you have complex sizes with a lot of different image sizes - we recommend using a separate file to store settings. In this case, load function will look like this:
add_filter('rwd_image_sizes', 'my_rwd_image_sizes');
function my_rwd_image_sizes( $image_sizes ) {
return include get_stylesheet_directory() . '/rwd-image-sizes.php';
}
After that you need to create a new file called rwd-image-sizes.php
and set a configuration array there.
Next: Configuration array