feat(user-center): add dedicated creator workspace
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -133,6 +133,12 @@ class Center {
|
||||
'priority' => 20,
|
||||
'type' => 'panel',
|
||||
],
|
||||
'creator' => [
|
||||
'label' => __('创作中心', 'aksrt'),
|
||||
'icon' => 'feather-alt',
|
||||
'priority' => 18,
|
||||
'type' => 'panel',
|
||||
],
|
||||
'comments' => [
|
||||
'label' => __('我的评论', 'aksrt'),
|
||||
'icon' => 'comment',
|
||||
@@ -210,6 +216,12 @@ class Center {
|
||||
// Follow configured order; always auto-include enabled surfaces.
|
||||
$order = $configured;
|
||||
|
||||
// Creator center is a dedicated workspace, separate from the posts archive.
|
||||
if (!in_array('creator', $order, true)) {
|
||||
$insert_at = array_search('profile', $order, true);
|
||||
array_splice($order, $insert_at === false ? 0 : (int) $insert_at + 1, 0, ['creator']);
|
||||
}
|
||||
|
||||
// Growth level is a dedicated user-center surface, separate from spendable points.
|
||||
if ($level_on && !in_array('level', $order, true)) {
|
||||
$insert_at = array_search('profile', $order, true);
|
||||
|
||||
Reference in New Issue
Block a user