refactor(autoload): migrate theme classes to Composer PSR-4
Move 288 types from global AKSRT_* + inc/classes manual requires into
namespace AKSRT\{Domain} under src/AKSRT/, wire composer.json psr-4,
and slim bootstrap to helpers/modules/hooks only. Split multi-class
widget/gateway files, update admin contract audit paths, and document
the layout in ADR/README.
This commit is contained in:
1 parent
8f349b40fb
commit
aaf458af1c
404 files changed
+13602
-7705
No files matched your search
@@ -12,8 +12,8 @@ if (is_user_logged_in()) {
|
||||
}
|
||||
|
||||
$oauth_providers = [];
|
||||
if (class_exists('AKSRT_OAuth')) {
|
||||
$oauth_providers = AKSRT_OAuth::get_instance()->get_auth_providers_data();
|
||||
if (class_exists('\AKSRT\Auth\OAuth')) {
|
||||
$oauth_providers = \AKSRT\Auth\OAuth::get_instance()->get_auth_providers_data();
|
||||
}
|
||||
|
||||
$registration_open = true;
|
||||
@@ -24,15 +24,15 @@ $invite_field_hint = '';
|
||||
$invite_prefill = '';
|
||||
$show_qrcode_tab = false;
|
||||
|
||||
if (class_exists('AKSRT_Settings')) {
|
||||
$registration_open = AKSRT_Settings::registration_enabled();
|
||||
if (method_exists('AKSRT_Settings', 'close_signup') && AKSRT_Settings::close_signup()) {
|
||||
if (class_exists('\AKSRT\Settings\Settings')) {
|
||||
$registration_open = \AKSRT\Settings\Settings::registration_enabled();
|
||||
if (method_exists('\AKSRT\Settings\Settings', 'close_signup') && \AKSRT\Settings\Settings::close_signup()) {
|
||||
$registration_open = false;
|
||||
}
|
||||
$email_verification = AKSRT_Settings::registration_requires_email_verification();
|
||||
$close_signin = AKSRT_Settings::close_signin();
|
||||
$email_verification = \AKSRT\Settings\Settings::registration_requires_email_verification();
|
||||
$close_signin = \AKSRT\Settings\Settings::close_signin();
|
||||
|
||||
$invite_cfg = AKSRT_Settings::get_invite_registration_config();
|
||||
$invite_cfg = \AKSRT\Settings\Settings::get_invite_registration_config();
|
||||
$invite_field_mode = (string) ($invite_cfg['register_field'] ?? 'hidden');
|
||||
$invite_field_hint = $invite_field_mode === 'required'
|
||||
? (string) ($invite_cfg['must_desc'] ?? '')
|
||||
@@ -57,7 +57,7 @@ $reset_url = function_exists('aksrt_get_reset_password_url') ? aksrt_get_reset_p
|
||||
$agreement = function_exists('aksrt_get_auth_agreement_view')
|
||||
? aksrt_get_auth_agreement_view()
|
||||
: ['enabled' => true, 'required' => true, 'label_html' => esc_html__('我已阅读并同意用户协议', 'aksrt'), 'field_name' => 'agree_terms'];
|
||||
$logo_url = class_exists('AKSRT_Settings') ? AKSRT_Settings::user_logo_url() : '';
|
||||
$logo_url = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::user_logo_url() : '';
|
||||
?>
|
||||
|
||||
<div class="aksrt-modal-auth" id="aksrt-modal-auth" aria-hidden="true" role="dialog" aria-modal="true" aria-label="<?php esc_attr_e('登录', 'aksrt'); ?>">
|
||||
|
||||
Reference in new issue
Block a user