1 layout.module | _layout_clean_custom_css($classes = array()) |
Utility function to clean CSS for Layout UI.
Parameters
string $classes: CSS classes, as entered into the Layout user interface.
Return value
string: String of sanitized classes separated by spaces.
File
- core/
modules/ layout/ layout.module, line 2747 - The Layout module creates pages and wraps existing pages in layouts.
Code
function _layout_clean_custom_css($classes = array()) {
if (!empty($classes)) {
$new_classes = explode(' ', $classes);
foreach ($new_classes as $class) {
$clean_classes[] = backdrop_clean_css_identifier($class, array());
}
$clean_classes = array_filter($clean_classes);
return implode(' ', $clean_classes);
}
return '';
}