用户中心减层:收敛本人入口与 panel 契约
This commit is contained in:
1 parent
31c95c3bc6
commit
dec33ea15a
33 files changed
+1585
-1488
No files matched your search
@@ -5,7 +5,7 @@
|
||||
* 用于:
|
||||
* - 我的文章 / 我的收藏 / 公开主页文章列表
|
||||
*
|
||||
* 通过 set_query_var() 接收以下参数(可选):
|
||||
* 通过 get_template_part() 的 $args 接收以下参数(保留 query var 兼容):
|
||||
* - aksrt_profile_item_action: ['type'=>'edit'|'view'|'unfavorite', 'url'=>'...', 'label'=>'...']
|
||||
* - aksrt_profile_item_status: 文章状态徽章文本(如 "草稿" / "私密")
|
||||
*
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
$action = get_query_var('aksrt_profile_item_action', []);
|
||||
$action = isset($args['action']) ? $args['action'] : get_query_var('aksrt_profile_item_action', []);
|
||||
if (!is_array($action)) {
|
||||
$action = [];
|
||||
}
|
||||
@@ -22,7 +22,7 @@ $action_type = isset($action['type']) ? (string) $action['type'] : '';
|
||||
$action_url = isset($action['url']) ? (string) $action['url'] : '';
|
||||
$action_label = isset($action['label']) ? (string) $action['label'] : '';
|
||||
|
||||
$status_label = (string) get_query_var('aksrt_profile_item_status', '');
|
||||
$status_label = isset($args['status']) ? (string) $args['status'] : (string) get_query_var('aksrt_profile_item_status', '');
|
||||
|
||||
$post_id = get_the_ID();
|
||||
$permalink = get_permalink();
|
||||
|
||||
Reference in new issue
Block a user