Full-project rename. `git grep -i aksrt` is now empty apart from the
DBMigrator 3.3.0 changelog note that documents the rename itself.
Code identifiers
- PHP namespace AKSRT\ -> Jio\ (composer PSR-4 + 378 declarations)
- global constants AKSRT_* -> JIO_* (VERSION/DIR/URI, PAY_TYPE_*, CAPTCHA_*)
- procedural functions, hooks, options, meta keys, table names,
cookies, query vars, ajax actions and nonces: aksrt_ -> jio_
- text domain aksrt -> jio; Theme Name -> Jio
- JS globals: aksrtData/aksrtAdminData/... -> jioData/jioAdminData/...,
window.AKSRTCaptcha & friends -> window.JioCaptcha, Aksrt* -> Jio*
- Vue components Aks*.vue -> Jio*.vue (15 files renamed + imports)
- CSS classes/data-attrs/custom properties: aksrt- -> jio-
- REST namespace aksrt/v1 -> jio/v1 (incl. payment gateway callbacks)
Storage layer
- DB tables {prefix}aksrt_* -> {prefix}jio_*; SCHEMA_VERSION 3.2.0 -> 3.3.0
so dbDelta creates the new names on install
- widget id_base aksrt_widget_* -> jio_widget_*
- uninstall.php drop list rebuilt from the actual migrator tables
(dropped 3 stale entries, added the 17 missing ones)
Removed
- hardcoded https://api.aksrt.com/version.json default update endpoint;
get_endpoint() now reads the 「更新端点」 setting and do_check() no-ops
when it is empty
Files renamed: inc/helpers/aksrt-*.php -> jio-*.php (54),
assets/admin/src/components/form/Aks*.vue -> Jio*.vue (15).
Build artifacts regenerated: assets/css/build, assets/js/runtime,
assets/admin/build.
Verified: audit-psr4-paths errors=0, audit-admin-contracts errors=0
(warnings=56, unchanged baseline), 813/813 widget-system tests,
44/44 phpunit, php -l clean across all PHP.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
99 lines
3.9 KiB
PHP
99 lines
3.9 KiB
PHP
<?php
|
|
/**
|
|
* 404 template.
|
|
*
|
|
* @package Jio
|
|
*/
|
|
|
|
defined('ABSPATH') || exit;
|
|
|
|
get_header();
|
|
|
|
$search_placeholder = function_exists('jio_get_search_placeholder') ? jio_get_search_placeholder() : __('开启精彩搜索', 'jio');
|
|
$hot_keywords = function_exists('jio_get_search_hot_keywords') ? jio_get_search_hot_keywords() : [];
|
|
|
|
$hot_query = new WP_Query([
|
|
'post_type' => 'post',
|
|
'posts_per_page' => 5,
|
|
'post_status' => 'publish',
|
|
'orderby' => 'comment_count',
|
|
'order' => 'DESC',
|
|
'no_found_rows' => true,
|
|
'ignore_sticky_posts' => true,
|
|
]);
|
|
|
|
$top_cats = get_terms([
|
|
'taxonomy' => 'category',
|
|
'orderby' => 'count',
|
|
'order' => 'DESC',
|
|
'number' => 6,
|
|
'hide_empty' => true,
|
|
]);
|
|
?>
|
|
|
|
<main id="main-content" class="site-main content-shell content-shell--page" tabindex="-1">
|
|
<section class="error-hero" aria-labelledby="error-title">
|
|
<div class="term-page-header__body term-page-header__body--error">
|
|
<div>
|
|
<p class="error-hero__icon" aria-hidden="true">
|
|
<i class="fa fas fa-compass"></i>
|
|
</p>
|
|
<p class="error-hero__code" id="error-title">404</p>
|
|
<h1 class="error-hero__title"><?php esc_html_e('页面未找到', 'jio'); ?></h1>
|
|
<p class="error-hero__desc">
|
|
<?php esc_html_e('你访问的页面不存在或已被删除。试试搜索,或者从下方常用入口继续浏览。', 'jio'); ?>
|
|
</p>
|
|
</div>
|
|
<?php if (function_exists('jio_render_admin_quick_link')) { jio_render_admin_quick_link('page-display/other', __('404 页设置', 'jio')); } ?>
|
|
</div>
|
|
|
|
<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>
|
|
</span>
|
|
<label class="screen-reader-text" for="error-search-input"><?php esc_html_e('搜索', 'jio'); ?></label>
|
|
<input type="search" id="error-search-input" name="s" placeholder="<?php echo esc_attr($search_placeholder); ?>" autocomplete="off">
|
|
<button type="submit" class="btn-primary btn-sm"><?php esc_html_e('搜索', 'jio'); ?></button>
|
|
</form>
|
|
<?php jio_render_search_hot_keywords($hot_keywords, 'jio-search-hot-keywords'); ?>
|
|
|
|
<div class="error-hero__actions">
|
|
<a href="<?php echo esc_url(home_url('/')); ?>" class="btn-primary"><?php esc_html_e('返回首页', 'jio'); ?></a>
|
|
<a href="javascript:history.back()" class="btn-outline"><?php esc_html_e('返回上一页', 'jio'); ?></a>
|
|
</div>
|
|
</section>
|
|
|
|
<?php if (!empty($top_cats) && !is_wp_error($top_cats)) : ?>
|
|
<section class="error-section" aria-label="<?php esc_attr_e('热门分类', 'jio'); ?>">
|
|
<h2 class="error-section__title"><?php esc_html_e('热门分类', 'jio'); ?></h2>
|
|
<div class="error-section__chips">
|
|
<?php foreach ($top_cats as $cat) : ?>
|
|
<a class="error-section__chip" href="<?php echo esc_url(get_category_link($cat->term_id)); ?>">
|
|
<?php echo esc_html($cat->name); ?>
|
|
<span><?php echo (int) $cat->count; ?></span>
|
|
</a>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
</section>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($hot_query->have_posts()) : ?>
|
|
<section class="error-section" aria-label="<?php esc_attr_e('热门内容', 'jio'); ?>">
|
|
<h2 class="error-section__title"><?php esc_html_e('热门内容', 'jio'); ?></h2>
|
|
<ul class="error-section__list">
|
|
<?php while ($hot_query->have_posts()) : $hot_query->the_post(); ?>
|
|
<li>
|
|
<a href="<?php the_permalink(); ?>">
|
|
<span class="error-section__list-title"><?php the_title(); ?></span>
|
|
<span class="error-section__list-meta"><?php echo esc_html(get_the_date('Y-m-d')); ?></span>
|
|
</a>
|
|
</li>
|
|
<?php endwhile; wp_reset_postdata(); ?>
|
|
</ul>
|
|
</section>
|
|
<?php endif; ?>
|
|
</main>
|
|
|
|
<?php
|
|
get_footer();
|