修复了一些问题

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

+9 -7
View File
@@ -37,12 +37,6 @@ $_aksrt_special_templates = [
'title' => '个人中心',
'fallback' => '/profile/',
],
'messages' => [
'file' => 'templates/pages/page-messages.php',
'slug' => 'messages',
'title' => '消息中心',
'fallback' => '/messages/',
],
'submit' => [
'file' => 'templates/pages/page-submit.php',
'slug' => 'submit',
@@ -135,7 +129,10 @@ function aksrt_resolve_page_template_file(string $template_file = '', string $po
$post_slug = sanitize_title($post_slug);
if ($template_file !== '') {
if ($template_file === 'templates/pages/page-sign.php') {
if ($template_file === 'templates/pages/page-messages.php') {
return '';
}
if ($template_file === 'templates/pages/page-sign.php') {
return $template_file;
}
@@ -223,6 +220,11 @@ function aksrt_get_user_home_template_path(): string {
* Resolve the active special-page template path for the current request.
*/
function aksrt_get_current_special_template_path(): string {
if (get_query_var('aksrt_message_view')) {
$message_template = aksrt_locate_template_file('templates/pages/page-messages.php');
return $message_template ?: '';
}
if (get_query_var('aksrt_author_identifier')) {
return aksrt_get_user_home_template_path();
}