1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-09 10:22:51 +03:00

Merge branch 'v21.05.x'

This commit is contained in:
Dan Brown
2021-07-03 12:02:13 +01:00
4 changed files with 70 additions and 68 deletions

View File

@@ -99,13 +99,15 @@ function setting(string $key = null, $default = null)
/**
* Get a path to a theme resource.
* Returns null if a theme is not configured and
* therefore a full path is not available for use.
*/
function theme_path(string $path = ''): string
function theme_path(string $path = ''): ?string
{
$theme = config('view.theme');
if (!$theme) {
return '';
return null;
}
return base_path('themes/' . $theme . ($path ? DIRECTORY_SEPARATOR . $path : $path));