MDL-50923 themes: content-only class added before region-only

This commit is contained in:
Marina Glancy 2015-08-26 09:32:07 +08:00 committed by Eloy Lafuente (stronk7)
parent 4738193225
commit 55a8e86807

View File

@ -3769,14 +3769,14 @@ EOD;
$additionalclasses[] = 'docked-region-'.$region;
}
}
if (count($usedregions) === 1) {
if (!$usedregions) {
// No regions means there is only content, add 'content-only' class.
$additionalclasses[] = 'content-only';
} else if (count($usedregions) === 1) {
// Add the -only class for the only used region.
$region = array_shift($usedregions);
$additionalclasses[] = $region . '-only';
}
if (!$usedregions) {
$additionalclasses[] = 'content-only';
}
foreach ($this->page->layout_options as $option => $value) {
if ($value) {
$additionalclasses[] = 'layout-option-'.$option;