From 9bd443fe6094990022f1a312bebcf29ae781cb39 Mon Sep 17 00:00:00 2001 From: webchick <drupal@webchick.net> Date: Mon, 1 Jun 2015 21:52:29 -0700 Subject: [PATCH] Issue #2497113 by catch, dawehner: views_theme() gets 19 types of plugin definition, only needs five --- core/modules/views/views.module | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/core/modules/views/views.module b/core/modules/views/views.module index 45b65e936b8a..c19695d9d148 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -137,7 +137,19 @@ function views_theme($existing, $type, $theme, $path) { 'variables' => array('view' => NULL, 'grouping' => NULL, 'grouping_level' => NULL, 'rows' => NULL, 'title' => NULL), ); - $plugins = Views::getPluginDefinitions(); + // Only display, pager, row, and style plugins can provide theme hooks. + $plugin_types = [ + 'display', + 'pager', + 'row', + 'style', + 'exposed_form', + ]; + $plugins = array(); + foreach ($plugin_types as $plugin_type) { + $plugins[$plugin_type] = Views::pluginManager($plugin_type)->getDefinitions(); + } + $module_handler = \Drupal::moduleHandler(); // Register theme functions for all style plugins. It provides a basic auto -- GitLab