function ctools_stylizer_add_css in Chaos Tool Suite (ctools) 6
Same name and namespace in other branches
- 7 includes/stylizer.inc \ctools_stylizer_add_css()
Add the necessary CSS for a stylizer plugin to the page.
This will check to see if the images directory and the cached CSS exists and, if not, will regenerate everything needed.
File
- includes/
stylizer.inc, line 74 - Create customized CSS and images from palettes created by user input.
Code
function ctools_stylizer_add_css($plugin, $settings) {
if (!file_exists(ctools_stylizer_get_image_path($plugin, $settings, FALSE))) {
ctools_stylizer_build_style($plugin, $settings, TRUE);
return;
}
ctools_include('css');
$filename = ctools_css_retrieve(ctools_stylizer_get_css_id($plugin, $settings));
if (!$filename) {
ctools_stylizer_build_style($plugin, $settings, TRUE);
}
else {
ctools_css_add_css($filename);
}
}