function _css3pie_create_css3pie_css in css3pie 6
helper function creates a real css file within files directory that be can added via drupal_add_css();
Parameters
<type> $css - the css markup:
Return value
<type>
1 call to _css3pie_create_css3pie_css()
- _css3pie_build_css3pie_css in ./
css3pie.module - helper function get all selectors and generates content for css file
File
- ./
css3pie.module, line 177 - css3pie.module a very simple Drupal module to implement the css3pie.com javascript to your drupal and make the css selectors configurable over ui. This module creates a real css file on drupal files folder and add them via drupal_add_css.
Code
function _css3pie_create_css3pie_css($css = NULL) {
if (!$css) {
return FALSE;
}
$css3pie_css_path = file_create_path('css3pie');
// check again for error message
if (!file_check_directory($css3pie_css_path, FILE_CREATE_DIRECTORY)) {
drupal_set_message(t('Unable to create CSS3PIE CSS Cache directory. Check permissions on your files directory.'), 'error');
return;
}
$filename = $css3pie_css_path . '/css3pie.css';
$filename = file_save_data($css, $filename, FILE_EXISTS_REPLACE);
// clear the css cache
drupal_clear_css_cache();
return $filename;
}