修复了一些问题

This commit is contained in:
kate522 committed 2026-08-25 17:57:20 +08:00
1 parent 8eb0079bc4
commit dbb1f776f2
19 files changed
+785 -634

No files matched your search

+10 -7
View File
@@ -55,16 +55,19 @@ function aksrt_get_new_post_url(int $edit_id = 0): string {
endif;
if (!function_exists('aksrt_get_messages_page_url')) :
/**
* 消息中心页面 URL(模板 templates/pages/page-messages.php)。
*/
function aksrt_get_messages_page_url(): string {
/** 消息中心 URL。 */
function aksrt_get_messages_page_url(string $view = 'unread'): string {
if (class_exists('\AKSRT\Settings\Settings') && !\AKSRT\Settings\Settings::message_enabled()) {
return '';
}
return function_exists('aksrt_get_template_url')
? aksrt_get_template_url('messages')
: home_url('/messages/');
$paths = [
'unread' => '/message/',
'posts' => '/message/posts/',
'like' => '/message/like/',
'system' => '/message/system/',
];
$view = sanitize_key($view);
return home_url($paths[$view] ?? $paths['unread']);
}
endif;