重构

PHP

<?php
/**
 * QiMeng Theme Functions
 *
 * 核心入口文件:定义常量、加载核心类和业务模块
 */

if ( ! defined( 'ABSPATH' ) ) { exit; }

define( 'QIMENG_VERSION', '5.3' );
define( 'QIMENG_DIR', get_template_directory() );

require_once QIMENG_DIR . '/inc/core/bootstrap.php';
require_once QIMENG_DIR . '/inc/edition/authorization.php';

if ( function_exists( 'qimeng_authorization_maybe_serve_domain_challenge' ) ) {
	qimeng_authorization_maybe_serve_domain_challenge();
}

if ( function_exists( 'qimeng_authorization_guard_frontend' ) ) {
	qimeng_authorization_guard_frontend();
}

$template_uri = get_template_directory_uri();
if ( is_ssl() || ( ! empty( $_SERVER['HTTPS'] ) && 'off' !== $_SERVER['HTTPS'] ) ) {
	$template_uri = set_url_scheme( $template_uri, 'https' );
}

$template_uri = qimeng_bootstrap_rewrite_url_to_runtime_origin( $template_uri );
define( 'QIMENG_URI', $template_uri );

qimeng_register_fatal_shutdown_logger();

require_once QIMENG_DIR . '/inc/edition/feature-map.php';
require_once QIMENG_DIR . '/inc/helpers/ajax.php';
require_once QIMENG_DIR . '/inc/core/class-environment.php';
require_once QIMENG_DIR . '/inc/core/class-loader.php';

$loader = Qimeng_Loader::get_instance();

require_once QIMENG_DIR . '/inc/theme-bootstrap.php';

上一篇 测试 下一篇 Parallels Desktop(PD)
评论区
游客
游客

还没有人评论,快来抢沙发吧~

在线客服
工作日在线,欢迎咨询购买、授权、部署与售后问题。
在线时间周一至周五 09:00 - 18:00
如遇支付、授权、安装、定制等问题,可优先联系在线客服,我们会尽快协助处理。