You are here

function panels_page_edit_alternate in Panels 6.2

1 string reference to 'panels_page_edit_alternate'
_panels_page_construct_dynamic_menu_link in panels_page/panels_page.menu.inc
Helper function to create a menu item for a panel.

File

panels_page/panels_page.admin.inc, line 1024
panels_page.admin.inc

Code

function panels_page_edit_alternate($callback, $name, $alternate = '') {

  // TODO reorganize this redundant call.
  panels_page_load_include('read');
  panels_page_load_include('write');
  panels_load_include('plugins');
  if (!empty($_POST)) {
    $panel_page = panels_cache_get('panel_object:panel_page', $name);
  }
  else {
    $panel_page = panels_page_load($name);
    panels_page_fetch_display($panel_page, $alternate);
    panels_cache_set('panel_object:panel_page', $name, $panel_page);
  }
  panels_page_set_current($panel_page);
  return $callback($panel_page);
}