Init development stack
This commit is contained in:
42
bootstrap.php
Normal file
42
bootstrap.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Foundation\Configuration\Middleware;
|
||||
use Illuminate\Foundation\Http\Middleware\ValidateCsrfToken;
|
||||
use Illuminate\Support\Facades\Blade;
|
||||
use Roots\Acorn\Application;
|
||||
|
||||
include_once 'vendor/autoload.php';
|
||||
|
||||
// Plugin requires WP Acorn
|
||||
if (! class_exists( Application::class)) {
|
||||
wp_die(
|
||||
__('You need to install Acorn to use this site.', 'domain'),
|
||||
'',
|
||||
[
|
||||
'link_url' => 'https://roots.io/acorn/docs/installation/',
|
||||
'link_text' => __('Acorn Docs: Installation', 'domain'),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
add_action('after_setup_theme', function () {
|
||||
Application::configure()
|
||||
->withProviders([
|
||||
|
||||
])
|
||||
->withMiddleware(function (Middleware $middleware) {
|
||||
|
||||
})
|
||||
->withRouting(wordpress: true)
|
||||
->boot();
|
||||
}, 0);
|
||||
|
||||
// Insert code injection to the document head
|
||||
add_action('wp_head', function () {
|
||||
echo view('injections.head')->render();
|
||||
});
|
||||
|
||||
// Insert code injection to the document footer
|
||||
add_action('wp_footer', function () {
|
||||
echo view('injections.footer')->render();
|
||||
});
|
||||
Reference in New Issue
Block a user