修复了一些问题

This commit is contained in:
2026-08-25 18:11:26 +08:00
parent dbb1f776f2
commit 0109a59922
10 changed files with 121 additions and 33 deletions
@@ -0,0 +1,42 @@
<?php
/**
* Lightweight message-center URL alias harness.
*/
namespace {
define('ABSPATH', __DIR__);
class AKSRT_User_Notifications {}
function sanitize_key($value): string {
return preg_replace('/[^a-z0-9_\-]/', '', strtolower((string) $value)) ?? '';
}
function home_url(string $path = ''): string {
return 'https://example.test' . $path;
}
}
namespace AKSRT\Settings {
final class Settings {
public static function notification_settings(): array {
return ['slug' => 'inbox-center'];
}
public static function message_enabled(): bool {
return true;
}
}
}
namespace {
require_once dirname(__DIR__, 2) . '/inc/modules/user-parts/urls.php';
echo json_encode([
'slug' => aksrt_get_messages_rewrite_slug(),
'unread' => aksrt_get_messages_page_url(),
'posts' => aksrt_get_messages_page_url('posts'),
'like' => aksrt_get_messages_page_url('like'),
'system' => aksrt_get_messages_page_url('system'),
], JSON_UNESCAPED_SLASHES);
}