You are here

function panels_mini_edit_content in Panels 5.2

Same name and namespace in other branches
  1. 6.2 panels_mini/panels_mini.admin.inc \panels_mini_edit_content()

Pass through to the panels content editor.

1 string reference to 'panels_mini_edit_content'
panels_mini_menu_items in panels_mini/panels_mini.module

File

panels_mini/panels_mini.module, line 726
panels_mini.module

Code

function panels_mini_edit_content($panel_mini) {
  if (!is_object($panel_mini)) {
    $panel_mini = panels_mini_load($panel_mini);
  }
  panels_load_include('plugins');

  // Collect a list of contexts required by the arguments on this page.
  $panel_mini->display->context = $contexts = panels_context_load_contexts($panel_mini);
  panels_load_include('common');
  $content_types = panels_common_get_allowed_types('panels_mini', $contexts);
  $output = panels_edit($panel_mini->display, NULL, $content_types);
  if (is_object($output)) {
    $panel_mini->display = $output;
    $panel_mini->did = $output->did;
    panels_mini_save($panel_mini);
    drupal_goto("admin/panels/panel-mini/{$panel_mini->name}/edit/content");
  }

  // 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.
  drupal_set_title(check_plain($panel_mini->title));
  print theme('page', $output, FALSE);
}