feat(orders): embed My Orders inside user center (zibll-style)
Register UC panel tab=orders with full order list/actions UI; route aksrt_get_orders_page_url and /orders template to profile?tab=orders; enqueue order assets when the UC orders tab is active.
This commit is contained in:
1 parent
dae85f0198
commit
354a1072ef
8 files changed
+598
-464
No files matched your search
@@ -73,23 +73,17 @@ endif;
|
||||
|
||||
if (!function_exists('aksrt_get_orders_page_url')) :
|
||||
/**
|
||||
* 订单中心页面 URL(模板 templates/pages/page-orders.php)。
|
||||
* 优先已绑定页面;否则回退固定 rewrite /orders/(template-registry + routing)。
|
||||
* 订单中心 URL — 嵌在用户中心 tab=orders(zibll 同构)。
|
||||
* 旧 /orders/ 页面模板会 302 到此地址。
|
||||
*/
|
||||
function aksrt_get_orders_page_url(): string {
|
||||
$url = function_exists('aksrt_get_page_url_by_template')
|
||||
? aksrt_get_page_url_by_template('templates/pages/page-orders.php')
|
||||
: '';
|
||||
if ($url !== '') {
|
||||
return $url;
|
||||
if (function_exists('aksrt_get_user_center_tab_url')) {
|
||||
return aksrt_get_user_center_tab_url('orders');
|
||||
}
|
||||
if (function_exists('aksrt_get_template_url')) {
|
||||
$boot = aksrt_get_template_url('orders');
|
||||
if (is_string($boot) && $boot !== '' && $boot !== home_url('/')) {
|
||||
return $boot;
|
||||
}
|
||||
if (function_exists('aksrt_get_user_center_url')) {
|
||||
return aksrt_get_user_center_url('orders');
|
||||
}
|
||||
return home_url('/orders/');
|
||||
return home_url('/profile/?tab=orders');
|
||||
}
|
||||
endif;
|
||||
|
||||
|
||||
Reference in new issue
Block a user