root / drupal7 / sites / all / themes / adaptivetheme / at_core / inc / forms / at_core.submit.customcss.inc @ 74f6bef0
1 |
<?php |
---|---|
2 |
|
3 |
/** |
4 |
* @file |
5 |
* Save custom CSS to file |
6 |
*/ |
7 |
function at_core_submit_custom_css($values, $theme_name, $path) { |
8 |
$custom_css = ''; |
9 |
if (!empty($values['custom_css'])) { |
10 |
// sanitize user entered data |
11 |
$custom_css = filter_xss_admin($values['custom_css']); |
12 |
} |
13 |
|
14 |
$file_name = $theme_name . '.custom.css'; |
15 |
$filepath = $path . '/' . $file_name; |
16 |
file_unmanaged_save_data($custom_css, $filepath, FILE_EXISTS_REPLACE); |
17 |
} |