Skip to content
Snippets Groups Projects

3516487: Mercury Editor templates are duplicated.

2 files
+ 10
20
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -113,26 +113,6 @@ function mercury_editor_templates_preprocess_layout_paragraphs_builder_controls(
}
}
function mercury_editor_templates_preprocess_layout_paragraphs_builder_component_menu(&$variables) {
if (empty($variables['groups'])) {
$variables['groups'] = [];
}
if (isset($variables['types']['layout'])) {
$templates = array_filter($variables['types']['layout'], function ($type) {
return !empty($type['is_template']);
});
$variables['types']['layout'] = array_filter($variables['types']['layout'], function ($type) {
return empty($type['is_template']);
});
if (count($templates)) {
$variables['groups']['templates'] = [
'label' => t('Templates'),
'items' => $templates,
];
}
}
}
/**
* Implements hook_entity_type_build().
*/
Loading