feat(admin): expose shop/forum CPTs on native WP sidebar (Phase 0–1)

Align admin ops entry with zibll: product/plate/topic menus and taxonomies
show in the WordPress sidebar when shop_s/bbs_s are enabled, gated by
AKSRT_Settings. Add IA map + gap matrix docs for the full native-ops
migration path. SPA ops pages remain until Phase 2–3 native pages ship.
This commit is contained in:
kate522 committed 2026-07-15 01:00:10 +08:00
1 parent 87004ecfe0
commit 50ca5a6593
6 files changed
+388 -60

No files matched your search

+11 -2
View File
@@ -45,6 +45,14 @@ class AKSRT_Shop_Term_Meta {
return;
}
$shop_enabled = true;
if (class_exists('AKSRT_Settings')) {
$shop_settings = AKSRT_Settings::get_shop_settings();
$shop_enabled = !empty($shop_settings['enabled']);
}
$shop_show_ui = true;
$shop_show_menu = is_admin() ? $shop_enabled : false;
register_taxonomy('shop_discount', 'aksrt_product', [
'labels' => [
'name' => __('优惠活动', 'aksrt'),
@@ -57,9 +65,10 @@ class AKSRT_Shop_Term_Meta {
],
'public' => true,
'hierarchical' => false,
'show_ui' => false,
'show_ui' => $shop_show_ui,
'show_in_menu' => $shop_show_menu,
'show_in_rest' => true,
'show_admin_column' => false,
'show_admin_column' => true,
'rewrite' => ['slug' => 'shop-discount', 'with_front' => false],
]);
}