1.12.x views.api.php hook_views_ui_display_top_links_alter(&$links, $view, $display_id)
1.10.x views.api.php hook_views_ui_display_top_links_alter(&$links, $view, $display_id)
1.11.x views.api.php hook_views_ui_display_top_links_alter(&$links, $view, $display_id)
1.7.x views.api.php hook_views_ui_display_top_links_alter(&$links, $view, $display_id)

This hooks allows to alter the links at the top of the view edit form. Some modules might want to add links there.

Parameters

$links: An array of links which will be displayed at the top of the view edit form. Each entry should be on a form suitable for theme('link').

view $view: The full view object which is currently edited.

$display_id: The current display id which is edited. For example that's 'default' or 'page_1'.

Related topics

File

modules/views/views.api.php, line 938
Describe hooks provided by the Views module.

Code

function hook_views_ui_display_top_links_alter(&$links, $view, $display_id) {
  // Put the clone link first in the list.
  if (isset($links['clone'])) {
    $links = array('clone' => $links['clone']) + $links;
  }
}