Hook |
peepso_filter_cover_sizes_to_delete
|
Plugin | PeepSo Foundation |
Since | 1.11.4 |
Status | Active |
Args |
array(int) |
Description #
To use a custom cover size in your theme or plugin, simply pass an integer to PeepSoUser::get_cover($value)
. Custom sized images are generated on-the-fly and stored in the user’s directory.
If you do use custom cover images by passing an integer to PeepSoUser::get_cover()
, you should hook into this filter to make sure your custom sized cover is deleted when the user removes it.
Examples #
Let’s say you use a custom sized cover of 666 somewhere in your plugin or theme:
Since PeepSo creates a file on-the-fly if needed, make sure the file is cleaned up when user removes his cover. To do that, you need to add your custom size to the array of integers.