feat(admin): rebuild page display settings

This commit is contained in:
2026-08-19 00:07:13 +08:00
parent 09b1e8fd35
commit 480e2bf07e
117 changed files with 1815 additions and 9081 deletions
+2 -11
View File
@@ -9,13 +9,6 @@ defined('ABSPATH') || exit;
get_header();
$other_page_settings = class_exists('\AKSRT\Settings\Settings')
? \AKSRT\Settings\Settings::get_other_page_settings()
: [
'page_404_message' => __('页面未找到', 'aksrt'),
'page_404_search' => true,
'page_404_popular' => true,
];
$search_placeholder = function_exists('aksrt_get_search_placeholder') ? aksrt_get_search_placeholder() : __('开启精彩搜索', 'aksrt');
$hot_keywords = function_exists('aksrt_get_search_hot_keywords') ? aksrt_get_search_hot_keywords() : [];
@@ -46,7 +39,7 @@ $top_cats = get_terms([
<i class="fa fas fa-compass"></i>
</p>
<p class="error-hero__code" id="error-title">404</p>
<h1 class="error-hero__title"><?php echo esc_html($other_page_settings['page_404_message']); ?></h1>
<h1 class="error-hero__title"><?php esc_html_e('页面未找到', 'aksrt'); ?></h1>
<p class="error-hero__desc">
<?php esc_html_e('你访问的页面不存在或已被删除。试试搜索,或者从下方常用入口继续浏览。', 'aksrt'); ?>
</p>
@@ -54,7 +47,6 @@ $top_cats = get_terms([
<?php if (function_exists('aksrt_render_admin_quick_link')) { aksrt_render_admin_quick_link('page-display/other', __('404 页设置', 'aksrt')); } ?>
</div>
<?php if (!empty($other_page_settings['page_404_search'])) : ?>
<form role="search" method="get" class="error-hero__search" action="<?php echo esc_url(home_url('/')); ?>">
<span class="error-hero__search-icon" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>
@@ -64,7 +56,6 @@ $top_cats = get_terms([
<button type="submit" class="btn-primary btn-sm"><?php esc_html_e('搜索', 'aksrt'); ?></button>
</form>
<?php aksrt_render_search_hot_keywords($hot_keywords, 'aksrt-search-hot-keywords'); ?>
<?php endif; ?>
<div class="error-hero__actions">
<a href="<?php echo esc_url(home_url('/')); ?>" class="btn-primary"><?php esc_html_e('返回首页', 'aksrt'); ?></a>
@@ -86,7 +77,7 @@ $top_cats = get_terms([
</section>
<?php endif; ?>
<?php if (!empty($other_page_settings['page_404_popular']) && $hot_query->have_posts()) : ?>
<?php if ($hot_query->have_posts()) : ?>
<section class="error-section" aria-label="<?php esc_attr_e('热门内容', 'aksrt'); ?>">
<h2 class="error-section__title"><?php esc_html_e('热门内容', 'aksrt'); ?></h2>
<ul class="error-section__list">