Switch to zero-config setup, remove config and bootstrap dirs (#2839)

* Remove config directory

* feat(zeroconfig): Add support for zero-config

* test(php-lint): remove config directory

* chore(readme): update dir structure

* admin/customizer has been removed

Co-authored-by: QWp6t <hi@qwp6t.me>
This commit is contained in:
Ben Word
2021-12-29 15:42:29 -06:00
committed by GitHub
parent 85db9c25ca
commit ed8a80c052
13 changed files with 50 additions and 572 deletions

View File

@@ -19,13 +19,50 @@ require $composer;
/*
|--------------------------------------------------------------------------
| Run The Theme
| Register The Bootloader
|--------------------------------------------------------------------------
|
| Once we have the theme booted, we can handle the incoming request using
| the application's HTTP kernel. Then, we will send the response back
| to this client's browser, allowing them to enjoy our application.
| The first thing we will do is schedule a new Acorn application container
| to boot when WordPress is finished loading the theme. The application
| serves as the "glue" for all the components of Laravel and is
| the IoC container for the system binding all of the various parts.
|
*/
require_once __DIR__ . '/bootstrap/app.php';
\Roots\bootloader();
/*
|--------------------------------------------------------------------------
| Register Sage Theme Files
|--------------------------------------------------------------------------
|
| Out of the box, Sage ships with categorically named theme files
| containing common functionality and setup to be bootstrapped with your
| theme. Simply add (or remove) files from the array below to change what
| is registered alongside Sage.
|
*/
collect(['helpers', 'setup', 'filters'])
->each(function ($file) {
if (! locate_template($file = "app/{$file}.php", true, true)) {
wp_die(
/* translators: %s is replaced with the relative file path */
sprintf(__('Error locating <code>%s</code> for inclusion.', 'sage'), $file)
);
}
});
/*
|--------------------------------------------------------------------------
| Enable Sage Theme Support
|--------------------------------------------------------------------------
|
| Once our theme files are registered and available for use, we are almost
| ready to boot our application. But first, we need to signal to Acorn
| that we will need to initialize the necessary service providers built in
| for Sage when booting.
|
*/
add_theme_support('sage');