function csstidy::css_new_property in Advanced CSS/JS Aggregation 6
Start a new propertie. If already references in this selector, rename it with extra space to avoid override
Parameters
string $media:
string $selector:
string $property:
Return value
string
1 call to csstidy::css_new_property()
- csstidy::parse in advagg_css_compress/
csstidy/ class.csstidy.inc - Parses CSS in $string. The code is saved as array in $this->css
File
- advagg_css_compress/
csstidy/ class.csstidy.inc, line 1085
Class
- csstidy
- CSS Parser class
Code
function css_new_property($media, $selector, $property) {
if ($this
->get_cfg('preserve_css')) {
return $property;
}
if (!$this->css or !isset($this->css[$media][$selector]) or !$this->css[$media][$selector]) {
return $property;
}
while (isset($this->css[$media][$selector][$property])) {
$property .= " ";
}
return $property;
}