Skip to content
Snippets Groups Projects
Commit 587f8d24 authored by Tim Plunkett's avatar Tim Plunkett
Browse files

Allow plugins to specify a module, and check for module_exists().

parent faa795e8
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
......@@ -29,7 +29,9 @@ public function getDefinitions() {
$theme_file = "$module.views.inc";
}
$definition['module'] = $module_dir;
if (!isset($definition['module'])) {
$definition['module'] = $module_dir;
}
if (!isset($definition['theme path'])) {
$definition['theme path'] = $theme_path;
}
......
......@@ -1336,6 +1336,11 @@ function views_fetch_plugin_names($type, $key = NULL, $base = array()) {
if ($key && (empty($plugin['type']) || $plugin['type'] != $key)) {
continue;
}
// @todo While Views is providing on behalf of core modules, check to see
// if they are enabled or not.
if (isset($plugin['module']) && !module_exists($plugin['module'])) {
continue;
}
if (empty($plugin['no ui']) && (empty($base) || empty($plugin['base']) || array_intersect($base, $plugin['base']))) {
$plugins[$id] = $plugin['title'];
......
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