Commit 86d54707 authored by gmclelland's avatar gmclelland Committed by Dave Reid

Issue #2400145 by gmclelland: Added "Edit menu links" to Panels pane dropdown links.

parent 27059ca5
......@@ -816,3 +816,18 @@ function book_menu_block_get_sort_menus() {
'/^book\-toc\-.+/' => t('Book navigation'),
);
}
/**
* Implements hook_get_pane_links_alter().
*/
function menu_block_get_pane_links_alter(&$links, $pane, $content_type) {
if ($pane->type === 'menu_tree') {
if (in_array($pane->subtype, array_keys(menu_get_menus()))) {
$links['top'][] = array(
'title' => t('Edit menu links'),
'href' => url('admin/structure/menu/manage/' . $pane->subtype, array('absolute' => TRUE)),
'attributes' => array('target' => array('_blank')),
);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment