Convert local @import statements to external.

Paramètres

array $matches: Array of matched items from preg_replace_callback().

string $url: URL of where the original CSS is located.

Return value

string New import statement.

1 call to advagg_relocate_load_stylesheet_local()
advagg_relocate_css_post_alter dans advagg_relocate/advagg_relocate.module
Alter the css array.
1 string reference to 'advagg_relocate_load_stylesheet_local'
advagg_relocate_css_post_alter dans advagg_relocate/advagg_relocate.module
Alter the css array.

Fichier

advagg_relocate/advagg_relocate.module, line 1165

Code

function advagg_relocate_load_stylesheet_local(array $matches, $url = '') {
    $_url =& drupal_static(__FUNCTION__, '');
    // Store base path for preg_replace_callback.
    if (!empty($url)) {
        $_url = $url;
    }
    // Short circuit if no matches were passed in.
    if (empty($matches)) {
        return '';
    }
    $css_url = $_url . $matches[1];
    return "@import \"{$css_url}\";";
}