function ctools_stylizer_cleanup_style

Clean up no longer used files.

To prevent excess clutter in the files directory, this should be called whenever a style is going out of use. When being deleted, but also when the palette is being changed.

1 call to ctools_stylizer_cleanup_style()
theme_ctools_stylizer_preview_form in includes/stylizer.inc
Theme the stylizer preview form.

File

includes/stylizer.inc, line 151

Code

function ctools_stylizer_cleanup_style($plugin, $settings) {
    ctools_include('css');
    $path = ctools_stylizer_get_image_path($plugin, $settings, FALSE);
    if ($path) {
        ctools_stylizer_recursive_delete($path);
    }
    ctools_css_clear(ctools_stylizer_get_css_id($plugin, $settings));
}