feat(user-center): add dedicated creator workspace

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
kate522andClaude Fable 5 committed 2026-08-06 17:23:31 +08:00
1 parent c5b7deaa59
commit ceff04ce54
7 files changed
+127 -5

No files matched your search

+4 -3
View File
@@ -108,7 +108,7 @@ if (!function_exists('aksrt_get_user_center_tab_url')) {
}
$url = remove_query_arg([
'tab', 'posts_page', 'comments_page', 'favorites_page', 'credits_page',
'post_status', 'saved', 'profile_error',
'post_status', 'creator_page', 'creator_status', 'saved', 'profile_error',
'order_tab', 'otab', 'order_status', 'order_page', 'order_type', 'section',
], aksrt_get_user_center_url());
@@ -148,6 +148,7 @@ if (!function_exists('aksrt_capture_user_center_view')) {
'level' => 'level',
'profile' => 'form',
'posts' => 'posts',
'creator' => 'creator',
'comments' => 'comments',
'favorites' => 'favorites',
'credits' => 'credits',
@@ -179,7 +180,7 @@ if (!function_exists('aksrt_capture_user_center_panel')) {
* Capture a built-in or registered user-center panel body.
*/
function aksrt_capture_user_center_panel(string $tab_key, array $tab, array $context): string {
$built_in_tabs = ['profile', 'level', 'posts', 'comments', 'favorites', 'credits', 'vip', 'orders', 'auth', 'revenue', 'settings'];
$built_in_tabs = ['profile', 'level', 'posts', 'creator', 'comments', 'favorites', 'credits', 'vip', 'orders', 'auth', 'revenue', 'settings'];
if (in_array($tab_key, $built_in_tabs, true)) {
return aksrt_capture_user_center_view($tab_key, $context);
}
@@ -479,7 +480,7 @@ if (!function_exists('aksrt_get_user_center_render_context')) {
$post_status_filter = 'publish';
}
$user_status_counts = ['publish' => 0, 'draft' => 0, 'pending' => 0, 'private' => 0];
if ('posts' === $active_tab) {
if ('posts' === $active_tab || 'creator' === $active_tab) {
$status = aksrt_user_center_post_status_counts($user_id);
$user_status_counts = $status['counts'];
$post_count = $status['total'];