function ctools_stylizer_get_image_path

Get the path where images will be stored for a style plugin and settings.

This function will make sure the path exists.

3 calls to ctools_stylizer_get_image_path()
ctools_stylizer_add_css in includes/stylizer.inc
Add the necessary CSS for a stylizer plugin to the page.
ctools_stylizer_build_style in includes/stylizer.inc
Build the files for a stylizer given the proper settings.
ctools_stylizer_cleanup_style in includes/stylizer.inc
Clean up no longer used files.

File

includes/stylizer.inc, line 209

Code

function ctools_stylizer_get_image_path($plugin, $settings, $check = TRUE) {
    $path = 'public://ctools/style/' . $settings['name'] . '/' . md5(serialize($settings['palette']));
    if (!file_prepare_directory($path, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS)) {
        drupal_set_message(t('Unable to create CTools styles cache directory @path. Check the permissions on your files directory.', array(
            '@path' => $path,
        )), 'error');
        return;
    }
    return $path;
}