Skip to content

Commit 875e867

Browse files
NiclasNorinNiclas Norin
and
Niclas Norin
authored
Feat: Set drawer size based on lg set (#696)
Co-authored-by: Niclas Norin <niclas.norin@helsingborg.se>
1 parent 9ae9f38 commit 875e867

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

library/Upgrade.php

+11-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010
class Upgrade
1111
{
12-
private $dbVersion = 25; //The db version we want to achive
12+
private $dbVersion = 26; //The db version we want to achive
1313
private $dbVersionKey = 'municipio_db_version';
1414
private $db;
1515

@@ -527,6 +527,16 @@ private function v_25($db): bool
527527
return true;
528528
}
529529

530+
private function v_26($db): bool
531+
{
532+
$drawerSizes = get_theme_mod('drawer_screen_sizes');
533+
if (!empty($drawerSizes) && is_array($drawerSizes) && in_array('lg', $drawerSizes)) {
534+
array_push($drawerSizes, 'xl');
535+
set_theme_mod('drawer_screen_sizes', $drawerSizes);
536+
}
537+
return true;
538+
}
539+
530540
/**
531541
* Get all post types
532542
*

0 commit comments

Comments
 (0)