2021-07-09 18:28:29 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
// namespace Sakura;
|
|
|
|
|
|
|
|
define('SAKURA_VERSION', wp_get_theme()->get('Version'));
|
|
|
|
define('SAKURA_TEXT_DOMAIN', wp_get_theme()->get('TextDomain'));
|
|
|
|
|
2021-07-14 14:55:41 +08:00
|
|
|
define('SAKURA_DEVEPLOMENT', true);
|
2021-07-14 10:04:54 +08:00
|
|
|
define('SAKURA_DEVEPLOMENT_HOST', 'http://127.0.0.1:9000');
|
|
|
|
|
2021-07-09 18:28:29 +08:00
|
|
|
// PHP loaders
|
|
|
|
require_once(__DIR__ . '/loader.php');
|
|
|
|
|
2021-07-14 16:54:49 +08:00
|
|
|
new Sakura\Helpers\SetupHelper();
|
|
|
|
new Sakura\Helpers\WhoopsHelper();
|
|
|
|
new Sakura\Helpers\ViteHelper();
|
|
|
|
new Sakura\Helpers\AdminPageHelper();
|
|
|
|
new Sakura\Helpers\CustomMenuMetaFieldsHelper();
|
|
|
|
new Sakura\Helpers\CommentHelper();
|
|
|
|
new Sakura\Helpers\PostQueryHelper('post');
|
2021-07-09 18:28:29 +08:00
|
|
|
|
2021-07-14 16:54:49 +08:00
|
|
|
new Sakura\Routers\ApiRouter();
|
|
|
|
new Sakura\Routers\PagesRouter();
|
|
|
|
|
|
|
|
function sakura_options(string $namespace, $default)
|
|
|
|
{
|
|
|
|
$CF = new Sakura\Controllers\ConfigurationController();
|
|
|
|
return $CF->sakura_options($namespace, $default);
|
|
|
|
}
|