Improve wp acorn compability
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Plugin Name: Acorn Plugin
|
||||
* Description: Start für ein Acorn Wordpress Plugin
|
||||
@@ -9,13 +10,6 @@
|
||||
* Author URI: https://loosen-it.de
|
||||
*/
|
||||
|
||||
include_once 'bootstrap.php';
|
||||
|
||||
$renderHello = function () {
|
||||
if (function_exists('view')) {
|
||||
return view('hello-world')->render();
|
||||
}
|
||||
|
||||
return 'Hello World';
|
||||
};
|
||||
add_shortcode('acorn_hello', $renderHello);
|
||||
// The boot election lives in bootstrap.php; the shortcode, namespaced views and
|
||||
// Livewire registration live in AcornPlugin\Providers\PluginServiceProvider.
|
||||
include_once __DIR__ . '/bootstrap.php';
|
||||
|
||||
Reference in New Issue
Block a user