Skip to content

Commit 874e8c9

Browse files
committed
Added option to disable theme updater in config
1 parent c589a3a commit 874e8c9

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

.env

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,8 @@ FORCE_HTTPS=false
8484

8585
#=Defines wether or not themes are allowed to inject custom code.
8686
#=Themes V2 can now implement fully custom code which you might want to disable for security reasons.
87-
ALLOW_CUSTOM_CODE_IN_THEMES=true
87+
ALLOW_CUSTOM_CODE_IN_THEMES=true
88+
89+
#ENABLE_THEME_UPDATER=Determines if the theme updater should be enabled or not, default is true.
90+
#=ENABLE_THEME_UPDATER either true or false.
91+
ENABLE_THEME_UPDATER=true

resources/views/components/finishing.blade.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
if(EnvEditor::keyExists('ALLOW_CUSTOM_CODE_IN_THEMES')){ /* Do nothing if key already exists */
1717
} else {EnvEditor::addKey('ALLOW_CUSTOM_CODE_IN_THEMES', 'true');}
1818
19+
if(EnvEditor::keyExists('ENABLE_THEME_UPDATER')){ /* Do nothing if key already exists */
20+
} else {EnvEditor::addKey('ENABLE_THEME_UPDATER', 'true');}
21+
1922
if (!config()->has('advanced-config.expand_panel_admin_menu_permanently') and !config()->has('disable_default_password_notice')) {
2023
2124
function getStringBetween($string, $start, $end) {

resources/views/studio/theme.blade.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
</details>
3939

4040
@if(auth()->user()->role == 'admin')
41-
41+
@if(env('ENABLE_THEME_UPDATER') == 'true')
4242
<style>
4343
details {
4444
width: 65%;
@@ -204,6 +204,8 @@
204204

205205
@if($GLOBALS['updateAv'] == true)<img style="padding-left:40px; padding-top:15px; scale: 1.5;" src="https://img.shields.io/static/v1?label=&message=A theme needs updating&color=brightgreen">@endif
206206

207+
@endif
208+
207209
<br><br><br>
208210
<form action="{{ route('editTheme') }}" enctype="multipart/form-data" method="post">
209211
@csrf

storage/backups/default_settings

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,8 @@ FORCE_HTTPS=false
8484

8585
#=Defines wether or not themes are allowed to inject custom code.
8686
#=Themes V2 can now implement fully custom code which you might want to disable for security reasons.
87-
ALLOW_CUSTOM_CODE_IN_THEMES=true
87+
ALLOW_CUSTOM_CODE_IN_THEMES=true
88+
89+
#ENABLE_THEME_UPDATER=Determines if the theme updater should be enabled or not, default is true.
90+
#=ENABLE_THEME_UPDATER either true or false.
91+
ENABLE_THEME_UPDATER=true

0 commit comments

Comments
 (0)