You are here

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

Checks if the next word in a string from pos is a CSS property

@access private @version 1.2

Parameters

string $istring:

integer $pos:

Return value

bool

1 call to csstidy::property_is_next()
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 1152

Class

csstidy
CSS Parser class

Code

function property_is_next($istring, $pos) {
  $all_properties =& $GLOBALS['csstidy']['all_properties'];
  $istring = substr($istring, $pos, strlen($istring) - $pos);
  $pos = strpos($istring, ':');
  if ($pos === false) {
    return false;
  }
  $istring = strtolower(trim(substr($istring, 0, $pos)));
  if (isset($all_properties[$istring])) {
    $this
      ->log('Added semicolon to the end of declaration', 'Warning');
    return true;
  }
  return false;
}