Révision 74f6bef0
Ajouté par Assos Assos il y a plus de 10 ans
drupal7/sites/all/themes/adaptivetheme/at_core/inc/forms/at_core.submit.customcss.inc | ||
---|---|---|
4 | 4 |
* @file |
5 | 5 |
* Save custom CSS to file |
6 | 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 |
} |
|
7 | 13 |
|
8 |
$custom_css = ''; |
|
9 |
if (!empty($values['custom_css'])) { |
|
10 |
// sanitize user entered data |
|
11 |
$custom_css = filter_xss_admin($values['custom_css']); |
|
14 |
$file_name = $theme_name . '.custom.css'; |
|
15 |
$filepath = $path . '/' . $file_name; |
|
16 |
file_unmanaged_save_data($custom_css, $filepath, FILE_EXISTS_REPLACE); |
|
12 | 17 |
} |
13 |
|
|
14 |
$file_name = $theme_name . '.custom.css'; |
|
15 |
$filepath = $path . '/' . $file_name; |
|
16 |
file_unmanaged_save_data($custom_css, $filepath, FILE_EXISTS_REPLACE); |
Formats disponibles : Unified diff
Weekly update of contrib modules