updated panels to last dev, added panels_extra_styles

This commit is contained in:
2017-02-07 17:37:36 +01:00
parent a44ba1e90b
commit e2b8a1ae80
105 changed files with 2078 additions and 1065 deletions
@@ -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
// Fall through. If no renderer is selected, use the standard renderer.
return panels_get_renderer_handler('standard', $display);
}
@@ -454,9 +454,9 @@ function panels_get_renderer($pipeline_name, &$display) {
*/
function _panels_renderer_pipeline_sort($a, $b) {
if ($a->weight == $b->weight) {
if ($a->admin_title == $b->admin_title) {
return 0;
}
if ($a->admin_title == $b->admin_title) {
return 0;
}
return ($a->admin_title < $b->admin_title) ? -1 : 1;
}
return ($a->weight < $b->weight) ? -1 : 1;