Commit 1d7b9e28 authored by Igor Biki's avatar Igor Biki
Browse files

Merge branch 'feature/ISTWCMS-4678-kpaxman-automatically_add_new_menu_items' into '8.x-1.x'

ISTWCMS-4678: treat never-configured additions as enabled until selected otherwise

See merge request !8
parents 18ae2608 19c5a2bc
......@@ -58,7 +58,10 @@ class ContentManagementMenuBlock extends BlockBase implements ContainerFactoryPl
// default.
if (isset($configured[$id])) {
foreach ($secondary_menu as $key => $value) {
if (!empty($configured[$id][$key])) {
// Show the menu if they've configured it to be shown, or if
// it's never been configured either way, so that new items
// appear automatically.
if (!isset($configured[$id][$key]) || !empty($configured[$id][$key])) {
$selected_secondary[] = $key;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment