Skip to content

Commit c684cdb

Browse files
committed
Revert "Refactor"
This reverts commit 32f7c5d.
1 parent 4b14e24 commit c684cdb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

resources/views/linkstack/modules/theme.blade.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
if (!function_exists('theme')) {
44
function theme($key){
55
$key = trim($key);
6-
$file = base_path('themes/' . Auth::user()->theme . '/config.php');
6+
$file = base_path('themes/' . $GLOBALS['themeName'] . '/config.php');
77
if (file_exists($file)) {
88
$config = include $file;
99
if (isset($config[$key])) {
@@ -15,14 +15,14 @@ function theme($key){
1515
// Theme Custom Asset
1616
if (!function_exists('themeAsset')) {
1717
function themeAsset($path){
18-
$path = url('themes/' . Auth::user()->theme . '/extra/custom-assets/' . $path);
18+
$path = url('themes/' . $GLOBALS['themeName'] . '/extra/custom-assets/' . $path);
1919
return $path;}
2020
}
2121
2222
$customBackgroundExists = false;
2323
@endphp
2424

25-
@foreach($information as $info) @php Auth::user()->theme = $info->theme; @endphp @endforeach
25+
@foreach($information as $info) @php $GLOBALS['themeName'] = $info->theme; @endphp @endforeach
2626

2727
@if(theme('allow_custom_background') != "false")
2828
@php
@@ -46,7 +46,7 @@ function themeAsset($path){
4646
@endif
4747

4848
@push('linkstack-head-end')
49-
@if(theme('enable_custom_code') == "true" and theme('enable_custom_head') == "true" and env('ALLOW_CUSTOM_CODE_IN_THEMES') == 'true')@include(Auth::user()->theme . '.extra.custom-head')@endif
49+
@if(theme('enable_custom_code') == "true" and theme('enable_custom_head') == "true" and env('ALLOW_CUSTOM_CODE_IN_THEMES') == 'true')@include($GLOBALS['themeName'] . '.extra.custom-head')@endif
5050
@if($info->theme != '' and $info->theme != 'default')
5151

5252
<!-- LinkStack Theme: "{{$info->theme}}" -->
@@ -77,7 +77,7 @@ function themeAsset($path){
7777
@endpush
7878

7979
@push('linkstack-body-start')
80-
@if(theme('enable_custom_code') == "true" and theme('enable_custom_body') == "true" and env('ALLOW_CUSTOM_CODE_IN_THEMES') == 'true')@include(Auth::user()->theme . '.extra.custom-body')@endif
80+
@if(theme('enable_custom_code') == "true" and theme('enable_custom_body') == "true" and env('ALLOW_CUSTOM_CODE_IN_THEMES') == 'true')@include($GLOBALS['themeName'] . '.extra.custom-body')@endif
8181

8282
@if($info->theme != '' and $info->theme != 'default')
8383
<!-- Enables parallax background animations -->
@@ -102,6 +102,6 @@ function themeAsset($path){
102102
@endpush
103103

104104
@push('linkstack-body-end')
105-
@if(theme('enable_custom_code') == "true" and theme('enable_custom_body_end') == "true" and env('ALLOW_CUSTOM_CODE_IN_THEMES') == 'true')@include(Auth::user()->theme . '.extra.custom-body-end')@endif
105+
@if(theme('enable_custom_code') == "true" and theme('enable_custom_body_end') == "true" and env('ALLOW_CUSTOM_CODE_IN_THEMES') == 'true')@include($GLOBALS['themeName'] . '.extra.custom-body-end')@endif
106106
@endpush
107107
@include('linkstack.modules.dynamic-contrast')

0 commit comments

Comments
 (0)