Skip to content

Commit

Permalink
Auto detect theme namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
nbejansen committed Mar 1, 2022
1 parent 38452f5 commit cf0d930
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
});
}

new Application('sp-theme', __FILE__, [
new Application(basename(__DIR__), __FILE__, [
// Theme service providers
\Sitepilot\Theme\Providers\ThemeServiceProvider::class,
\Sitepilot\Theme\Providers\BlocksServiceProvider::class,
Expand All @@ -28,6 +28,8 @@
if (!function_exists('sp_theme')) {
function sp_theme(): ?Application
{
return Application::app('sp-theme');
return Application::app(
basename(__DIR__)
);
}
}

0 comments on commit cf0d930

Please sign in to comment.