diff -up -r includes/admin.inc includes/admin.inc
--- includes/admin.inc 2011-03-21 22:31:23.000000000 -0500
+++ includes/admin.inc 2011-03-21 22:40:06.000000000 -0500
@@ -13,7 +13,7 @@
* can be panelized, whether they have a default, and provides links to
* edit those defaults.
*/
-function panelizer_settings_page_form(&$form_state) {
+function panelizer_settings_page_form($form, &$form_state) {
ctools_include('dependent');
$form = array();
$form['warnings'] = array();
@@ -42,7 +42,7 @@ function panelizer_settings_page_form(&$
'#theme' => 'panelizer_node_settings_page_form',
);
- $types = node_get_types('names');
+ $types = node_type_get_names();
drupal_alter('panelizer_default_types', $types, 'node');
$settings = variable_get('panelizer_defaults', array());
@@ -75,7 +75,7 @@ function panelizer_settings_page_form(&$
'#access' => FALSE, // Allowing a choice is curently disabled
);
- $base_url = 'admin/settings/panelizer/node/' . $type;
+ $base_url = 'admin/config/panelizer/node/' . $type;
$form['types']['node'][$type]['links'] = array(
'#prefix' => '
',
@@ -94,7 +94,7 @@ function panelizer_settings_page_form(&$
$form['types']['node'][$type]['links']['basic'] = array(
'#type' => 'item',
'#input' => TRUE, // necessary to fake the #process
- '#value' => theme('links', $links, array('class' => 'links inline')),
+ '#value' => theme('links', array('links' => $links, 'attributes' => array('class' => 'links inline'))),
'#id' => $base_id . '-links-basic',
'#process' => array('ctools_dependent_process'),
'#dependency' => array($base_id . '-status' => array(TRUE)),
@@ -125,7 +125,7 @@ function panelizer_settings_page_form(&$
$form['types']['node'][$type]['links']['default'] = array(
'#type' => 'item',
'#input' => TRUE, // necessary to fake the #process
- '#value' => theme('links', $links, array('class' => 'links inline')),
+ '#value' => theme('links', array('links' => $links, 'attributes' => array('class' => 'links inline'))),
'#id' => $base_id . '-links-default',
'#process' => array('ctools_dependent_process'),
'#dependency_count' => 2,
@@ -145,7 +145,7 @@ function panelizer_settings_page_form(&$
$form['types']['node'][$type]['links']['default2'] = array(
'#type' => 'item',
'#input' => TRUE, // necessary to fake the #process
- '#value' => theme('links', $links, array('class' => 'links inline')),
+ '#value' => theme('links', array('links' => $links, 'attributes' => array('class' => 'links inline'))),
'#id' => $base_id . '-links-default2',
'#process' => array('ctools_dependent_process'),
'#dependency_count' => 2,
@@ -173,7 +173,8 @@ function panelizer_settings_page_form(&$
*
* We want our checkboxes to show up in a table.
*/
-function theme_panelizer_node_settings_page_form($element) {
+function theme_panelizer_node_settings_page_form($variables) {
+ $element = $variables['form'];
$output = '';
// Render the 'node' table
@@ -194,12 +195,12 @@ function theme_panelizer_node_settings_p
);
}
- $output .= theme('table', $header, $rows);
+ $output .= theme('table', array('header' => $header, 'rows' => $rows));
// Render the 'user' table
// Render everything else
- $output .= drupal_render($element);
+ $output .= drupal_render_children($element);
return $output;
}
@@ -228,7 +229,7 @@ function panelizer_allowed_content_page(
// Drupal kills our breadcrumb. Put it back.
ctools_include('menu');
- ctools_menu_set_trail_parent('admin/settings/panelizer');
+ ctools_menu_set_trail_parent('admin/config/panelizer');
ctools_include('common', 'panels');
return drupal_get_form('panels_common_settings', 'panelizer_' . $type . ':' . $key);
@@ -252,7 +253,7 @@ function panelizer_default_settings_page
// Drupal kills our breadcrumb. Put it back.
ctools_include('menu');
- ctools_menu_set_trail_parent('admin/settings/panelizer');
+ ctools_menu_set_trail_parent('admin/config/panelizer');
$form_state = array(
'panelizer' => &$panelizer,
@@ -285,7 +286,7 @@ function panelizer_default_context_page(
// Drupal kills our breadcrumb. Put it back.
ctools_include('menu');
- ctools_menu_set_trail_parent('admin/settings/panelizer');
+ ctools_menu_set_trail_parent('admin/config/panelizer');
$form_state = array(
'panelizer' => &$panelizer,
@@ -326,7 +327,7 @@ function panelizer_default_layout_page($
// Drupal kills our breadcrumb. Put it back.
ctools_include('menu');
- ctools_menu_set_trail_parent('admin/settings/panelizer');
+ ctools_menu_set_trail_parent('admin/config/panelizer');
$display = panelizer_load_display($panelizer);
@@ -363,7 +364,7 @@ function panelizer_default_content_page(
// Drupal kills our breadcrumb. Put it back.
ctools_include('menu');
- ctools_menu_set_trail_parent('admin/settings/panelizer');
+ ctools_menu_set_trail_parent('admin/config/panelizer');
$cache = panels_edit_cache_get('panelizer:default:' . $type . ':' . $key . ':' . $name);
@@ -394,5 +395,6 @@ function panelizer_default_content_page(
// Print this with theme('page') so that blocks are disabled while editing a display.
// This is important because negative margins in common block layouts (i.e, Garland)
// messes up the drag & drop.
- print theme('page', $output, FALSE);
+ // TODO Please change this theme call as discussed at http://drupal.org/node/224333#theme_page.
+ // print theme('page', $output, FALSE);
}
diff -up -r includes/common.inc includes/common.inc
--- includes/common.inc 2011-03-21 22:31:23.000000000 -0500
+++ includes/common.inc 2011-03-21 22:40:06.000000000 -0500
@@ -124,6 +124,7 @@ function panelizer_default_context_form(
$description = t('More keywords will be available if you install the Token module, see http://drupal.org/project/token.');
}
+ // TODO Please change this theme call to use an associative array for the $variables parameter.
$form['left']['summary'] = array(
'#prefix' => '
',
'#suffix' => '
',
diff -up -r includes/node.inc includes/node.inc
--- includes/node.inc 2011-03-21 22:31:23.000000000 -0500
+++ includes/node.inc 2011-03-21 22:40:06.000000000 -0500
@@ -22,7 +22,7 @@ function panelizer_load_node_panelizer($
return FALSE;
}
- $panelizer = db_fetch_object(db_query("SELECT * FROM {panelizer_node} WHERE nid = %d", $node->nid));
+ $panelizer = db_fetch_object(db_query("SELECT * FROM {panelizer_node} WHERE nid = :nid", array(':nid' => $node->nid)));
if ($panelizer && !empty($panelizer->did)) {
ctools_include('export');
$panelizer = ctools_export_unpack_object('panelizer_node', $panelizer);
@@ -128,6 +128,10 @@ function panelizer_edit_node_settings_pa
return $output;
}
+/**
+ * @todo Please document this function.
+ * @see http://drupal.org/node/1354
+ */
function panelizer_panelize_node_form(&$form_state) {
$form = array();
@@ -251,7 +255,8 @@ function panelizer_edit_node_content_pag
// Print this with theme('page') so that blocks are disabled while editing a display.
// This is important because negative margins in common block layouts (i.e, Garland)
// messes up the drag & drop.
- print theme('page', $output, FALSE);
+ // TODO Please change this theme call as discussed at http://drupal.org/node/224333#theme_page.
+ // print theme('page', $output, FALSE);
}
/**
@@ -271,80 +276,80 @@ function panelizer_get_default_display_n
$display->title = '';
$display->content = array();
$display->panels = array();
- $pane = new stdClass;
- $pane->pid = 'new-1';
- $pane->panel = 'center';
- $pane->type = 'node_content';
- $pane->subtype = 'node_content';
- $pane->shown = TRUE;
- $pane->access = array();
- $pane->configuration = array(
- 'links' => 1,
- 'page' => 1,
- 'no_extras' => 0,
- 'override_title' => 0,
- 'override_title_text' => '',
- 'identifier' => '',
- 'link' => 0,
- 'leave_node_title' => 0,
- 'context' => 'panelizer',
- 'build_mode' => 'full',
- );
- $pane->cache = array();
- $pane->style = array(
- 'settings' => NULL,
- );
- $pane->css = array();
- $pane->extras = array();
- $pane->position = 0;
- $display->content['new-1'] = $pane;
- $display->panels['center'][0] = 'new-1';
- $pane = new stdClass;
- $pane->pid = 'new-2';
- $pane->panel = 'center';
- $pane->type = 'node_comments';
- $pane->subtype = 'node_comments';
- $pane->shown = TRUE;
- $pane->access = array();
- $pane->configuration = array(
- 'mode' => '4',
- 'order' => '2',
- 'comments_per_page' => '50',
- 'context' => 'panelizer',
- 'override_title' => 0,
- 'override_title_text' => '',
- );
- $pane->cache = array();
- $pane->style = array(
- 'settings' => NULL,
- );
- $pane->css = array();
- $pane->extras = array();
- $pane->position = 1;
- $display->content['new-2'] = $pane;
- $display->panels['center'][1] = 'new-2';
- $pane = new stdClass;
- $pane->pid = 'new-3';
- $pane->panel = 'center';
- $pane->type = 'node_comment_form';
- $pane->subtype = 'node_comment_form';
- $pane->shown = TRUE;
- $pane->access = array();
- $pane->configuration = array(
- 'anon_links' => 1,
- 'context' => 'panelizer',
- 'override_title' => 0,
- 'override_title_text' => '',
- );
- $pane->cache = array();
- $pane->style = array(
- 'settings' => NULL,
- );
- $pane->css = array();
- $pane->extras = array();
- $pane->position = 2;
- $display->content['new-3'] = $pane;
- $display->panels['center'][2] = 'new-3';
+ $pane = new stdClass;
+ $pane->pid = 'new-1';
+ $pane->panel = 'center';
+ $pane->type = 'node_content';
+ $pane->subtype = 'node_content';
+ $pane->shown = TRUE;
+ $pane->access = array();
+ $pane->configuration = array(
+ 'links' => 1,
+ 'page' => 1,
+ 'no_extras' => 0,
+ 'override_title' => 0,
+ 'override_title_text' => '',
+ 'identifier' => '',
+ 'link' => 0,
+ 'leave_node_title' => 0,
+ 'context' => 'panelizer',
+ 'build_mode' => 'full',
+ );
+ $pane->cache = array();
+ $pane->style = array(
+ 'settings' => NULL,
+ );
+ $pane->css = array();
+ $pane->extras = array();
+ $pane->position = 0;
+ $display->content['new-1'] = $pane;
+ $display->panels['center'][0] = 'new-1';
+ $pane = new stdClass;
+ $pane->pid = 'new-2';
+ $pane->panel = 'center';
+ $pane->type = 'node_comments';
+ $pane->subtype = 'node_comments';
+ $pane->shown = TRUE;
+ $pane->access = array();
+ $pane->configuration = array(
+ 'mode' => '4',
+ 'order' => '2',
+ 'comments_per_page' => '50',
+ 'context' => 'panelizer',
+ 'override_title' => 0,
+ 'override_title_text' => '',
+ );
+ $pane->cache = array();
+ $pane->style = array(
+ 'settings' => NULL,
+ );
+ $pane->css = array();
+ $pane->extras = array();
+ $pane->position = 1;
+ $display->content['new-2'] = $pane;
+ $display->panels['center'][1] = 'new-2';
+ $pane = new stdClass;
+ $pane->pid = 'new-3';
+ $pane->panel = 'center';
+ $pane->type = 'node_comment_form';
+ $pane->subtype = 'node_comment_form';
+ $pane->shown = TRUE;
+ $pane->access = array();
+ $pane->configuration = array(
+ 'anon_links' => 1,
+ 'context' => 'panelizer',
+ 'override_title' => 0,
+ 'override_title_text' => '',
+ );
+ $pane->cache = array();
+ $pane->style = array(
+ 'settings' => NULL,
+ );
+ $pane->css = array();
+ $pane->extras = array();
+ $pane->position = 2;
+ $display->content['new-3'] = $pane;
+ $display->panels['center'][2] = 'new-3';
$display->hide_title = PANELS_TITLE_FIXED;
$display->title_pane = 'new-1';
@@ -369,7 +374,7 @@ function panelizer_get_base_context_node
'name' => 'node',
'identifier' => t('This node'),
'keyword' => 'node',
- 'context_settings' => array()
+ 'context_settings' => array(),
),
);
}
diff -up -r includes/panelizer.pages_default.inc includes/panelizer.pages_default.inc
--- includes/panelizer.pages_default.inc 2011-03-21 22:31:23.000000000 -0500
+++ includes/panelizer.pages_default.inc 2011-03-21 22:40:06.000000000 -0500
@@ -7,7 +7,7 @@
*/
/**
- * Implementation of hook_default_page_manager_handlers()
+ * Implements hook_default_page_manager_handlers().
*/
function panelizer_default_page_manager_handlers() {
$handlers = array();
diff -up -r panelizer.info panelizer.info
--- panelizer.info 2011-03-21 22:31:23.000000000 -0500
+++ panelizer.info 2011-03-21 22:40:07.000000000 -0500
@@ -5,4 +5,12 @@ package = "Panels"
dependencies[] = panels
dependencies[] = ctools
dependencies[] = page_manager
-core = 6.x
+core = 7.x
+
+files[] = panelizer.install
+files[] = panelizer.module
+files[] = includes/admin.inc
+files[] = includes/common.inc
+files[] = includes/node.inc
+files[] = includes/panelizer.pages_default.inc
+files[] = task_handlers/panelizer_node.inc
diff -up -r panelizer.install panelizer.install
--- panelizer.install 2011-03-21 22:31:23.000000000 -0500
+++ panelizer.install 2011-03-21 22:40:07.000000000 -0500
@@ -2,7 +2,13 @@
// $Id: panelize.install,v 1.3.4.2 2010/07/22 22:20:52 merlinofchaos Exp $
/**
- * Implementation of hook_schema().
+ * @file
+ * Install, update and uninstall functions for the panelizer module.
+ *
+ */
+
+/**
+ * Implements hook_schema().
*/
function panelizer_schema() {
// This should always point to our 'current' schema. This makes it relatively easy
@@ -99,7 +105,7 @@ function panelizer_schema_1() {
'minimum_version' => 1,
'current_version' => 1,
),
-// 'create callback' => 'panelizer_export_create_callback',
+ // 'create callback' => 'panelizer_export_create_callback',
'save callback' => 'panelizer_export_save_callback',
'export callback' => 'panelizer_export_export_callback',
'delete callback' => 'panelizer_export_delete_callback',
@@ -142,17 +148,30 @@ function panelizer_schema_1() {
}
/**
- * Implementation of hook_install().
+ * Implements hook_install().
*/
function panelizer_install() {
- db_query("UPDATE {system} SET weight = 21 WHERE name = 'panelizer'");
- drupal_install_schema('panelizer');
+ // TODO Please review the conversion of this statement to the D7 database API syntax.
+ /* db_query("UPDATE {system} SET weight = 21 WHERE name = 'panelizer'") */
+ db_update('system')
+ ->fields(array(
+ 'weight' => 21,
+ ))
+ ->condition('name', 'panelizer')
+ ->execute();
+ // TODO The drupal_(un)install_schema functions are called automatically in D7.
+ // drupal_install_schema('panelizer')
}
/**
- * Implementation of hook_uninstall().
+ * Implements hook_uninstall().
*/
function panelizer_uninstall() {
- drupal_uninstall_schema('panelizer');
- db_query("DELETE FROM {variable} WHERE name like 'panelizer%%'");
+ // TODO The drupal_(un)install_schema functions are called automatically in D7.
+ // drupal_uninstall_schema('panelizer')
+ // TODO Please review the conversion of this statement to the D7 database API syntax.
+ /* db_query("DELETE FROM {variable} WHERE name like 'panelizer%%'") */
+ db_delete('variable')
+ ->condition('name like ' panelizer % % '', '')
+ ->execute();
}
diff -up -r panelizer.module panelizer.module
--- panelizer.module 2011-03-21 22:31:23.000000000 -0500
+++ panelizer.module 2011-03-21 22:40:07.000000000 -0500
@@ -11,19 +11,24 @@
// General Drupal hooks
/**
- * Implementation of hook_perm().
+ * Implements hook_permission().
*/
-function panelizer_perm() {
- return array('administer panelizer');
+function panelizer_permission() {
+ return array(
+ 'administer panelizer' => array(
+ 'title' => t('administer panelizer'),
+ 'description' => t('TODO Add a description for \'administer panelizer\''),
+ ),
+ );
}
/**
- * Implements hook_theme()
+ * Implements hook_theme().
*/
function panelizer_theme() {
$items = array();
$items['panelizer_node_settings_page_form'] = array(
- 'arguments' => array('form' => NULL),
+ 'render element' => 'form',
'file' => 'includes/admin.inc',
);
@@ -31,7 +36,7 @@ function panelizer_theme() {
}
/**
- * Implementation of hook_menu().
+ * Implements hook_menu().
*/
function panelizer_menu() {
// Safety: go away if CTools is not at an appropriate version.
@@ -45,7 +50,7 @@ function panelizer_menu() {
'file' => 'includes/admin.inc',
);
- $items['admin/settings/panelizer'] = array(
+ $items['admin/config/panelizer'] = array(
'title' => 'Panelizer',
'description' => 'Configure panelizer availability and defaults',
'page callback' => 'drupal_get_form',
@@ -53,7 +58,7 @@ function panelizer_menu() {
'type' => MENU_NORMAL_ITEM,
) + $settings_base;
- $items['admin/settings/panelizer/%/%'] = array(
+ $items['admin/config/panelizer/%/%'] = array(
'title callback' => 'panelizer_default_title_callback',
'title arguments' => array(3, 4),
'page callback' => 'panelizer_allowed_content_page',
@@ -61,7 +66,7 @@ function panelizer_menu() {
'type' => MENU_CALLBACK,
) + $settings_base;
- $items['admin/settings/panelizer/%/%/allowed'] = array(
+ $items['admin/config/panelizer/%/%/allowed'] = array(
'title' => 'Available content',
'page callback' => 'panelizer_allowed_content_page',
'page arguments' => array(3, 4),
@@ -69,7 +74,7 @@ function panelizer_menu() {
'weight' => -10,
) + $settings_base;
- $items['admin/settings/panelizer/%/%/list'] = array(
+ $items['admin/config/panelizer/%/%/list'] = array(
'title' => 'List defaults',
'access callback' => 'panelizer_has_choice_callback',
'access arguments' => array(3, 4, ''),
@@ -87,26 +92,26 @@ function panelizer_menu() {
'file' => 'includes/admin.inc',
);
- $items['admin/settings/panelizer/%/%/settings'] = array(
+ $items['admin/config/panelizer/%/%/settings'] = array(
'title' => 'Settings',
'page callback' => 'panelizer_default_settings_page',
'weight' => -5,
) + $tabs_base;
- $items['admin/settings/panelizer/%/%/context'] = array(
+ $items['admin/config/panelizer/%/%/context'] = array(
'title' => 'Contexts',
'page callback' => 'panelizer_default_context_page',
'weight' => -4,
) + $tabs_base;
- $items['admin/settings/panelizer/%/%/layout'] = array(
+ $items['admin/config/panelizer/%/%/layout'] = array(
'title' => 'Layout',
'page callback' => 'panelizer_default_layout_page',
'weight' => -3,
) + $tabs_base;
- $items['admin/settings/panelizer/%/%/content'] = array(
+ $items['admin/config/panelizer/%/%/content'] = array(
'title' => 'Content',
'page callback' => 'panelizer_default_content_page',
'weight' => -2,
@@ -120,33 +125,33 @@ function panelizer_menu() {
'file' => 'includes/admin.inc',
);
- $items['admin/settings/panelizer/%/%/%'] = array(
+ $items['admin/config/panelizer/%/%/%'] = array(
'title' => 'Settings',
'page callback' => 'panelizer_default_settings_page',
'title callback' => 'panelizer_default_name_title_callback',
'type' => MENU_CALLBACK,
) + $subtabs_base;
- $items['admin/settings/panelizer/%/%/%/settings'] = array(
+ $items['admin/config/panelizer/%/%/%/settings'] = array(
'title' => 'Settings',
'page callback' => 'panelizer_default_settings_page',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -5,
) + $subtabs_base;
- $items['admin/settings/panelizer/%/%/%/context'] = array(
+ $items['admin/config/panelizer/%/%/%/context'] = array(
'title' => 'Contexts',
'page callback' => 'panelizer_default_context_page',
'weight' => -4,
) + $subtabs_base;
- $items['admin/settings/panelizer/%/%/%/layout'] = array(
+ $items['admin/config/panelizer/%/%/%/layout'] = array(
'title' => 'Layout',
'page callback' => 'panelizer_default_layout_page',
'weight' => -3,
) + $subtabs_base;
- $items['admin/settings/panelizer/%/%/%/content'] = array(
+ $items['admin/config/panelizer/%/%/%/content'] = array(
'title' => 'Content',
'page callback' => 'panelizer_default_content_page',
'weight' => -2,
@@ -225,7 +230,7 @@ function panelizer_edit_node_callback($n
function panelizer_default_title_callback($type, $key) {
switch ($type) {
case 'node':
- $name = node_get_types('name', $key);
+ $name = node_type_get_name($key);
return check_plain($name);
case 'user':
}
@@ -342,7 +347,7 @@ function panelizer_load_default_by_name(
* to them. This fetches the display, if there is one.
*/
function panelizer_load_default($type, $key, $name, $default_anyway = FALSE) {
- $load_name = $type . ':' . $key. ':' . $name;
+ $load_name = $type . ':' . $key . ':' . $name;
return _panelizer_load_default($type, $key, $name, $load_name, $default_anyway);
}
@@ -460,7 +465,11 @@ function panelizer_export_delete_callbac
panels_delete_display($object->did);
}
- db_query("DELETE FROM {panelizer_defaults} WHERE name = '%s'", $object->name);
+ // TODO Please review the conversion of this statement to the D7 database API syntax.
+ /* db_query("DELETE FROM {panelizer_defaults} WHERE name = '%s'", $object->name) */
+ db_delete('panelizer_defaults')
+ ->condition('name', $object->name)
+ ->execute();
}
// ---------------------------------------------------------------------------
@@ -541,7 +550,7 @@ function panelizer_context_cache_clear($
function panelizer_panels_cache_get($argument) {
ctools_include('object-cache');
list($type, $key) = explode(':', $argument, 2);
- $cache = ctools_object_cache_get('panelizer_display_cache', $type . ':' .$key);
+ $cache = ctools_object_cache_get('panelizer_display_cache', $type . ':' . $key);
if (!empty($cache)) {
$cache->cached = TRUE;
switch ($type) {
@@ -594,7 +603,7 @@ function panelizer_panels_cache_get($arg
function panelizer_panels_cache_set($argument, $cache) {
list($type, $key) = explode(':', $argument, 2);
ctools_include('object-cache');
- ctools_object_cache_set('panelizer_display_cache', $type . ':' .$key, $cache);
+ ctools_object_cache_set('panelizer_display_cache', $type . ':' . $key, $cache);
}
/**
@@ -603,7 +612,7 @@ function panelizer_panels_cache_set($arg
function panelizer_panels_cache_clear($argument, $cache) {
list($type, $key) = explode(':', $argument, 2);
ctools_include('object-cache');
- ctools_object_cache_clear('panelizer_display_cache', $type . ':' .$key);
+ ctools_object_cache_clear('panelizer_display_cache', $type . ':' . $key);
}
/**
@@ -663,7 +672,7 @@ function panelizer_get_contexts($paneliz
// Contrib module hooks to provide needed functionality.
/**
- * Implementation of hook_ctools_plugin_directory() to let the system know
+ * Implements hook_ctools_plugin_directory() to let the system know().
* where our task_handler plugins are.
*/
function panelizer_ctools_plugin_directory($owner, $plugin_type) {
@@ -673,7 +682,7 @@ function panelizer_ctools_plugin_directo
}
/**
- * Implementation of hook_ctools_plugin_api().
+ * Implements hook_ctools_plugin_api().
*/
function panelizer_ctools_plugin_api($module, $api) {
if ($module == 'page_manager' && $api == 'pages_default') {
@@ -685,7 +694,7 @@ function panelizer_ctools_plugin_api($mo
}
/**
- * Implementation of hook_export_node_alter()
+ * Implements hook_export_node_alter().
*
* Integrate with export.module for saving panel_nodes into code.
*/
@@ -694,7 +703,7 @@ function panelizer_export_node_alter(&$n
}
/**
- * Implementation of hook_panelizer_defaults_alter
+ * Implements hook_panelizer_defaults_alter().
*
* Remove the panels node because there is no point to panelizing it.
*/
diff -up -r plugins/task_handlers/panelizer_node.inc plugins/task_handlers/panelizer_node.inc
--- plugins/task_handlers/panelizer_node.inc 2011-03-21 22:31:23.000000000 -0500
+++ plugins/task_handlers/panelizer_node.inc 2011-03-21 22:40:07.000000000 -0500
@@ -14,16 +14,18 @@ $plugin = array(
'handler type' => 'context',
// may NOT be added up front.
'visible' => FALSE,
-
// Administrative fields.
'title' => t('Panelizer'),
- 'admin summary' =>'panelizer_panelizer_task_admin_summary',
+ 'admin summary' => 'panelizer_panelizer_task_admin_summary',
'operations' => array(),
-
// Callback to render the data.
'render' => 'panelizer_panelizer_task_render',
);
+/**
+ * @todo Please document this function.
+ * @see http://drupal.org/node/1354
+ */
function panelizer_panelizer_task_admin_summary($handler, $task, $subtask, $page, $show_title = TRUE) {
$output = '';
@@ -46,12 +48,18 @@ function panelizer_panelizer_task_admin_
$access = t('This variant will be selected if the node being viewed is panelized. This variant must be enabled and selected for panelizer to work!');
$rows[] = array(
- array('class' => t('page-summary-label'), 'data' => t('Selection rule')),
- array('class' => t('page-summary-data'), 'data' => $access),
+ array(
+ 'class' => t('page-summary-label'),
+ 'data' => t('Selection rule'),
+ ),
+ array(
+ 'class' => t('page-summary-data'),
+ 'data' => $access,
+ ),
array('class' => t('page-summary-operation'), ''),
);
- $output .= theme('table', array(), $rows, array('class' => 'page-manager-handler-summary'));
+ $output .= theme('table', array('header' => array(), 'rows' => $rows, 'attributes' => array('class' => 'page-manager-handler-summary')));
$output .= '
';
return $output;