sakura/app/functions.php

30 lines
803 B
PHP
Raw Normal View History

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-09-15 11:00:17 +08:00
define('SAKURA_DEVEPLOMENT', false);
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)
{
2021-07-18 19:52:09 +08:00
$CF = new Sakura\Controllers\OptionController();
2021-07-14 16:54:49 +08:00
return $CF->sakura_options($namespace, $default);
}