Checks if the filename matches the advagg file pattern.

Paramètres

string $filename: Path to check.

Return value

int Returns 1 if the pattern matches, 0 if it does not.

3 calls to advagg_match_file_pattern()
advagg_file_url_alter dans ./advagg.module
Implements hook_file_url_alter().
advagg_get_hashes_from_filename dans ./advagg.missing.inc
Given a filename return the type and 2 hashes.
advagg_url_inbound_alter dans ./advagg.module
Implements hook_url_inbound_alter().

Fichier

./advagg.module, line 4898

Code

function advagg_match_file_pattern($filename) {
    return preg_match('/.*(j|cs)s' . ADVAGG_SPACE . '[A-Za-z0-9-_]{43}' . ADVAGG_SPACE . '[A-Za-z0-9-_]{43}' . ADVAGG_SPACE . '[A-Za-z0-9-_]{43}\\.(j|cs)s$/', $filename);
}