Skip to content

Commit ada9e59

Browse files
authored
Only show Multilingual Associations for multilingual website (#33815)
1 parent a8da7d4 commit ada9e59

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

administrator/modules/mod_menu/src/Menu/CssMenu.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use Joomla\CMS\Application\CMSApplication;
1515
use Joomla\CMS\Component\ComponentHelper;
16+
use Joomla\CMS\Language\Associations;
1617
use Joomla\CMS\Language\Text;
1718
use Joomla\CMS\Menu\AdministratorMenuItem;
1819
use Joomla\CMS\Table\Table;
@@ -316,6 +317,17 @@ protected function preprocess($parent)
316317
continue;
317318
}
318319

320+
/*
321+
* Multilingual Associations if the site is not set as multilingual and/or Associations is not enabled in
322+
* the Language Filter plugin
323+
*/
324+
325+
if (!Associations::isEnabled() && $item->element === 'com_associations')
326+
{
327+
$parent->removeChild($item);
328+
continue;
329+
}
330+
319331
// Exclude Mass Mail if disabled in global configuration
320332
if ($item->scope === 'massmail' && ($this->application->get('mailonline', 1) == 0 || $this->application->get('massmailoff', 0) == 1))
321333
{

0 commit comments

Comments
 (0)