Commit f400a1d0 authored by japerry's avatar japerry

Panels 3.9 Code Cleanup

parent 698da19d
......@@ -88,4 +88,4 @@ Known Issue http://drupal.org/node/207859
secure pages doesn't know about. When trying to make non-secure ajax calls
from a secure page, the browser denies the call.
Solution:
The solution is to simply add panels/* to your Secure Pages configuration.
\ No newline at end of file
The solution is to simply add panels/* to your Secure Pages configuration.
Welcome to Panels 3
Documentation is available at https://www.drupal.org/node/496278
\ No newline at end of file
Documentation is available at https://www.drupal.org/node/496278
.dashboard-entry .dashboard-link {
font-size: 120%;
font-weight: bold;
......
div.panel-pane div.admin-links {
font-size: xx-small;
margin-right: 1em;
......
.layout-link {
float: left;
padding: 1em;
......@@ -141,12 +140,12 @@ table .argument-operation input {
}
tr.changed td {
background-color: #FFFFDD !important;
background-color: #ffffdd !important;
}
tr.changed td span.star {
font-weight: bold;
color: #E09010;
color: #e09010;
}
td select {
......
#panels-dnd-main {
margin: 0.5em 0;
}
......@@ -42,7 +41,7 @@ div.panels-set-title-hide .panels-set-title {
}
/* Add Icon */
#panels-dnd-main div.panel-region .pane-add-link {
#panels-dnd-main div.panel-region .pane-add-link {
}
#panels-dnd-main div.panel-region .pane-add-link img {
display: none;
......@@ -127,24 +126,24 @@ div.panels-set-title-hide .panel-pane-is-title {
}
.panel-portlet .changed div.grab-title {
background-color: #FFFFDD !important;
border-bottom: 1px solid #3D9CD7 !important;
background-color: #ffffdd !important;
border-bottom: 1px solid #3d9cd7 !important;
color: black !important;
}
.panel-portlet .changed.hidden-pane div.grab-title {
background-color: #B4B488 !important;
border-bottom: 1px solid #3D9CD7 !important;
background-color: #b4b488 !important;
border-bottom: 1px solid #3d9cd7 !important;
}
.panel-portlet .changed div.grab-title span.star {
font-weight: bold;
color: #E09010;
color: #e09010;
}
.panel-portlet .grabber:hover {
color: #fff;
background-color: #2F78A5;
background-color: #2f78a5;
}
.panel-portlet.hidden-pane .grab-title:hover {
......@@ -175,7 +174,8 @@ div.panels-set-title-hide .panel-pane-is-title {
margin: 0;
}
.panel-portlet .buttons input, .panel-portlet .buttons button {
.panel-portlet .buttons input,
.panel-portlet .buttons button {
margin: 0;
padding: 0;
display: inline;
......@@ -186,7 +186,7 @@ div.panels-set-title-hide .panel-pane-is-title {
}
.panel-portlet .pane-title {
font-size:110%;
font-size: 110%;
cursor: pointer;
}
......@@ -315,7 +315,7 @@ a.close img {
padding-left: 1em;
padding-bottom: 1em;
margin-bottom: 1em;
background-color: #EEEEEE;
background-color: #eeeeee;
}
.panels-section-columns {
......@@ -354,7 +354,7 @@ a.close img {
.panels-section-column-categories .inside {
padding: 0;
}
}
.panels-section-column-categories .content-type-button {
padding-left: 10px;
......@@ -431,7 +431,7 @@ a.close img {
float: none;
}
.panels-modal-content .modal-form .no-float label {
.panels-modal-content .modal-form .no-float label {
width: auto;
}
......@@ -502,7 +502,6 @@ html.js div.panels-display-links div.ctools-dropdown-container ul li a {
/* @group CTools Dropdown */
#panels-dnd-main .ctools-dropdown a.ctools-dropdown-text-link,
html.js div.panels-display-links a.ctools-dropdown-text-link {
background: url('../images/arrow-down-light.png') 0 3px no-repeat!important;
padding-left: 12px;
}
......@@ -522,7 +521,6 @@ html.js div.panels-display-links div.ctools-dropdown-container {
html.js #panels-dnd-main div.ctools-dropdown div.ctools-dropdown-container ul li,
html.js div.panels-display-links div.ctools-dropdown-container ul li {
text-decoration: none;
padding: 0;
margin: 0;
......@@ -565,7 +563,7 @@ html.js #panels-dnd-main div.ctools-dropdown div.ctools-dropdown-container ul li
html.js div.panels-display-links div.ctools-dropdown-container ul li .panels-sub-menu ul li a,
html.js #panels-dnd-main div.ctools-dropdown div.ctools-dropdown-container ul li .panels-sub-menu span.panels-text,
html.js div.panels-display-links div.ctools-dropdown-container ul li .panels-sub-menu span.panels-text {
width:auto;
width: auto;
padding: 0 20px;
}
......@@ -682,4 +680,3 @@ div.ctools-modal-content {
top: -2em;
margin-bottom: -2em;
}
div.panels-page-type-container {
clear: left;
}
......
<?php
/**
* @file
* Internationalization (i18n) hooks
* Internationalization (i18n) hooks.
*/
/**
......
......@@ -206,6 +206,7 @@ function i18n_panels_panels_delete_display($did) {
*
* This function must not rely on the passed $renderer parameter. The parameter
* could be empty because this function is reused in i18n_ctools_render_alter().
*
* @todo Check if a drupal_alter() in panels_display::get_title() is applicable.
*
* @see i18n_ctools_render_alter()
......@@ -234,6 +235,7 @@ function i18n_panels_panels_pre_render(&$display, $renderer) {
*
* Under some circumstances the title of the panel page is set before
* hook_panels_pre_render() is fired. Such cases can be handled with this hook.
*
* @todo Check if a drupal_alter() in panels_display::get_title() is applicable.
*/
function i18n_ctools_render_alter(&$info, $page, $context) {
......@@ -250,7 +252,6 @@ function i18n_ctools_render_alter(&$info, $page, $context) {
* Implements hook_ctools_plugin_post_alter().
*
* Register some translatable configuration settings for plugins.
*
*/
function i18n_panels_ctools_plugin_post_alter(&$plugin, $plugin_type_info) {
if ($plugin_type_info['type'] == 'content_types') {
......@@ -366,7 +367,7 @@ function _18n_panels_is_exported_panels_display($display) {
*
* @todo I bet there are better ways to solve this mess.
*
* @param boolean $reset
* @param bool $reset
* Reset the static cache.
*
* @return array
......
<?php
/**
* @file callbacks.inc
* @file Callbacks.inc
* Minor menu callbacks for Panels helpers.
*/
......@@ -46,7 +46,7 @@ function panels_panels_dashboard_blocks(&$vars) {
'description' => t('Custom layouts can add more, site-specific layouts that you can use in your panels.'),
);
// Load all mini panels and their displays.
// Load all mini panels and their displays.
ctools_include('export');
$items = ctools_export_crud_load_all('panels_layout');
$count = 0;
......@@ -97,7 +97,7 @@ function template_preprocess_panels_dashboard(&$vars) {
$function($vars);
}
// Add in any default links for modules that are not active
// Add in any default links for modules that are not active.
panels_dashboard_final_blocks($vars);
// If page manager module is enabled, add a very low eight block to
......@@ -138,7 +138,7 @@ function template_preprocess_panels_dashboard(&$vars) {
'class' => 'dashboard-create',
);
// Turn the links into a block
// Turn the links into a block.
foreach ($vars['links'] as $link) {
$vars['blocks']['links']['content'] .= theme('panels_dashboard_link', array('link' => $link));
}
......@@ -148,7 +148,7 @@ function template_preprocess_panels_dashboard(&$vars) {
$vars['left'] = '';
$vars['right'] = '';
// Render all the blocks
// Render all the blocks.
foreach ($vars['blocks'] as $block) {
$section = !empty($block['section']) ? $block['section'] : 'left';
$vars[$section] .= theme('panels_dashboard_block', array('block' => $block));
......@@ -202,4 +202,3 @@ function panels_admin_panel_context_page() {
ctools_include('common', 'panels');
return drupal_get_form('panels_common_settings', 'panels_page');
}
......@@ -39,12 +39,11 @@
*
* @see panels_edit_layout()
* @see _panels_edit_layout()
*
*/
class panels_allowed_layouts {
/**
* Specifies whether newly-added layouts (as in, new .inc files) should be automatically
* Specifies whether newly-added layouts (as in, new .inc files) should be automatically
* allowed (TRUE) or disallowed (FALSE) for $this. Defaults to TRUE, which is more
* permissive but less of an administrative hassle if/when you add new layouts. Note
* that this parameter will be derived from $allowed_layouts if a value is passed in.
......@@ -52,19 +51,20 @@ class panels_allowed_layouts {
var $allow_new = TRUE;
/**
* Optional member. If provided, the Panels API will generate a drupal variable using
* Optional member. If provided, the Panels API will generate a drupal variable using
* variable_set($module_name . 'allowed_layouts', serialize($this)), thereby handling the
* storage of this object entirely within the Panels API. This object will be
* called and rebuilt by panels_edit_layout() if the same $module_name string is passed in
* for the $allowed_types parameter. \n
* This is primarily intended for convenience - client modules doing heavy-duty implementations
* of the Panels API will probably want to create their own storage method.
*
* @see panels_edit_layout()
*/
var $module_name = NULL;
/**
* An associative array of all available layouts, keyed by layout name (as defined
* An associative array of all available layouts, keyed by layout name (as defined
* in the corresponding layout plugin definition), with value = 1 if the layout is
* allowed, and value = 0 if the layout is not allowed.
* Calling array_filter(panels_allowed_layouts::$allowed_layout_settings) will return an associative array
......@@ -82,15 +82,14 @@ class panels_allowed_layouts {
/**
* Constructor function; loads the $allowed_layout_settings array with initial values according
* to $start_allowed
* to $start_allowed.
*
* @param bool $start_allowed
* $start_allowed determines whether all available layouts will be marked
* as allowed or not allowed on the initial call to panels_allowed_layouts::set_allowed()
*
* $start_allowed determines whether all available layouts will be marked
* as allowed or not allowed on the initial call to panels_allowed_layouts::set_allowed()
*/
function __construct($start_allowed = TRUE) {
// TODO would be nice if there was a way to just fetch the names easily
// TODO would be nice if there was a way to just fetch the names easily.
foreach ($this->list_layouts() as $layout_name) {
$this->allowed_layout_settings[$layout_name] = $start_allowed ? 1 : 0;
}
......@@ -121,6 +120,7 @@ class panels_allowed_layouts {
* drupal_goto('</path/to/desired/redirect>');
* }
* }
*
* @endcode \n
*
* If $allowed_layouts->form_state == 'failed-validate' || 'render', then you'll need to return
......@@ -135,8 +135,8 @@ class panels_allowed_layouts {
* you to control where the user ends up next.
*
* @param string $title
* Used to set the title of the allowed layouts form. If no value is given, defaults to
* 'Panels: Allowed Layouts'.
* Used to set the title of the allowed layouts form. If no value is given, defaults to
* 'Panels: Allowed Layouts'.
*
* @return mixed $result
* - On the first passthrough when the form is being rendered, $result is the form's structured
......@@ -147,11 +147,11 @@ class panels_allowed_layouts {
function set_allowed($title = 'Panels: Allowed Layouts') {
$this->sync_with_available();
$form_id = 'panels_common_set_allowed_layouts';
// TODO switch to drupal_build_form(); need to pass by ref
// TODO switch to drupal_build_form(); need to pass by ref.
$form = drupal_retrieve_form($form_id, $this, $title);
if ($result = drupal_process_form($form_id, $form)) {
// successful submit
// Successful submit.
$this->form_state = 'submit';
return $result;
}
......@@ -192,7 +192,6 @@ class panels_allowed_layouts {
* If you don't serialize the second parameter of variable_get() and the variable name you provide
* can't be found, an E_STRICT warning will be generated for trying to unserialize an entity
* that has not been serialized.
*
*/
function save() {
if (!is_null($this->module_name)) {
......@@ -217,6 +216,7 @@ class panels_allowed_layouts {
}
return $layouts;
}
}
/**
......@@ -292,7 +292,7 @@ function panels_common_settings($form, &$form_state, $module_name = 'panels_comm
'#tree' => TRUE,
);
// cheat a bit
// Cheat a bit.
$content_types['other'] = array('title' => t('Other'), 'weight' => 10);
foreach ($content_types as $id => $info) {
if (isset($allowed[$id])) {
......@@ -338,14 +338,14 @@ function panels_common_settings($form, &$form_state, $module_name = 'panels_comm
}
/**
* Submit hook for panels_common_settings
* Submit hook for panels_common_settings.
*/
function panels_common_settings_validate($form, &$form_state) {
panels_common_allowed_layouts_form_validate($form, $form_state);
}
/**
* Submit hook for panels_common_settings
* Submit hook for panels_common_settings.
*/
function panels_common_settings_submit($form, &$form_state) {
panels_common_allowed_layouts_form_submit($form, $form_state);
......@@ -377,8 +377,7 @@ function panels_common_settings_submit($form, &$form_state) {
* Based upon the settings, get the allowed types for this node.
*/
function panels_common_get_allowed_types($module, $contexts = array(), $has_content = FALSE, $default_defaults = array(), $default_allowed_types = array()) {
// Get a list of all types that are available
// Get a list of all types that are available.
$default_types = variable_get($module . '_default', $default_defaults);
$allowed_types = variable_get($module . '_allowed_types', $default_allowed_types);
......@@ -412,8 +411,8 @@ function panels_common_get_allowed_types($module, $contexts = array(), $has_cont
* @ingroup forms
*
* @param array $allowed_layouts
* The set of allowed layouts that should be used as the default values
* for this form. If none is provided, then by default no layouts will be restricted.
* The set of allowed layouts that should be used as the default values
* for this form. If none is provided, then by default no layouts will be restricted.
*/
function panels_common_allowed_layouts_form(&$form, &$form_state, $module_name) {
// Fetch our allowed layouts from variables.
......@@ -468,17 +467,17 @@ function panels_common_allowed_layouts_form_submit($form, &$form_state) {
function panels_common_get_allowed_layout_object($module_name) {
$allowed_layouts = unserialize(variable_get($module_name . "_allowed_layouts", serialize('')));
// if no parameter was provided, or the variable_get failed
// If no parameter was provided, or the variable_get failed.
if (!$allowed_layouts) {
// still no dice. simply creates a dummy version where all layouts
// Still no dice. simply creates a dummy version where all layouts
// are allowed.
$allowed_layouts = new panels_allowed_layouts();
$allowed_layouts->allow_new = TRUE;
$allowed_layouts->module_name = $module_name;
}
// sanitize allowed layout listing; this is redundant if the
// $allowed_layouts param was null, but the data is cached anyway
// Sanitize allowed layout listing; this is redundant if the
// $allowed_layouts param was null, but the data is cached anyway.
$allowed_layouts->sync_with_available();
return $allowed_layouts;
......@@ -493,7 +492,7 @@ function panels_common_get_allowed_layouts($module_name) {
if (empty($module_name)) {
return $available_layouts;
}
else if (is_object($module_name)) {
elseif (is_object($module_name)) {
$allowed_layouts = $module_name;
}
else {
......@@ -508,7 +507,7 @@ function panels_common_get_allowed_layouts($module_name) {
}
}
// Sort
// Sort.
$layouts = array();
asort($order);
......@@ -596,7 +595,6 @@ function panels_common_print_layout_links($layouts, $base_path, $link_options =
// We're doing these dependencies completely manualy, which is unusual, but
// the process code only supports doing them in a form.
// @todo modify dependent.inc to make this easier.
$dependencies = array();
foreach ($options as $category => $links) {
$dependencies['panels-layout-category-' . $category] = array(
......
<?php
/*
/**
* @file
* Core Panels API include file containing various display-editing functions.
* This includes all the basic editing forms (content, layout, layout settings)
......@@ -40,7 +40,7 @@ function _panels_edit($display, $destination, $content_types, $title = FALSE) {
}
/**
* Form definition for the panels display editor
* Form definition for the panels display editor.
*
* No validation function is necessary, as all 'validation' is handled
* either in the lead-up to form rendering (through the selection of
......@@ -48,6 +48,7 @@ function _panels_edit($display, $destination, $content_types, $title = FALSE) {
* the ajax modals & content types.
*
* @ingroup forms
*
* @see panels_edit_display_submit()
*/
function panels_edit_display_form($form, &$form_state) {
......@@ -157,7 +158,7 @@ function panels_edit_display_form_submit($form, &$form_state) {
$display->panels[$region_id] = array();
if ($panes) {
$pids = explode(',', $panes);
// need to filter the array, b/c passing it in a hidden field can generate trash
// Need to filter the array, b/c passing it in a hidden field can generate trash.
foreach (array_filter($pids) as $pid) {
if ($old_content[$pid]) {
$display->panels[$region_id][] = $pid;
......@@ -221,7 +222,7 @@ function panels_edit_display_settings_form($form, &$form_state) {
ctools_include('dependent');
if ($form_state['display_title']) {
$form['display_title'] = array (
$form['display_title'] = array(
'#tree' => TRUE,
);
......@@ -252,16 +253,15 @@ function panels_edit_display_settings_form($form, &$form_state) {
// We have to create a manual fieldset because fieldsets do not support IDs.
// Use 'hidden' instead of 'markup' so that the process will run.
// Add js for collapsible fieldsets manually
// drupal_add_js('misc/form.js');
// drupal_add_js('misc/collapse.js');
// $form['display_title']['contexts_prefix'] = array(
// '#type' => 'hidden',
// '#id' => 'edit-display-substitutions',
// '#prefix' => '<div><fieldset id="edit-display-substitutions" class="collapsed collapsible"><legend>' . t('Substitutions') . '</legend><div class="fieldset-wrapper">',
// '#process' => array('ctools_dependent_process'),
// '#dependency' => array('edit-display-title-hide-title' => array(PANELS_TITLE_FIXED)),
// );
// drupal_add_js('misc/form.js');
// drupal_add_js('misc/collapse.js');
// $form['display_title']['contexts_prefix'] = array(
// '#type' => 'hidden',
// '#id' => 'edit-display-substitutions',
// '#prefix' => '<div><fieldset id="edit-display-substitutions" class="collapsed collapsible"><legend>' . t('Substitutions') . '</legend><div class="fieldset-wrapper">',
// '#process' => array('ctools_dependent_process'),
// '#dependency' => array('edit-display-title-hide-title' => array(PANELS_TITLE_FIXED)),
// );
$rows = array();
foreach ($display->context as $context) {
foreach (ctools_context_get_converters('%' . check_plain($context->keyword) . ':', $context) as $keyword => $title) {
......@@ -279,17 +279,15 @@ function panels_edit_display_settings_form($form, &$form_state) {
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#value' => theme('table', array('header' => $header, 'rows' => $rows)),
// '#process' => array('form_process_fieldset', 'ctools_dependent_process'),
// '#id' => 'edit-display-title-context',
// '#dependency' => array('edit-display-title-hide-title' => array(PANELS_TITLE_FIXED)),
// '#process' => array('form_process_fieldset', 'ctools_dependent_process'), // '#id' => 'edit-display-title-context',
// '#dependency' => array('edit-display-title-hide-title' => array(PANELS_TITLE_FIXED)),
);
// $form['display_title']['contexts_suffix'] = array(
// '#value' => '</div></fieldset></div>',
// );
// $form['display_title']['contexts_suffix'] = array( // '#value' => '</div></fieldset></div>',
// );.
}
}
// TODO doc the ability to do this as part of the API
// TODO doc the ability to do this as part of the API.
if (!empty($layout['settings form']) && function_exists($layout['settings form'])) {
$form['layout_settings'] = $layout['settings form']($display, $layout, $display->layout_settings);
}
......
......@@ -2,7 +2,6 @@
/**
* @file
*
* Handle the forms for changing a display's layout.
*/
......@@ -33,7 +32,7 @@ function _panels_edit_layout($display, $finish, $destination, $allowed_layouts)
if (empty($_POST) || empty($_POST['form_id']) || $_POST['form_id'] != 'panels_change_layout') {
$output = drupal_build_form('panels_choose_layout', $form_state);
if (!empty($form_state['executed'])) {
// upon submission go to next form.
// Upon submission go to next form.
$change_form_state['layout'] = $_SESSION['layout'][$display->did] = $form_state['layout'];
$change_form = TRUE;
}
......@@ -147,7 +146,6 @@ function panels_choose_layout($form, &$form_state) {
$js['CTools']['dependent'] = $dependencies;
drupal_add_js($js, 'setting');
if (empty($form_state['no buttons'])) {
$form['submit'] = array(
'#type' => 'submit',
......@@ -293,7 +291,7 @@ function panels_change_layout_submit($form, &$form_state) {
foreach ($form_state['values']['panel']['pane'] as $region_id => $panes) {
if ($panes) {
$pids = explode(',', $panes);
// need to filter the array, b/c passing it in a hidden field can generate trash
// Need to filter the array, b/c passing it in a hidden field can generate trash.
foreach (array_filter($pids) as $pid) {
$switch[$pid] = $region_id;
}
......
<?php
/**
* @file
* Legacy state manager for Panels.
*/
/**
* Legacy state manager for Panels.
*
* Checks all possible ways (using discovery of patterned method names) in which
* Panels may need to operate in legacy mode,
* sets variables as appropriate, and returns an informational
*
* sets variables as appropriate, and returns an informational.
*/
class PanelsLegacyState {
var $legacy = NULL;
/**
* Translation wrapper.
*/
function t() {
$func = get_t();
$args = func_get_args();
return call_user_func_array($func, $args);
}
/**
* Get Status.
*/
function getStatus() {
if (!isset($this->legacy)) {
$this->determineStatus();
......@@ -29,7 +39,7 @@ class PanelsLegacyState {
*/
function determineStatus() {
$this->legacy = array();
foreach(get_class_methods($this) as $method) {
foreach (get_class_methods($this) as $method) {
if (strtolower(substr($method, 0, 5)) == 'check') {
$this->legacy[$method] = $this->$method();
}
......@@ -37,5 +47,4 @@ class PanelsLegacyState {
$this->legacy = array_filter($this->legacy);
}
// At this time there are no legacy checks.
}
......@@ -35,7 +35,7 @@ function panels_page_wizard_add_layout(&$form, &$form_state) {
'#value' => '</fieldset>',
);
// $form_state['cache'] = FALSE;
// $form_state['cache'] = FALSE;.
}
/**
......@@ -52,7 +52,6 @@ function panels_page_wizard_add_content(&$form, &$form_state) {
// Panels provides this caching mechanism to make it easy to use the
// wizard to cache the display.
$cache = panels_edit_cache_get('panels_page_wizard:' . $form_state['plugin']['name']);
$form_state['renderer'] = panels_get_renderer_handler('editor', $cache->display);
......@@ -68,14 +67,14 @@ function panels_page_wizard_add_content(&$form, &$form_state) {
}
/**
* Add content form submit handler
* Add content form submit handler.
*
* This is not a proper submit handler, it is meant to be called by a form's
* submit handler to handle submission.
*/
function panels_page_wizard_add_content_submit(&$form, &$form_state) {
// Call the normal panels edit form submit to make sure values are stored
// on the display
// on the display.
panels_edit_display_form_submit($form, $form_state);
$cache = &$form_state['wizard cache'];
......@@ -83,4 +82,3 @@ function panels_page_wizard_add_content_submit(&$form, &$form_state) {
$cache->display = &$form_state['display'];
unset($cache->display_cache);
}
......@@ -11,7 +11,7 @@
function panels_default_panels_renderer_pipeline() {
$pipelines = array();
$pipeline = new stdClass;
$pipeline = new stdClass();
$pipeline->disabled = FALSE; /* Edit this to true to make a default pipeline disabled initially */
$pipeline->api_version = 1;
$pipeline->name = 'standard';
......
......@@ -2,7 +2,6 @@
/**
* @file
*
* Contains helper code for plugins and contexts.
*/
......@@ -41,7 +40,7 @@ function panels_get_regions($layout, $display) {
* The cached content, or FALSE to indicate no cached content exists.
*/
function panels_get_cached_content($display, $args, $context, $pane = NULL) {
// Never use cache on a POST
// Never use cache on a POST.
if (!empty($_POST)) {
return FALSE;
}
......@@ -59,7 +58,7 @@ function panels_get_cached_content($display, $args, $context, $pane = NULL) {
return FALSE;
}
// restore it.
// Restore it.
$cache->restore();
return $cache;
}
......@@ -68,7 +67,7 @@ function panels_get_cached_content($display, $args, $context, $pane = NULL) {
* Store cached content for a given display and possibly pane.
*/
function panels_set_cached_content($cache, $display, $args, $context, $pane = NULL) {
// Never use cache on a POST
// Never use cache on a POST.
if (!empty($_POST)) {
return FALSE;
}
......@@ -82,7 +81,7 @@ function panels_set_cached_content($cache, $display, $args, $context, $pane = NU
$conf = $pane ? $pane->cache['settings'] : $display->cache['settings'];
// snapshot it.
// Snapshot it.
$cache->cache();
return $function($conf, $cache, $display, $args, $context, $pane);
}
......@@ -154,7 +153,7 @@ class panels_cache_object {
$this->ready = TRUE;
// Simple replacement for head
// Simple replacement for head.
$this->head = str_replace($this->head, '', drupal_add_html_head());
// Slightly less simple for CSS:
......@@ -248,6 +247,7 @@ class panels_cache_object {
}
}
}
}
/**
......@@ -412,7 +412,7 @@ function panels_get_renderer_handler($plugin, &$display) {
* Choose a renderer for a display based on a render pipeline setting.
*/
function panels_get_renderer($pipeline_name, &$display) {
// Load the pipeline
// Load the pipeline.
ctools_include('export');
$pipeline = ctools_export_crud_load('panels_renderer_pipeline', $pipeline_name);
......@@ -443,7 +443,7 @@ function panels_get_renderer($pipeline_name, &$display) {
return $renderer;
}
// Fall through. If no renderer is selected, use the standard renderer