author | Jordan Doyle <jordan@doyle.la> | 2018-05-05 15:48:06.0 +01:00:00 |
---|---|---|
committer | Jordan Doyle <jordan@doyle.la> | 2018-05-05 15:48:06.0 +01:00:00 |
commit | e6b8e0bbb1a65a3512717f5f9489660907f2c90c [patch] |
|
tree | 55aa8dcd6fb2dfc78816f1089bc50c10650e5175 |
|
parent | afdc414b9cb2527298720303ebdbcc136cd8afd8 |
|
download | e6b8e0bbb1a65a3512717f5f9489660907f2c90c.tar.gz |
Add `theme` view namespace
Using `theme::` before your view name will use `resources/view/themes/[theme-name]` as the base directory.
Diff
src/Providers/WordpressTemplatingServiceProvider.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Providers/WordpressTemplatingServiceProvider.php b/src/Providers/WordpressTemplatingServiceProvider.php index 7c3bf5f..70ff97a 100644 --- a/src/Providers/WordpressTemplatingServiceProvider.php +++ a/src/Providers/WordpressTemplatingServiceProvider.php @@ -1,7 +1,8 @@ <?php namespace Koselig\Providers; use Illuminate\Support\Facades\Blade; use Illuminate\Support\Facades\View; use Illuminate\Support\ServiceProvider; /** @@ -40,5 +41,8 @@ return "<?php gravity_form({$expression}); ?>"; }); } View::addNamespace('theme', base_path() . '/resources/views/themes/' . wp_get_theme()->stylesheet); } }