fix(admin): replicate reference post-feature settings page 1:1

- Rewrite post_list/feature schema (PHP + JS) with the reference theme's
  field set, order, defaults and dependencies; print/PDF toggles dropped
- Move the migrated reference fields off the post-page schema (lightbox
  six switches, post like, default view/like ranges) to kill the dual path
- Map PostDisplay::get_post_page_settings() to the new keys without legacy
  fallback: imagelightbox* (pc_s/m_s checkboxes merged), post_like_s,
  post_default_mate ranges, article_nav + article_nav_mobile_nav_s
- Wire article_nav runtime: content data-nav/no-nav gate with per-post
  override, mobile drawer TOC box, imgbox_type config
- Seed random views/likes on new posts from post_default_mate ranges
- Keep the print stylesheet enqueued unconditionally (no switch); drop the
  dead print/PDF settings and needs_print requirement
- Add post-feature settings reference contract test
This commit is contained in:
kate522 committed 2026-09-24 14:29:04 +08:00
1 parent c331b2aeef
commit 4d6b2c6045
12 files changed
+469 -85

No files matched your search

+8 -1
View File
@@ -102,7 +102,14 @@ if (!function_exists('aksrt_nav_mobile_content')) :
echo $menu; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
if (is_singular('post')) {
echo '<div class="posts-nav-box" data-title="' . esc_attr__('文章目录', 'aksrt') . '"></div>';
$page = class_exists('\AKSRT\Settings\Settings')
? \AKSRT\Settings\Settings::get_post_page_settings()
: [];
$article_nav = !isset($page['article_nav']) || !empty($page['article_nav']);
$article_nav_mobile = !isset($page['article_nav_mobile']) || !empty($page['article_nav_mobile']);
if ($article_nav && $article_nav_mobile) {
echo '<div class="posts-nav-box" data-title="' . esc_attr__('文章目录', 'aksrt') . '"></div>';
}
}
// User box at bottom of drawer.