3
3
if (! function_exists (' theme' )) {
4
4
function theme ($key ){
5
5
$key = trim ($key );
6
- $file = base_path (' themes/' . Auth :: user () -> theme . ' /config.php' );
6
+ $file = base_path (' themes/' . $GLOBALS [ ' themeName ' ] . ' /config.php' );
7
7
if (file_exists ($file )) {
8
8
$config = include $file ;
9
9
if (isset ($config [$key ])) {
@@ -15,14 +15,14 @@ function theme($key){
15
15
// Theme Custom Asset
16
16
if (! function_exists (' themeAsset' )) {
17
17
function themeAsset ($path ){
18
- $path = url (' themes/' . Auth :: user () -> theme . ' /extra/custom-assets/' . $path );
18
+ $path = url (' themes/' . $GLOBALS [ ' themeName ' ] . ' /extra/custom-assets/' . $path );
19
19
return $path ;}
20
20
}
21
21
22
22
$customBackgroundExists = false ;
23
23
@endphp
24
24
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
26
26
27
27
@if (theme (' allow_custom_background' ) != " false" )
28
28
@php
@@ -46,7 +46,7 @@ function themeAsset($path){
46
46
@endif
47
47
48
48
@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
50
50
@if ($info -> theme != ' ' and $info -> theme != ' default' )
51
51
52
52
<!-- LinkStack Theme: "{{ $info -> theme } } " -->
@@ -77,7 +77,7 @@ function themeAsset($path){
77
77
@endpush
78
78
79
79
@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
81
81
82
82
@if ($info -> theme != ' ' and $info -> theme != ' default' )
83
83
<!-- Enables parallax background animations -->
@@ -102,6 +102,6 @@ function themeAsset($path){
102
102
@endpush
103
103
104
104
@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
106
106
@endpush
107
107
@include (' linkstack.modules.dynamic-contrast' )
0 commit comments