fix(widgets): align user card action buttons

This commit is contained in:
2026-09-03 21:33:30 +08:00
parent 5b48be68da
commit 4f8ab94fac
5 changed files with 15 additions and 61 deletions
@@ -152,6 +152,12 @@ namespace {
'show_button' => false,
]);
$logged_buttons = aksrt_render_user_widget_state('user_card', [
'show_img_bg' => false,
'button_1_text' => '发布文章',
'button_2_text' => '用户中心',
]);
$GLOBALS['aksrt_user_card_state']['current_user_id'] = 2;
$GLOBALS['aksrt_user_card_state']['post'] = new WP_Post(33, 9);
$author = aksrt_render_user_widget_state('author_card', [
@@ -168,6 +174,7 @@ namespace {
'guest_no_registration' => $guest_no_registration,
'closed' => $closed,
'logged' => $logged,
'logged_buttons' => $logged_buttons,
'author' => $author,
], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
}