Implements hook_panels_pre_render().

Fichier

./advagg.module, line 480

Code

function advagg_panels_pre_render($panels_display, &$renderer) {
    // Do not run hook if AdvAgg is disabled.
    if (!advagg_enabled()) {
        return;
    }
    // Do not run hook if setting is disabled.
    if (!variable_get('advagg_scripts_scope_anywhere', ADVAGG_SCRIPTS_SCOPE_ANYWHERE)) {
        return;
    }
    $info = "{$panels_display->layout}:{$panels_display->css_id}";
    $prefix = "<!-- AdvAgg panels:prefix:{$info} tag -->";
    $suffix = "<!-- AdvAgg panels:suffix:{$info} tag -->";
    if (!isset($renderer->prefix)) {
        $renderer->prefix = '';
    }
    $renderer->prefix .= $prefix;
    if (!isset($renderer->suffix)) {
        $renderer->suffix = '';
    }
    $renderer->suffix .= $suffix;
}