Skip to content
Snippets Groups Projects
Commit f14f63cc authored by Angie Byron's avatar Angie Byron
Browse files

Issue #1820544 by damiankloip: Tidy up and remove legacy code from views_page_alter().

parent d4315b5a
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -575,13 +575,7 @@ function views_page_alter(&$page) { ...@@ -575,13 +575,7 @@ function views_page_alter(&$page) {
// If the main content of this page contains a view, attach its contextual // If the main content of this page contains a view, attach its contextual
// links to the overall page array. This allows them to be rendered directly // links to the overall page array. This allows them to be rendered directly
// next to the page title. // next to the page title.
$view = views_get_page_view(); if ($view = views_get_page_view()) {
if (!empty($view)) {
// If a module is still putting in the display like we used to, catch that.
if (is_subclass_of($view, 'views_plugin_display')) {
$view = $view->view;
}
views_add_contextual_links($page, 'page', $view, $view->current_display); views_add_contextual_links($page, 'page', $view, $view->current_display);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment