You are here

function csstidy::_add_token in Advanced CSS/JS Aggregation 6

Adds a token to $this->tokens

@access private @version 1.0

Parameters

mixed $type:

string $data:

bool $do add a token even if preserve_css is off:

1 call to csstidy::_add_token()
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 373

Class

csstidy
CSS Parser class

Code

function _add_token($type, $data, $do = false) {
  if ($this
    ->get_cfg('preserve_css') || $do) {
    $this->tokens[] = array(
      $type,
      $type == COMMENT ? $data : trim($data),
    );
  }
}