You are here

function panels_renderer_standard::add_meta in Panels 6.3

Same name and namespace in other branches
  1. 7.3 plugins/display_renderers/panels_renderer_standard.class.php \panels_renderer_standard::add_meta()

Attach out-of-band page metadata (e.g., CSS and JS).

This must be done before render, because panels-within-panels must have their CSS added in the right order: inner content before outer content.

2 calls to panels_renderer_standard::add_meta()
panels_renderer_editor::add_meta in plugins/display_renderers/panels_renderer_editor.class.php
Attach out-of-band page metadata (e.g., CSS and JS).
panels_renderer_standard::render in plugins/display_renderers/panels_renderer_standard.class.php
Build inner content, then hand off to layout-specified theme function for final render step.
1 method overrides panels_renderer_standard::add_meta()
panels_renderer_editor::add_meta in plugins/display_renderers/panels_renderer_editor.class.php
Attach out-of-band page metadata (e.g., CSS and JS).

File

plugins/display_renderers/panels_renderer_standard.class.php, line 394

Class

panels_renderer_standard
The standard render pipeline for a Panels display object.

Code

function add_meta() {
  if (!empty($this->plugins['layout']['css'])) {
    if (file_exists(path_to_theme() . '/' . $this->plugins['layout']['css'])) {
      $this
        ->add_css(path_to_theme() . '/' . $this->plugins['layout']['css']);
    }
    else {
      $this
        ->add_css($this->plugins['layout']['path'] . '/' . $this->plugins['layout']['css']);
    }
  }
  if ($this->admin && isset($this->plugins['layout']['admin css'])) {
    $this
      ->add_css($this->plugins['layout']['path'] . '/' . $this->plugins['layout']['admin css']);
  }
}