function sweaver_plugin_styles::sweaver_ctools_css_filter in Sweaver 7
Same name and namespace in other branches
- 6 plugins/sweaver_plugin_styles/sweaver_plugin_styles.inc \sweaver_plugin_styles::sweaver_ctools_css_filter()
Filter a chunk of CSS text. Based on CTools, but we want the regex for url out. This might become a setting too later.
1 call to sweaver_plugin_styles::sweaver_ctools_css_filter()
- sweaver_plugin_styles::sweaver_export_file in plugins/
sweaver_plugin_styles/ sweaver_plugin_styles.inc - Export css to file.
File
- plugins/
sweaver_plugin_styles/ sweaver_plugin_styles.inc, line 477 - Styles plugin.
Class
Code
function sweaver_ctools_css_filter($css, $compressed = TRUE) {
ctools_include('css');
$css_data = ctools_css_disassemble($css);
$empty_array = array();
$allowed_properties = $this
->sweaver_ctools_allowed_properties();
$disallowed_values_regex = '/(expression)/';
$filtered = ctools_css_filter_css_data($css_data, $allowed_properties, $empty_array, '', $disallowed_values_regex);
return $compressed ? ctools_css_compress($filtered) : ctools_css_assemble($filtered);
}